All of lore.kernel.org
 help / color / mirror / Atom feed
From: "chenxiaosong (A)" <chenxiaosong2@huawei.com>
To: Trond Myklebust <trondmy@hammerspace.com>,
	"anna@kernel.org" <anna@kernel.org>,
	"smayhew@redhat.com" <smayhew@redhat.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"liuyongqiang13@huawei.com" <liuyongqiang13@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"yi.zhang@huawei.com" <yi.zhang@huawei.com>,
	"zhangxiaoxu5@huawei.com" <zhangxiaoxu5@huawei.com>
Subject: Re: [PATCH -next 1/2] nfs: nfs{,4}_file_flush should consume writeback error
Date: Mon, 9 May 2022 15:43:13 +0800	[thread overview]
Message-ID: <b68595e0-68e2-a194-ea93-a96decbdbb8f@huawei.com> (raw)
In-Reply-To: <a3300d4d-6428-8157-b2dc-eaeb9f249858@huawei.com>

在 2022/4/20 16:50, chenxiaosong (A) 写道:
> 在 2022/4/12 22:27, Trond Myklebust 写道:
> 
>>
>> It will clear ENOSPC, EDQUOT and EFBIG. It should not clear other
>> errors that are not supposed to be reported by write().
>>
>> As I keep repeating, that is _documented behaviour_!
>>
> 
> Hi Trond:
> 
> You may mean that write(2) manpage described:
> 
>> Since Linux 4.13, errors from write-back come with a promise that
>> they may be reported by subsequent.  write(2) requests, and will be
>> reported by a subsequent fsync(2) (whether or not they were also
>> reported by write(2)).
> 
> The manpage mentioned that "reported by a subsequent fsync(2)", your 
> patch[1] clear the wb err on _async_ write(), and wb err will _not_ be 
> reported by subsequent fsync(2), is it documented behaviour?
> 
> All other filesystems will _not_ clear any wb err on _async_ write().
> 
> [1] 
> https://patchwork.kernel.org/project/linux-nfs/patch/20220411213346.762302-4-trondmy@kernel.org/ 
> 


Hi Trond:

write(2) manpage described:

> On some filesystems, including NFS, it does not even guarantee that
> space has successfully been reserved for the data.  In this case, some
> errors might be delayed until a future write(2), fsync(2), or even
> close(2).  The only way to be sure is to call fsync(2) after you are
> done writing all your data.

Maybe it mean that: writeback errors of NFS is delayed until future sync 
write() and fsync(), because sync write() will call fsync(). We all 
agreed that close()->flush() should not clear writeback errors, should 
async write() do the same thing like other filesystems?

  reply	other threads:[~2022-05-09  7:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 12:46 [PATCH -next 0/2] nfs: check writeback errors correctly ChenXiaoSong
2022-03-05 12:46 ` [PATCH -next 1/2] nfs: nfs{,4}_file_flush should consume writeback error ChenXiaoSong
2022-03-05 16:53   ` Trond Myklebust
2022-03-06  3:54     ` chenxiaosong (A)
2022-03-06 14:04       ` Trond Myklebust
2022-03-06 15:08         ` Trond Myklebust
2022-04-12 13:46           ` chenxiaosong (A)
2022-04-12 13:56             ` Trond Myklebust
2022-04-12 14:12               ` chenxiaosong (A)
2022-04-12 14:27                 ` Trond Myklebust
2022-04-20  8:50                   ` chenxiaosong (A)
2022-05-09  7:43                     ` chenxiaosong (A) [this message]
2022-03-05 12:46 ` [PATCH -next 2/2] nfs: nfs_file_write() check writeback errors correctly ChenXiaoSong
2022-03-05 17:12   ` Trond Myklebust
2022-03-06  8:50     ` chenxiaosong (A)

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=b68595e0-68e2-a194-ea93-a96decbdbb8f@huawei.com \
    --to=chenxiaosong2@huawei.com \
    --cc=anna@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=liuyongqiang13@huawei.com \
    --cc=smayhew@redhat.com \
    --cc=trondmy@hammerspace.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhangxiaoxu5@huawei.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.