All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: don't preempt writeback on page errors
@ 2018-10-31 14:01 Brian Foster
  2018-10-31 14:01 ` [PATCH 1/2] xfs: add writepage map error tag Brian Foster
  2018-10-31 14:01 ` [PATCH 2/2] xfs: don't preempt writeback sequence on single page wb error Brian Foster
  0 siblings, 2 replies; 7+ messages in thread
From: Brian Foster @ 2018-10-31 14:01 UTC (permalink / raw)
  To: linux-xfs

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(-)

-- 
2.17.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-02 20:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 14:01 [PATCH 0/2] xfs: don't preempt writeback on page errors Brian Foster
2018-10-31 14:01 ` [PATCH 1/2] xfs: add writepage map error tag Brian Foster
2018-10-31 14:01 ` [PATCH 2/2] xfs: don't preempt writeback sequence on single page wb error Brian Foster
2018-10-31 23:02   ` Dave Chinner
2018-11-01 14:17     ` Brian Foster
2018-11-01 21:37       ` Dave Chinner
2018-11-02 11:42         ` Brian Foster

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.