All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antti Tönkyrä" <daedalus@pingtimeout.net>
To: Dr Fields James Bruce <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: Patch for mapping EILSEQ into NFSERR_INVAL
Date: Wed, 04 Dec 2013 08:55:04 +0200	[thread overview]
Message-ID: <529ED1C8.70208@pingtimeout.net> (raw)
In-Reply-To: <20131203212210.GC2648@fieldses.org>

On 2013-12-03 23:22, Dr Fields James Bruce wrote:
> On Tue, Dec 03, 2013 at 03:48:06PM -0500, Dr Fields James Bruce wrote:
>> OK, it makes sense that touching a file with a bad name would get an
>> error, but you're seeing that cause later creates of files on the same
>> filesystem fail.  I can't figure out why that would happen.
> ...
>
> So maybe there's some other problem here, but...
>
>>>>> Given that widely used ntfs-3g FUSE module also returns EILSEQ on the same case (I tested this) I would argue that a fix should be done for upstream especially since RFC5661 clearly defines that invalid UTF-8 sequence should map into NFSERR_INVAL, exact quote: "Where the client sends an invalid UTF-8 string, the server should return NFS4ERR_INVAL (see Table 5)".
>>>> The NFS client will then happily map that straight into EINVAL for you...
> This seems like a spec bug?
>
> NFS4ERR_INVAL only makes sense if you could really mandate UTF-8 on the
> wire all the time.  But I don't know what other error would work.
>
> I guess a client could map INVAL to EILSEQ on open or lookup (is there
> any other reason a correct client should ever see INVAL on those ops?).
> Or do that only if fs_charset is supported and has
> FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 set.  Yuch.
>
> --b.
Hello,

I don't really think it's an issue if we don't do any mapping here 
either, I/O error is perfectly acceptable to me but the whole share 
dying is of course not very desirable...

I have been conducting my tests with ntfs-3g for now and after applying 
my patch to map EILSEQ into INVAL I didn't witness the share dying 
anymore. I captured network traffic from both cases (urls below). The 
tests were conducted so that after mounting the NFS share a file was 
opened (with w-mode) after which pcap was started. After that the 
following commands were executed:

touch `echo -e $'\some_bad_sequence'` (I tested these with \377 and \375)
<wait a bit>
touch something

http://daedalus.pingtimeout.net/dbg/eilseq_ioerr.pcap
http://daedalus.pingtimeout.net/dbg/eilseq_mapped.pcap

With mapping patch applied, the bad sequence touch returns invalid 
argument but doesn't kill the share as somewhat visible from the pcap.

BR, Antti

  reply	other threads:[~2013-12-04  6:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 20:21 Patch for mapping EILSEQ into NFSERR_INVAL Antti Tönkyrä
2013-12-02 20:45 ` Trond Myklebust
2013-12-02 20:52   ` Antti Tönkyrä
2013-12-03 20:48     ` Dr Fields James Bruce
2013-12-03 21:22       ` Dr Fields James Bruce
2013-12-04  6:55         ` Antti Tönkyrä [this message]
2013-12-04 15:41           ` Dr Fields James Bruce
2013-12-04 20:44             ` Antti Tönkyrä
2013-12-04 21:03               ` Dr Fields James Bruce
2013-12-04 21:08                 ` Antti Tönkyrä
2013-12-04 21:22                 ` Trond Myklebust
2013-12-04 21:38                   ` Dr Fields James Bruce
2013-12-04 22:49                     ` Trond Myklebust
2013-12-05  8:39                       ` Antti Tönkyrä
2013-12-04 12:33         ` Antti Tönkyrä
2013-12-04 12:40           ` Antti Tönkyrä
2013-12-04  8:31 ` Christoph Hellwig
2013-12-04 11:15   ` Antti Tönkyrä
2013-12-04 11:19     ` Christoph Hellwig
2013-12-04 11:34       ` Antti Tönkyrä
2013-12-05 19:45         ` 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=529ED1C8.70208@pingtimeout.net \
    --to=daedalus@pingtimeout.net \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.