Skip to content

vfs: track per-sb writeback errors and report them via fsinfo()

Jeff Layton linux-fsdevel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v15 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vfs: track per-sb writeback errorsinclude/linux/fs.h include/linux/pagemap.h+7 -10 replies
2/4errseq: add a new errseq_scrape functioninclude/linux/errseq.h lib/errseq.c+32 -20 replies
3/4vfs: allow fsinfo to fetch the current state of s_wb_errfs/statfs.c include/uapi/linux/fsinfo.h+20 -00 replies
4/4samples: extend test-fsinfo to access error_statesamples/statx/test-fsinfo.c+13 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid HowellsCarlos Maiolino
SeriesR-b R-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] vfs: track per-sb writeback errors and report them via fsinfo()

v2: drop buffer.c patch to record wb errors when underlying blockdev flush fails. We may eventually want that, but at this point I don't have a clear way to test it to determine its efficacy.

At LSF/MM this year, the PostgreSQL developers mentioned that they'd like to have some mechanism to check whether there have been any writeback errors on a filesystem, without necessarily flushing any of the cached data first.

Given that we have a new fsinfo syscall being introduced, we may as well use it to report writeback errors on a per superblock basis. This allows us to provide the info that the PostgreSQL developers wanted, without needing to change an existing interface.

This seems to do the right thing when tested by hand, but I don't yet have an xfstest for it, since the syscall is still quite new. Once that goes in and we get fsinfo support in xfs_io, it should be rather trivial to roll a testcase for this.

Al, if this looks ok, could you pull this into the branch where you have David's fsinfo patches queued up?

Thanks,
Jeff

Jeff Layton (4):
vfs: track per-sb writeback errors
errseq: add a new errseq_scrape function
vfs: allow fsinfo to fetch the current state of s_wb_err
samples: extend test-fsinfo to access error_state

 fs/statfs.c                 |  9 +++++++++
 include/linux/errseq.h      |  1 +
 include/linux/fs.h          |  3 +++
 include/linux/pagemap.h     |  5 ++++-
 include/uapi/linux/fsinfo.h | 11 +++++++++++
 lib/errseq.c                | 33 +++++++++++++++++++++++++++++++--
 samples/statx/test-fsinfo.c | 13 +++++++++++++
 7 files changed, 72 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1