Bug 109611 - (overlayfs) moving a file to a directory that exists only in `upper` and deleting it creates unnecessary whiteout file
Summary: (overlayfs) moving a file to a directory that exists only in `upper` and dele...
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
Depends on:
Reported: 2015-12-19 06:21 UTC by Viktor Stanchev
Modified: 2016-08-15 13:10 UTC (History)
6 users (show)

See Also:
Kernel Version: 4.2.5
Regression: No
Bisected commit-id:


Description Viktor Stanchev 2015-12-19 06:21:15 UTC
The following script reproduces the issue:

mkdir upper lower work merged upper/dir/
touch lower/test
sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged
mv merged/test merged/dir/
rm merged/dir/test
ls -l merged/dir/

The output from the last command is:

/usr/bin/ls: cannot access merged/dir/test: No such file or directory
total 0
c????????? ? ? ? ?            ? test

uname -a
Linux linusputinmusk 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux

There is more information about this bug here: https://github.com/docker/docker/issues/9572
Comment 1 Vivek Goyal 2016-01-11 16:45:42 UTC
Proposed a fix upstream.

Comment 3 dennis 2016-08-09 12:00:56 UTC
The Problem still exists in 4.7, see https://github.com/docker/docker/issues/25409#issuecomment-238524333
Comment 4 dE 2016-08-15 13:10:10 UTC
Can be seen in 4.3.5.

Here, removing a directory always reproduces this issue.

Subscribing for updates.

Note You need to log in before you can comment on or make changes to this bug.