All of lore.kernel.org
 help / color / mirror / Atom feed
From: "chenxiaosong (A)" <chenxiaosong2@huawei.com>
To: Trond Myklebust <trondmy@hammerspace.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"trondmy@kernel.org" <trondmy@kernel.org>
Cc: "smayhew@redhat.com" <smayhew@redhat.com>,
	"zhangxiaoxu5@huawei.com" <zhangxiaoxu5@huawei.com>,
	"yi.zhang@huawei.com" <yi.zhang@huawei.com>
Subject: Re: [PATCH v2 3/5] NFS: Don't report ENOSPC write errors twice
Date: Tue, 12 Apr 2022 22:25:49 +0800	[thread overview]
Message-ID: <d319b6b9-13b5-6ce0-5aba-1635fb381e15@huawei.com> (raw)
In-Reply-To: <52552874-01a4-d0da-8904-1b81659e5d1c@huawei.com>

在 2022/4/12 21:29, chenxiaosong (A) 写道:
> 在 2022/4/12 21:13, chenxiaosong (A) 写道:
> On other filesystem, wb error is only cleared when doing fsync() or sync 
> write(), it should not clear the wb error when doing async write(). Your 
> patch will clear the wb error when doing async write().
> 
> And my patchset mainly fix following problem:
> 
> filemap_sample_wb_err() always return 0 if old writeback error
> have not been consumed. filemap_check_wb_err() will return the old error
> even if there is no new writeback error between filemap_sample_wb_err() and
> filemap_check_wb_err().
> 
> ```c
>    since = filemap_sample_wb_err() = 0
>      errseq_sample
>        if (!(old & ERRSEQ_SEEN)) // nobody see the error
>          return 0;
>    nfs_wb_all // no new error
>    error = filemap_check_wb_err(..., since) != 0 // unexpected error
> ```
> 

After merging your patchset, NFS will report and clear wb error on 
_async_ write(), even there is no new wb error while nfs_wb_all, is this 
reasonable?

And more importantly, we can not detect new error by using 
filemap_sample_wb_err()/filemap_check_wb_err() while nfs_wb_all(),just 
as I described:

```c
   since = filemap_sample_wb_err() = 0
     errseq_sample
       if (!(old & ERRSEQ_SEEN)) // nobody see the error
         return 0;
   nfs_wb_all // no new error
   error = filemap_check_wb_err(..., since) != 0 // unexpected error
```
.

      reply	other threads:[~2022-04-12 14:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 21:33 [PATCH v2 0/5] Ensure mapping errors are reported only once trondmy
2022-04-11 21:33 ` [PATCH v2 1/5] NFS: Do not report EINTR/ERESTARTSYS as mapping errors trondmy
2022-04-11 21:33   ` [PATCH v2 2/5] NFS: fsync() should report filesystem errors over EINTR/ERESTARTSYS trondmy
2022-04-11 21:33     ` [PATCH v2 3/5] NFS: Don't report ENOSPC write errors twice trondmy
2022-04-11 21:33       ` [PATCH v2 4/5] NFS: Do not report flush errors in nfs_write_end() trondmy
2022-04-11 21:33         ` [PATCH v2 5/5] NFS: Don't report errors from nfs_pageio_complete() more than once trondmy
2022-04-12  6:24       ` [PATCH v2 3/5] NFS: Don't report ENOSPC write errors twice chenxiaosong (A)
2022-04-12 12:16         ` Trond Myklebust
2022-04-12 13:13           ` chenxiaosong (A)
2022-04-12 13:29             ` chenxiaosong (A)
2022-04-12 14:25               ` chenxiaosong (A) [this message]

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=d319b6b9-13b5-6ce0-5aba-1635fb381e15@huawei.com \
    --to=chenxiaosong2@huawei.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=smayhew@redhat.com \
    --cc=trondmy@hammerspace.com \
    --cc=trondmy@kernel.org \
    --cc=yi.zhang@huawei.com \
    --cc=zhangxiaoxu5@huawei.com \
    --subject='Re: [PATCH v2 3/5] NFS: Don'\''t report ENOSPC write errors twice' \
    /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

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.