From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Frank Cusack <fcusack@fcusack.com>
Cc: torvalds@transmeta.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nfs_unlink() again, and trivial nfs_fhget
Date: Sun, 22 Jun 2003 09:29:03 +0200 [thread overview]
Message-ID: <16117.23231.499556.86004@charged.uio.no> (raw)
In-Reply-To: <20030621184623.A29657@google.com>
>>>>> " " == Frank Cusack <fcusack@fcusack.com> writes:
> It's to prevent RENAME of silly-renamed files. Doing so in VFS
> is a one-liner, and I agree that the VFS should be as clean as
> possible, but let's face it, the VFS *must* have specific fs
> knowledge. eg, the ALWAYS_REVAL (something like that) patch
> you recently submitted is just to treat NFS differently than
> other fs's. Just because the flag doesn't have "NFS" in it
> doesn't make it generic. (And so I repeat my earlier
> suggestion that might make the change more palatable: rename
> the NFSFS_RENAMED flag to DONT_UNLINK.)
On the contrary: The VFS should *avoid* specific fs knowledge
whereever possible.
In this case:
- we *can* do this test in nfs_rename() itself without needing any
extra VFS support.
- No other filesystems have expressed a need for such a flag, so
we're hardly covering a common need.
Those are 2 good reasons for doing the modification in the NFS code.
And no - NFSFS_RENAMED, and DONT_UNLINK are *not* the same concept.
Renaming sillyrenamed files would be quite acceptable as long as you
don't allow *cross-directory* renames. All other cases are fixable...
> I hate to keep following up myself, but I forgot one point I
> had in mind: other code in may_delete() is already fs-specific.
>
> IS_APPEND
> IS_IMMUTABLE
> check_sticky
>
> These things aren't generic, they require specific support from
> the fs.
For starters, check_sticky has no business being in may_delete(), as
it breaks NFS (i.e. it should really be part of vfs_permission()).
All these comparisons of our local uid/gids or capabilities with
remote object uid/gids are broken.
That said, there is a huge leap between the 2 assertions that "some
special cases appear in the VFS." to "all special case must be done in
the VFS".
Cheers,
Trond
prev parent reply other threads:[~2003-06-22 7:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 12:14 Frank Cusack
2003-06-17 18:41 ` Trond Myklebust
2003-06-17 23:55 ` Frank Cusack
2003-06-18 0:06 ` Frank Cusack
2003-06-18 23:40 ` Trond Myklebust
2003-06-22 1:46 ` Frank Cusack
2003-06-22 1:56 ` Frank Cusack
2003-06-22 7:29 ` Trond Myklebust [this message]
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=16117.23231.499556.86004@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=fcusack@fcusack.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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®