Description of problem: Using overlay FS on top of XFS results in corrupted merged file system due to bad handling of whiteouts. Version-Release number of selected component (if applicable): kernel-4.4.5-300.fc23.x86_64 How reproducible: Always Steps to Reproduce: 1. mount an overlay FS 2. remove a file present in lowerdir in the merged FS 3. the merged FS is now corrupted Actual results: $ mkdir upper lower work merged $ echo hello > lower/hello.txt $ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged $ ls -l merged total 4 -rw-rw-r--. 1 user user 6 Mar 20 20:00 hello.txt $ rm merged/hello.txt $ ls -l merged ls: cannot access merged/hello.txt: No such file or directory total 0 ?????????? ? ? ? ? ? hello.txt $ sudo umount merged Expected results: (same commands on tmpfs instead of XFS) $ mkdir upper lower work merged $ echo hello > lower/hello.txt $ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged $ ls -l merged total 4 -rw-rw-r--. 1 user user 6 Mar 20 20:01 hello.txt $ rm merged/hello.txt $ ls -l merged total 0 $ sudo umount merged Additional info:
XFS filesystem needs to be created with "fstype=1" option: mkfs.xfs -n fstype=1 Upstream fix to prevent filesystems without fstype to be mounted: v4.7-rc1 21765194cecf ("ovl: Do d_type check only if work dir creation was successful")
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 23 kernel bugs. Fedora 23 has now been rebased to 4.7.4-100.fc23. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 24 or 25, and are still experiencing this issue, please change the version to Fedora 24 or 25. If you experience different issues, please open a new bug report for those.
*********** MASS BUG UPDATE ************** This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 4 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously.
Confirmed as working in Fedora 25/4.13.10.