Re: knfsd 1.5 is released

Neil Brown (neilb@cse.unsw.edu.au)
Sat, 25 Sep 1999 19:50:50 +1000 (EST)


On Friday September 24, hjl@valinux.com wrote:
> On Fri, Sep 24, 1999 at 11:31:16AM +1000, Neil Brown wrote:
> > > ----
> >
> > David's Patches were only a work-in-progress, not really ready for
> > serious use yet. The usage of "d_path" in nfsd_netlink_notify is all
> > wrong for a start.
> > I have mailed David privately about this and he plans to tidy it up
> > soonish, but until then, I don't think the mountd changes in 1.5
> > should be used, so I won't be making a patch against them.
> >
>
> I am appending 2 patches to address some of the problems in
> knfsd 1.5. Please check them out.
>
> Thanks.
>
>
> H.J.

I haven't actually down loaded 1.5.1 yet, but based on 1.5 plus these
patches, one thing that stands out is that creating negative export
entries will not work in general (Though they may work in many
specific situations).

An NFS file handle has xdev and xino entries which indicate which
export entry is being used. If mountd is to give an NFSEXP_NEGATIVE
entry to the kernel to reject a given file handle, it needs to know
this xdev/xino information somehow. Currently it doesn't (unless, by
luck, xdev/xino is the root file the filesystem).
It is only given the device, and the path to the actual file which is
being accessed.

How I would fix it (I wont be able to do it myself for about 2 weeks):

change find_fh_dentry to take a dev/ino/parentino triple instead of
a file handle, where the parentino is ignored if ino is a
directory (but start with my new find_fh_dentry from
http://www.cse.unsw.edu.au/~neilb/oss/knfsd/knfsd.1.4.7-patch-2a
if you haven't already).

change fh_verify to call it this way.

change nfsd_netlink_notify to pass xdev/xino/0 to the new
find_fh_dentry to get a dentry for the export point. Pass up to
mountd exactly the d_path for this dentry. No need for a separate
device name (and no need to make lookup_vfsmnt an exported symbol),
and no need for the path to the actual file being accessed.

make the (hopefully) obvious changes to mountd.

Actually, this is more of a symptomatic fix that a proper fix.
see
http://localhost/~neilb/oss/knfsd/mail/archive/0031.html
for my current thoughts on how it "should" work.

NeilBrown

-
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/