On May 9, 2012, at 3:15 PM, Myklebust, Trond wrote: > On Wed, 2012-05-09 at 18:22 +0000, Adamson, Dros wrote: >> On May 9, 2012, at 2:20 PM, Adamson, Dros wrote: >> >>> ACK - This fixes the errant behavior I was seeing. >>> >>> Before (on any protocol version mounted at /mnt): >>> $ dd if=/dev/zero of=zerofile bs=10024 count=1000 ; while true; do (rm -rf /mnt/foo && echo rm ok) || ls -la /mnt/foo ; mkdir -p /mnt/foo/; cp zerofile /mnt/foo/file ; done >>> 1000+0 records in >>> 1000+0 records out >>> 10024000 bytes (10 MB) copied, 0.146738 s, 68.3 MB/s >>> rm ok >>> rm: cannot remove `/mnt/foo': Directory not empty >>> ls: /mnt/foo/.nfs000000000004089d00000001: No such file or directory >>> total 9800 >>> drwxrwxr-x 2 dros dros 4096 May 9 09:46 . >>> drwxrwxrwx 5 root root 4096 May 9 09:46 .. >>> -rw-rw-r-- 0 dros dros 10024000 May 9 09:46 .nfs000000000004089d00000001 >>> rm: cannot remove `/mnt/foo': Directory not empty >>> ... >>> >> >> Oops, this is after the patch is applied: >> >>> $ dd if=/dev/zero of=zerofile bs=10024 count=1000 ; while true; do (rm -rf /mnt/foo && echo rm ok) || ls -la /mnt/foo ; mkdir -p /mnt/foo/; cp zerofile /mnt/foo/file ; done >>> 1000+0 records in >>> 1000+0 records out >>> 10024000 bytes (10 MB) copied, 0.137596 s, 72.9 MB/s >>> rm ok >>> rm ok >>> rm ok >>> rm ok >>> ... >>> >>> -dros > > OK... Having thought a bit more about the problem, I'd prefer to see the > write code do the same really as the read code is doing. i.e. release > the nfs_page after the page_writeback lock has been released. > > I've just written a series of patches to do this. The first patch in the > series is the actual fix. The rest is clean ups in order to make the > code a bit more readable… I tested the new patchset and it seems to work great! -dros
Attachment:
smime.p7s
Description: S/MIME cryptographic signature