lkml.org 
[lkml]   [1999]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: NFS: Arghhh, stuck RPC requests!
From

Hi Linus,

There remains a small race problem in 2.2.0-pre3 concerning NFS
deletions. Currently, 'remove_write_request' is called in routine
'free_write_request', which is only called after the dput of the
dentry in 'nfs_wback_result'. This means that the inode is sometimes
attempted deleted before its write queue has been cleared. This causes
the stuck RPC requests reported by, amongst others, Steffen Zahn.

Please find the appended patch to fs/nfs/write.c, that moves the call
to 'remove_write_request' to nfs_wback_result. There seems to be no
code that relies on the old behaviour, so this should be safe and it
is better than my earlier patch (which moved the dput to
free_write_request) since it allows us to continue to free the dentry
before the request wait queue is served.

Cheers,
Trond


--- linux/fs/nfs/write.c-2.2.0-pre3 Fri Dec 18 00:54:25 1998
+++ linux/fs/nfs/write.c Sat Jan 2 17:50:48 1999
@@ -263,12 +263,8 @@
static inline void
free_write_request(struct nfs_wreq * req)
{
- if (!--req->wb_count) {
- struct inode *inode = req->wb_inode;
- remove_write_request(&NFS_WRITEBACK(inode), req);
+ if (!--req->wb_count)
kfree(req);
- nr_write_requests--;
- }
}

/*
@@ -698,6 +694,8 @@
clear_bit(PG_uptodate, &page->flags);

__free_page(page);
+ remove_write_request(&NFS_WRITEBACK(inode), req);
+ nr_write_requests--;
dput(req->wb_dentry);

wake_up(&req->wb_wait);
-
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.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.024 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site