Hi Neil,
In
http://cgi.cse.unsw.edu.au/~neilb/patches/linux-stable/2.4.20-rc1/patch-C-Nf
sdRevalidate,
fh_compose may never be called and err will be left set to a dentry's
address or nfserr_acces (is that nfserr_acces ever used?) - if
dentry->d_inode/dentry->d_inode->i_op/dentry->d_inode->i_op->revalidate is
NULL.
Applying this patch results in problems with my Solaris clients, at least
when trying to create a new file or when trying to stat a nonexistent file
- output from truss:
open("/home/chrisp/a.lock.1036824940.2046.kauri", O_WRONLY|O_CREAT|O_EXCL,
0666) Err#-1057499168
lstat("/home/chrisp/a.lock", 0xFFBECFB8) Err#-1071055655
If I arrange the tests as below, to call fh_compose even if we can't call
revalidate, all seems happy. Is this behaviour correct?
--- vfs.c 2002/11/04 18:51:29 1.42
+++ vfs.c 2002/11/09 06:38:16
@@ -168,11 +168,13 @@
mntput(mnt);
}
}
- /*
- * Note: we compose the file handle now, but as the
- * dentry may be negative, it may need to be updated.
- */
- err = fh_compose(resfh, exp, dentry, fhp);
+
+ if (dentry->d_inode && dentry->d_inode->i_op &&
+ dentry->d_inode->i_op->revalidate &&
+ dentry->d_inode->i_op->revalidate(dentry))
+ err = nfserr_noent;
+ else
+ err = fh_compose(resfh, exp, dentry, fhp);
if (!err && !dentry->d_inode)
err = nfserr_noent;
out:
Regards,
Chris
--
Christopher Pascoe
IT Infrastructure Group Manager
School of Information Technology and Electrical Engineering
The University of Queensland Brisbane QLD 4072 Australia
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about
your web server security? Click here for a FREE Thawte
Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Thursday November 14, [email protected] wrote:
> Hi Neil,
>
> In
> http://cgi.cse.unsw.edu.au/~neilb/patches/linux-stable/2.4.20-rc1/patch-C-Nf
> sdRevalidate,
> fh_compose may never be called and err will be left set to a dentry's
> address or nfserr_acces (is that nfserr_acces ever used?) - if
> dentry->d_inode/dentry->d_inode->i_op/dentry->d_inode->i_op->revalidate is
> NULL.
>
> Applying this patch results in problems with my Solaris clients, at least
> when trying to create a new file or when trying to stat a nonexistent file
> - output from truss:
>
> open("/home/chrisp/a.lock.1036824940.2046.kauri", O_WRONLY|O_CREAT|O_EXCL,
> 0666) Err#-1057499168
> lstat("/home/chrisp/a.lock", 0xFFBECFB8) Err#-1071055655
>
> If I arrange the tests as below, to call fh_compose even if we can't call
> revalidate, all seems happy. Is this behaviour correct?
Yes, you are correct. The code was definately broken.
Having:
if (x)
if (Y)
z;
else
w;
is always a bad idea !
Thanks a lot.
Your new code looks right.
NeilBrown
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about
your web server security? Click here for a FREE Thawte
Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs