Bug 109611

Summary: (overlayfs) moving a file to a directory that exists only in `upper` and deleting it creates unnecessary whiteout file
Product: File System Reporter: Viktor Stanchev (me)
Component: OtherAssignee: fs_other
Status: NEW ---    
Severity: normal CC: de.techno, dennis, koct9i, sab, szg00000, vivek.goyal2008
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.2.5 Subsystem:
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.