From: Christoph Hellwig <hch@infradead.org>
To: NeilBrown <neilb@suse.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
fdmanana@kernel.org, linux-btrfs@vger.kernel.org,
NFS List <linux-nfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] exportfs: be careful to only return expected errors.
Date: Thu, 4 Aug 2016 05:47:19 -0700 [thread overview]
Message-ID: <20160804124719.GA5676@infradead.org> (raw)
In-Reply-To: <877fbxperp.fsf@notabene.neil.brown.name>
On Thu, Aug 04, 2016 at 10:19:06AM +1000, NeilBrown wrote:
>
>
> When nfsd calls fh_to_dentry, it expect ESTALE or ENOMEM as errors.
> In particular it can be tempting to return ENOENT, but this is not
> handled well by nfsd.
>
> Rather than requiring strict adherence to error code code filesystems,
> treat all unexpected error codes the same as ESTALE. This is safest.
>
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>
> I didn't add a dprintk for unexpected error messages, partly
> because dprintk isn't usable in exportfs. I could have used pr_debug()
> but I really didn't see much value.
>
> This has been tested together with the btrfs change, and it restores
> correct functionality.
I don't really like all this magic which is partially historic. I think
we should instead allow the fs to return any error from the export
operations, and forbid returning NULL entirely. Then the actualy caller
(nfsd) can sort out which errors it wants to send over the wire.
next prev parent reply other threads:[~2016-08-04 12:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465491191-28102-1-git-send-email-fdmanana@kernel.org>
2016-07-22 1:08 ` [PATCH 1/2] Btrfs: be more precise on errors when getting an inode from disk NeilBrown
2016-07-22 1:59 ` J. Bruce Fields
2016-07-22 2:40 ` NeilBrown
2016-07-22 20:08 ` J. Bruce Fields
2016-08-04 0:19 ` [PATCH] exportfs: be careful to only return expected errors NeilBrown
2016-08-04 12:47 ` Christoph Hellwig [this message]
2016-08-04 20:12 ` J. Bruce Fields
2016-08-05 0:51 ` NeilBrown
2016-10-06 6:39 ` NeilBrown
2016-10-06 13:10 ` J. Bruce Fields
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=20160804124719.GA5676@infradead.org \
--to=hch@infradead.org \
--cc=bfields@fieldses.org \
--cc=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.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;
as well as URLs for NNTP newsgroup(s).