Re: [PATCH v2 3/5] NFS: Don't report ENOSPC write errors twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 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
```
.



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux