Messages in this thread | | | Subject | Re: NFS client write out corrupted file? | From | Trond Myklebust <> | Date | 17 Dec 1998 15:11:46 +0100 |
| |
Linus Torvalds <torvalds@transmeta.com> writes:
> I found the cause for this, and it's apparently been there forever (well, > since the new NFS client went in some time fairly early in 2.1.x). > > The reason some people see it a lot more especially after 2.1.130 is that > newer kernels can have a lot more pending writes, and as such the old bug > can show up a lot more easily. > > I'll make a 2.1.132 soonish, I'm trying to survive my email backlog. >
There are still a few issues remaining in pre-patch-2.1.132-1 though.
- There remains an ambiguity concerning the status of cancelled writes: if they were already in progress, they may still be committed to the server's storage, but this will not be registered by the inode attribute cache.
- Shouldn't a cancellation also invalidate the page if it was marked PG_uptodate?
- Another (minor) point is whether nfs_cancel_dirty should really be cancelling unfreed write requests that are marked as NFS_WRITE_COMPLETE?
- If you run 'setattr' on a file in order to truncate it, there is no synchronization to ensure that async writes which would be cancelled are committed before the call to setattr.
- If you read a page and the call to nfs_wb_page fails, the PG_locked bit is never cleared, and many processes end up hanging on wait_on_page. (Please note my first patch to cure this contained a bug in that it didn't free the page in the case of a successful synchronous read).
Would you therefore please consider the merits of the following patch:
Cheers, Trond
[unhandled content-type:application/octet-stream] | |