linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <nfbrown@novell.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Weinberger <richard@nod.at>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-mtd\@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Christoph Hellwig <hch@infradead.org>,
	NFS List <linux-nfs@vger.kernel.org>
Subject: Re: Reconsidering exportable UBIFS
Date: Mon, 09 May 2016 15:03:23 +1000	[thread overview]
Message-ID: <87y47ju8kk.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20160508232533.GH2694@ZenIV.linux.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

On Mon, May 09 2016, Al Viro wrote:

> On Mon, May 09, 2016 at 08:18:22AM +1000, NeilBrown wrote:
>
>> Not puppies, just kittens.
>> 
>> If you don't provide these functions, then exporting with
>> "subtree_check" won't work.  That is no great loss except that people
>> might find the failure confusing.
>
> 	OK, a client sends you a RENAME.  With fhandles of both parents +
> old and new names in those.  Your task, should you choose to accept it, is
> to figure out whether we should fail with nfserr_inval due to an attempt
> to make a directory its own descendent.  Without being able to locate all
> ancestors of a directory.

You are right, sorry.  I was thinking that get_parent() was for finding
the parent of a non-directory, but it is for directories.  It does the
equivalent of lookup("..").  So if you have a ".." link or something
like it, it should be easy.  If you don't, it won't be easy at all.

Thanks,
NeilBrown


>
> 	You are fond of complaining about the checks that could've been left
> to server not getting skipped on the client.  Now you want to skip them on
> the server side as well?  Can't have it both ways...
>
> 	Seriously, it really doesn't work.  You can't do directory
> modifications without having found the chain of ancestors.  No ->get_parent()
> is OK _only_ for something like tmpfs, where we have the full chains of
> ancestors towards root all the time.  For UBIFS it's obviously not true.
> Not unless you suck the entire directory tree in memory at the mount time.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-05-09  5:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5702E7F5.1050807@nod.at>
2016-05-08 22:18 ` Reconsidering exportable UBIFS NeilBrown
2016-05-08 23:25   ` Al Viro
2016-05-09  5:03     ` NeilBrown [this message]
2016-05-11 14:09       ` Richard Weinberger
2016-05-11 14:10   ` Richard Weinberger

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=87y47ju8kk.fsf@notabene.neil.brown.name \
    --to=nfbrown@novell.com \
    --cc=dedekind1@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).