There is some serious weirdness if you try and use bind mounts in conjunction with nfs4 mounts. $ df -T /var/tmp Filesystem Type 1K-blocks Used Available Use% Mounted on fs.beware.dropbear.id.au:/tmp/ nfs4 5160576 403968 4494464 9% /var/tmp $ df -T /tmp Filesystem Type 1K-blocks Used Available Use% Mounted on /tmp tmpfs 921600 4 921596 1% /tmp $ cat /tmp/foo Over The Lazy Dogs Back $ cat /var/tmp/foo The Quick Brown Fox # # So /var/tmp/foo is on an nfs4 mounted filesystem # /tmp/foo is on a tmpfs. Both files are different. # $ mount --bind /tmp/foo /var/tmp/foo $ cat /tmp/foo Over The Lazy Dogs Back $ cat /var/tmp/foo The Quick Brown Fox # # Both files should be the same. ie "Over The Lazy Dogs Back" # # In other oddity, ls -l correctly shows both files the same size (31), # and ls -i correctly shows both have the same inode number, yet: $ cat /tmp/foo | wc -c 31 $ cat /var/tmp/foo | wc -c 20 # # So much for reading. Now what about writing? # $ echo blah blah > /var/tmp/foo $ cat /var/tmp/foo blah blah Brown Fox # # This should have been truncated # $ cat /tmp/foo # # /tmp/foo has been truncated, but it should have "blah blah" in it # $ umount /var/tmp/foo $ cat /var/tmp/foo blah blah Brown Fox $cat /tmp/foo # Empty
Created attachment 26023 [details] Dont' do atomic open on a mountpoint
Does the above patch fix the bug?
That's an impressively quick turn around! Unfortunately, it'll take a bit longer to build and test.
That work fine. Thanks!