From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Patrick J. LoPresti" <patl@curl.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Stale NFS handles on 2.4.2^H^H^H^H^H2.2.19
Date: Thu, 1 Mar 2001 15:13:02 +0100 (CET) [thread overview]
Message-ID: <15006.22766.586401.216994@charged.uio.no> (raw)
In-Reply-To: <s5gwva9simp.fsf@egghead.curl.com>
In-Reply-To: <20010214002750.B11906@unthought.net> <20010224141855.B12988@d-131-151-189-65.dynamic.umr.edu> <15000.39826.947692.141119@notabene.cse.unsw.edu.au> <20010224235342.D483@d-131-151-189-65.dynamic.umr.edu> <15000.53110.664338.230709@notabene.cse.unsw.edu.au> <20010225131013.E483@d-131-151-189-65.dynamic.umr.edu> <15004.16978.439300.108625@notabene.cse.unsw.edu.au> <shsd7c3817s.fsf@charged.uio.no> <15005.30849.720697.525157@notabene.cse.unsw.edu.au> <15005.41548.370345.60631@charged.uio.no> <20010228211808.C24668@d-131-151-189-65.dynamic.umr.edu> <15006.4414.116135.500744@charged.uio.no> <s5gwva9simp.fsf@egghead.curl.com>
>>>>> " " == Patrick J LoPresti <patl@curl.com> writes:
> Trond Myklebust <trond.myklebust@fys.uio.no> writes:
>> OK. We need the patch I sent last night plus a 1-liner in
>> nfs_inode_is_stale(). That should cover both pathologies. It'll
>> probably clean up the other cases in which people have been
>> reporting -ESTALE errors.
> This would be great!
> Any chance your patches will make it into 2.2.19?
They might if you can confirm that the latest 2.2.19-pre patch + the
appended fix the ESTALE problems.
(I hope there are no typos here. I'm preparing to fly over to the
Connectathon tonight, so I haven't had time to run a test, but the
conversion from 2.4.2 should be trivial...)
Cheers,
Trond
diff -u --recursive --new-file linux-2.2.19-pre14/fs/nfs/inode.c linux-2.2.19-stale/fs/nfs/inode.c
--- linux-2.2.19-pre14/fs/nfs/inode.c Thu Feb 22 20:47:54 2001
+++ linux-2.2.19-stale/fs/nfs/inode.c Thu Mar 1 15:06:52 2001
@@ -689,7 +689,7 @@
if ((fattr->mode & S_IFMT) != (inode->i_mode & S_IFMT))
return 1;
- if (is_bad_inode(inode))
+ if (is_bad_inode(inode) || NFS_STALE(inode))
return 1;
/* Has the filehandle changed? If so is the old one stale? */
@@ -871,7 +871,9 @@
dfprintk(PAGECACHE, "NFS: revalidating (%x/%Ld)\n",
inode->i_dev, (long long)NFS_FILEID(inode));
- if (!inode || is_bad_inode(inode) || NFS_STALE(inode))
+ if (!inode || is_bad_inode(inode))
+ return -ESTALE;
+ if (NFS_STALE(inode) && inode != inode->i_sb->s_root->d_inode)
return -ESTALE;
while (NFS_REVALIDATING(inode)) {
@@ -889,7 +891,8 @@
inode->i_dev, (long long)NFS_FILEID(inode), status);
if (status == -ESTALE) {
NFS_FLAGS(inode) |= NFS_INO_STALE;
- remove_inode_hash(inode);
+ if (inode != inode->i_sb->s_root->d_inode)
+ remove_inode_hash(inode);
}
goto out;
}
@@ -903,6 +906,7 @@
dfprintk(PAGECACHE, "NFS: (%x/%Ld) revalidation complete\n",
inode->i_dev, (long long)NFS_FILEID(inode));
+ NFS_FLAGS(inode) &= ~NFS_INO_STALE;
out:
NFS_FLAGS(inode) &= ~NFS_INO_REVALIDATING;
wake_up(&inode->i_wait);
next prev parent reply other threads:[~2001-03-01 14:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010228211808.C24668@d-131-151-189-65.dynamic.umr.edu>
2001-02-13 23:27 ` Stale NFS handles on 2.4.1 Jakob Østergaard
2001-02-13 23:31 ` Alan Cox
2001-02-13 23:43 ` Jakob Østergaard
2001-02-14 8:35 ` Rogier Wolff
2001-02-14 0:02 ` Trond Myklebust
2001-02-24 20:18 ` Stale NFS handles on 2.4.2 David Fries
2001-02-25 5:43 ` Neil Brown
2001-02-25 5:53 ` David Fries
2001-02-25 9:25 ` Neil Brown
2001-02-25 19:10 ` David Fries
2001-02-28 0:12 ` Neil Brown
2001-02-28 12:02 ` Trond Myklebust
2001-02-28 22:15 ` Neil Brown
2001-03-01 1:13 ` Trond Myklebust
2001-03-01 9:07 ` Trond Myklebust
2001-03-01 14:13 ` Trond Myklebust [this message]
2001-02-25 14:00 ` Trond Myklebust
2001-02-26 9:54 ` Lennert Buytenhek
2001-02-26 15:56 ` David Fries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15006.22766.586401.216994@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
--cc=patl@curl.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®