From: Neil Brown <neilb@cse.unsw.edu.au>
To: Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
Cc: Frank.Olsen@stonesoft.com, linux-kernel@vger.kernel.org (kernel list)
Subject: Re: Bugs in knfsd -- Problem re-exporting an NFS share
Date: Wed, 3 Jan 2001 15:09:36 +1100 (EST) [thread overview]
Message-ID: <14930.42496.545862.426153@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from Andrzej Krzysztofowicz on Saturday December 30
In-Reply-To: <200012302043.VAA10260@green.mif.pg.gda.pl>
On Saturday December 30, ankry@green.mif.pg.gda.pl wrote:
>
> > On Friday December 29, Frank.Olsen@stonesoft.com wrote:
> > > Hi -- could you please CC me if you reply to this mail.
> > >
> > > A: /exports/A - Redhat 7.0
> > > B1/B2: mount /exports/A on /export/A from A - Redhat 6.2
> > > C: mount /exports/A on /mnt/A from B1 or B2 - Redhat 6.2
> > >
> > > I use knfsd/nfs-utils on each machine.
> > >
> > > bash# ls /mnt/A
> > > /mnt/A/A.txt: No such file or directory
> >
> > This is not a supported configuration. You cannot export NFS mounted
> > filesystems with NFS. The protocol does not cope, and it
> > implementation doesn't even try.
> > NFS is for export local filesystems only.
>
> As I understand problem is somewhere else.
> If this is intentionally unsupported configuration - OK. So why the error
> appears ? The directory should be empty then.
>
> If the configuration is unsupported at the moment and the A.txt file is
> located on A, some code that attempts to read re-exported files/directories
> should be turned off (eg. #if 0).
>
> If the A.txt file is local for B1/B2 hosts, it is (IMHO) an obvious bug.
> Sucgh a file should be hidden at the act of mounting. For both local and
> remote access.
>
> Neil, could you tell us where the A.txt file is *really* located ?
Well.... its a long story.
The interface between knfsd and filesystems is not (currently) a clean
one. The current interface to filesystems is dictated by the VFS
layer, and it works primarily in terms of names.
knfsd wants to work in terms of inode numbers (or something similar)
and there is no such interface.
knfsd does manage to do its job, but only by abusing part of the VFS
interface - the "iget" routine which calls s_op->read_inode.
iget is meant to be an private interface, only ever called by the
filesystem itself (typically in the lookup operation) but, for ext2 at
least, it works for knfsd, so knfsd uses it.
Basically, knfsd assumes that is a filesystem has "read_inode"
defined, then it can safely use iget.
This works for ext2, but not for nfs.
The nfs filesystem does define read_inode, but uses it quite
differently to ext2.
The net result is that when you try to map an inode number to an inode
using iget with ext2 it always works, but if you do it with nfs it only
works if the inode is already in the cache.
So, when you:
ls /mnt/A
from C, knfsd on B1 (or B2) tries to find the directory 'A' and
succeeds beause it is in cache. It does a readdir on this directory
and gets a list of files including "A.txt".
But when it tries to access A.txt, iget doesn't work for it, and it
cannot find it.
So A.txt is really on A, not on B1 or B2. But when you look at A.txt
from C through B1 or B2 you only get a blurred image. You can see
that it is there, but not what it is.
Does that help?
NeilBrown
>
> Regards
> Andrzej
>
> BTW. AFAIR, I observed similar behaviour (files are visible but
> inaccessible) while mounting a local filesystem at a busy directory
> (eg.: mount /dev/fd0 .;ls -l) even in 2.2...
>
> --
> =======================================================================
> Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl
> phone (48)(58) 347 14 61
> Faculty of Applied Phys. & Math., Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-03 4:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-30 20:43 Andrzej Krzysztofowicz
2001-01-03 4:09 ` Neil Brown [this message]
2001-01-03 10:37 ` Jorge L. deLyra
2001-01-03 10:52 ` Andi Kleen
2001-01-03 11:14 ` Jorge L. deLyra
2001-01-03 12:06 ` Andi Kleen
2001-01-03 12:49 ` Jorge L. deLyra
2001-01-03 13:01 ` Andi Kleen
2001-01-03 13:56 ` Jorge L. deLyra
2001-01-06 19:22 ` Jorge L. deLyra
-- strict thread matches above, loose matches on Subject: below --
2000-12-29 17:33 Frank.Olsen
2000-12-29 21:30 ` Neil Brown
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=14930.42496.545862.426153@notabene.cse.unsw.edu.au \
--to=neilb@cse.unsw.edu.au \
--cc=Frank.Olsen@stonesoft.com \
--cc=ankry@green.mif.pg.gda.pl \
--cc=linux-kernel@vger.kernel.org \
/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®