xfs: don't preempt writeback on page errors
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | xfs: add writepage map error tagfs/ fs/ fs/ | +12 | 0 replies | |
| 2/2 | xfs: don't preempt writeback sequence on single page wb errorfs/ | +8 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] xfs: don't preempt writeback on page errors
Hi all,
Here's a stab at a fix for the issue demonstrated by the previously posted xfstest [1]. This basically just filters out error returns to write_cache_pages() and returns the first encountered error from the higher level ->writepage[s]() call. AFAICT the end result should be the same as today in the event of a persistent writeback error.
I'm not totally sure if this is the best solution, but it's the simplest that comes to mind. FWIW, this patch changes error return behavior unconditionally. A slightly modified approach might be to only filter errors as such on integrity writeback so background writeback will presumably behave as it always has, while allowing fsync/unmount to process the address space in one writeback job.
If there's a reason we want to preserve the current writeback behavior in general, I suppose we could consider more involved options like tag any inode that preempts writeback due to error and then make sure we process/scan/clear such inodes of delalloc blocks before we unmount (and/or on fsync). Either way, we may also want to consider rate limiting the "page discard" errors if it's more likely we dump a bunch at once.
Thoughts?
Brian
[1] https://marc.info/?l=linux-xfs&m=154031860122440&w=2
Brian Foster (2):
xfs: add writepage map error tag
xfs: don't preempt writeback sequence on single page wb error
fs/xfs/libxfs/xfs_errortag.h | 4 +++- fs/xfs/xfs_aops.c | 19 ++++++++++++++----- fs/xfs/xfs_error.c | 3 +++ 3 files changed, 20 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.2