NFS question...

Trond Myklebust (trond.myklebust@fys.uio.no)
Thu, 27 Aug 1998 21:14:34 +0200 (CEST)


>>>>> Trond Myklebust <trond.myklebust@fys.uio.no> writes:

> Why is IS_SOFT still set to 0 in fs/nfs/write.c? Won't that cause
> nfs_flush_dirty_pages to report a success even if the NFS write was
> interrupted in the call to wait_on_write_request?

I just had one hard lockup which I believe was related to this. Does
the following patch look correct?

Cheers,
Trond

--- linux/fs/nfs/write.c-2.1.119-0.1 Tue Aug 25 22:32:49 1998
+++ linux/fs/nfs/write.c Thu Aug 27 21:05:18 1998
@@ -735,24 +735,16 @@
dprintk("NFS: flush_dirty_pages(%x/%ld for pid %d %ld/%ld)\n",
inode->i_dev, inode->i_ino, current->pid, offset, len);

- if (IS_SOFT && signalled()) {
- nfs_cancel_dirty(inode, pid);
- cancel = 1;
- }
-
for (;;) {
- if (IS_SOFT && signalled()) {
- if (!cancel)
- nfs_cancel_dirty(inode, pid);
- result = -ERESTARTSYS;
- break;
- }
-
/* Flush all pending writes for the pid and file region */
last = nfs_flush_pages(inode, pid, offset, len, 0);
if (last == NULL)
break;
- wait_on_write_request(last);
+ result = wait_on_write_request(last);
+ if (result) {
+ nfs_cancel_dirty(inode,pid);
+ break;
+ }
}

return result;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html