Comment 4 for bug 1410480

Revision history for this message
Ryan Tandy (rtandy) wrote : Re: 3.18 overlayfs: renaming existing file leaves whiteout visible

OK, this is interesting.

root@plonk:~# mkdir /lower /upper /work /ovl
root@plonk:~# touch /lower/testfile
root@plonk:~# mkdir /lower/testdir
root@plonk:~# mount -t overlay -o lowerdir=/lower,upperdir=/upper,workdir=/work overlay /ovl
root@plonk:~# mv /ovl/testfile /ovl/renamed-testfile
root@plonk:~# ls -l /ovl
total 4
-rw-r--r-- 1 root root 0 Jan 13 13:15 renamed-testfile
drwxr-xr-x 2 root root 4096 Jan 13 13:15 testdir
root@plonk:~# umount /ovl
root@plonk:~# rm -r /upper/* /work/*
root@plonk:~# mount -t overlayfs -o lowerdir=/lower,upperdir=/upper,workdir=/work overlay /ovl
root@plonk:~# mv /ovl/testfile /ovl/renamed-testfile
root@plonk:~# ls -l /ovl
total 4
-rw-r--r-- 1 root root 0 Jan 13 13:15 renamed-testfile
drwxr-xr-x 2 root root 4096 Jan 13 13:15 testdir
c--------- 1 root root 0, 0 Jan 13 13:16 testfile
root@plonk:~# uname -srm
Linux 3.18.0-8-generic x86_64

That is, "mount -t overlay" works fine, but "mount -t overlayfs" has the bug.

I tried the 3.18.2 and 3.19-rc4 mainline kernels. "mount -t overlay" works fine there as well, and they don't understand "mount -t overlayfs".