From: bfields@fieldses.org (J. Bruce Fields)
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, david@sigma-star.at,
tytso@mit.edu, dedekind1@gmail.com, adrian.hunter@intel.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
adilger.kernel@dilger.ca, akpm@linux-foundation.org,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH 6/6] ubifs: Wire up NFS support
Date: Wed, 28 Dec 2016 21:56:50 -0500 [thread overview]
Message-ID: <20161229025650.GB21325@fieldses.org> (raw)
In-Reply-To: <1480629741-18375-7-git-send-email-richard@nod.at>
On Thu, Dec 01, 2016 at 11:02:21PM +0100, Richard Weinberger wrote:
> Since we have 64bit readdir cookies and export operations
> we can finally enable NFS export support for UBIFS.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> fs/ubifs/dir.c | 9 ++-------
> fs/ubifs/super.c | 3 +++
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 5485d836af21..13d13afd2976 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -289,11 +289,8 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry,
> done:
> kfree(dent);
> fscrypt_free_filename(&nm);
> - /*
> - * Note, d_splice_alias() would be required instead if we supported
> - * NFS.
> - */
> - d_add(dentry, inode);
> +
> + d_splice_alias(inode, dentry);
> return NULL;
I'm pretty sure that should be
return d_splice_alias(inode, dentry);
--b.
>
> out_dent:
> @@ -524,8 +521,6 @@ static unsigned int vfs_dent_type(uint8_t type)
> * properly by means of saving full directory entry name in the private field
> * of the file description object.
> *
> - * This means that UBIFS cannot support NFS which requires full
> - * 'seekdir()'/'telldir()' support.
> */
> static int ubifs_readdir(struct file *file, struct dir_context *ctx)
> {
> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
> index be5b697d8214..4cb7f641f35c 100644
> --- a/fs/ubifs/super.c
> +++ b/fs/ubifs/super.c
> @@ -2092,6 +2092,9 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
> goto out_unlock;
> }
>
> + if (c->parent_pointer && c->double_hash)
> + sb->s_export_op = &ubifs_export_ops;
> +
> /* Read the root inode */
> root = ubifs_iget(sb, UBIFS_ROOT_INO);
> if (IS_ERR(root)) {
> --
> 2.7.3
>
> --
> 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
next prev parent reply other threads:[~2016-12-29 3:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 22:02 [PATCH 0/6] UBIFS NFS export support Richard Weinberger
2016-12-01 22:02 ` [PATCH 1/6] ext4: Move is_32bit_api() to generic code Richard Weinberger
2016-12-12 22:18 ` Richard Weinberger
2016-12-12 22:29 ` Andreas Dilger
2016-12-01 22:02 ` [PATCH 2/6] ubifs: Provide a custom llseek for directories Richard Weinberger
2016-12-01 22:02 ` [PATCH 3/6] ubifs: Use 64bit readdir cookies Richard Weinberger
2016-12-29 2:58 ` J. Bruce Fields
2016-12-29 9:19 ` Richard Weinberger
2016-12-29 15:34 ` J. Bruce Fields
2016-12-29 15:49 ` Richard Weinberger
2016-12-29 16:15 ` J. Bruce Fields
2016-12-29 16:36 ` Richard Weinberger
2016-12-29 16:59 ` J. Bruce Fields
2016-12-29 17:05 ` Richard Weinberger
2017-01-03 19:52 ` J. Bruce Fields
2016-12-01 22:02 ` [PATCH 4/6] ubifs: Maintain a parent pointer Richard Weinberger
2016-12-02 9:28 ` Marcus Folkesson
2016-12-02 10:36 ` Richard Weinberger
2017-04-28 8:31 ` Hyunchul Lee
2017-04-28 9:09 ` Richard Weinberger
2016-12-01 22:02 ` [PATCH 5/6] ubifs: Implement export_operations Richard Weinberger
2016-12-01 22:02 ` [PATCH 6/6] ubifs: Wire up NFS support Richard Weinberger
2016-12-29 2:56 ` J. Bruce Fields [this message]
2016-12-29 8:48 ` Richard Weinberger
-- strict thread matches above, loose matches on Subject: below --
2017-05-21 20:20 [PATCH 0/6] UBIFS NFS export support v2 Richard Weinberger
2017-05-21 20:20 ` [PATCH 6/6] ubifs: Wire up NFS support 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=20161229025650.GB21325@fieldses.org \
--to=bfields@fieldses.org \
--cc=adilger.kernel@dilger.ca \
--cc=adrian.hunter@intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@sigma-star.at \
--cc=dedekind1@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tytso@mit.edu \
/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