xfs: Add infrastructure needed for error propagation during buffer IO failure
authorCarlos Maiolino <cmaiolino@redhat.com>
Sun, 17 Sep 2017 21:06:49 +0000 (14:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Sep 2017 06:20:00 +0000 (08:20 +0200)
commit7942f605c3086abe6c9f61f29e9326c48d5c8095
treee996a1f1758e34f731006be191ddf3d83d4ee54e
parent1ba04933408e4b4567f557d363f7bdecfabe9399
xfs: Add infrastructure needed for error propagation during buffer IO failure

commit 0b80ae6ed13169bd3a244e71169f2cc020b0c57a upstream.

With the current code, XFS never re-submit a failed buffer for IO,
because the failed item in the buffer is kept in the flush locked state
forever.

To be able to resubmit an log item for IO, we need a way to mark an item
as failed, if, for any reason the buffer which the item belonged to
failed during writeback.

Add a new log item callback to be used after an IO completion failure
and make the needed clean ups.

Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_trans.h