linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <nfbrown@novell.com>
To: Richard Weinberger <richard@nod.at>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: "linux-mtd\@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Christoph Hellwig <hch@infradead.org>
Cc: NFS List <linux-nfs@vger.kernel.org>
Subject: Re: Reconsidering exportable UBIFS
Date: Mon, 09 May 2016 08:18:22 +1000	[thread overview]
Message-ID: <871t5curbl.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <5702E7F5.1050807@nod.at>

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


(added linux-nfs@vger.kernel.org)

On Tue, Apr 05 2016, Richard Weinberger wrote:

> Hi!
>
> Currently UBIFS is not exportable.
> I'm not sure whether it is completely impossible or if I just miss a detail.
> So I've some questions.
>
> Documentation/filesystems/nfs/Exporting states that the only required function
> is fh_to_dentry().
> This function should on UBIFS be implementable using generic_fh_to_dentry().
> While UBIFS reuses in theory inode numbers we can ignore i_generation as
> the flash chip is long dead before we start reusing inodes. Same as for JFFS2.
> But the same document states also that fh_to_parent() and get_parent() are optional
> but strongly recommended.
> What does this mean? Will NFS work but puppies die and turn into
> zombies?

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.


>
> Implementing get_parent() is a little unpleasant.
> UBIFS's on-flash layout does not support querying the parent.
> We could change UBIFS's struct ubifs_ino_node, but I'd change the
> on-flash layout only as last resort.
>
> The biggest problem I see is that UBIFS does not really support telldir()
> and seekdir().
> Directory offsets in UBIFS are plain hash values, so telldir()/seekdir() won't
> correctly work if UBIFS faces hash collisions.
> Currently UBIFS implements a hack which stores the UBIFS dent object into
> file->private_data such that consecutive readdir()s are guaranteed to work.
> A comment on UBIFS's readdir states:
>  * This means that UBIFS cannot support NFS which requires full
>  * 'seekdir()'/'telldir()' support.
>
> Is this still true? Maybe we can have NFS even if it is not perfect in
> terms of performance.

How big are your hashes?
ext3 messed up their readdir/telldir design too so they don't have
guaranteed unique keys.
When using 32bit hashes you can definitely get problems with
collisions.  I have not heard of problems with 64bit hashes.

I may have the details slightly wrong, but as I recall non-uniqueness of
cookies only causes a problem when the last cookie returned in a READDIR
reply matches the first cookie returned in reply to the next readdir.
So non-uniqueness is only a problem when it aligns badly.

NeilBrown


>
> Artem, did I miss another show stopper? :-)
>
> Thanks,
> //richard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

       reply	other threads:[~2016-05-08 22:18 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 ` NeilBrown [this message]
2016-05-08 23:25   ` Reconsidering exportable UBIFS Al Viro
2016-05-09  5:03     ` NeilBrown
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=871t5curbl.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=richard@nod.at \
    /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).