xfs: do not add buffers to the delwri queue until pushed
authorChristoph Hellwig <hch@infradead.org>
Mon, 23 Apr 2012 05:58:38 +0000 (15:58 +1000)
committerBen Myers <bpm@sgi.com>
Mon, 14 May 2012 21:20:30 +0000 (16:20 -0500)
commit960c60af8b9481595e68875e79b2602e73169c29
tree26756622c5a0c63ead727621602cc1670604c0a3
parentfe7257fd4b8ae9a3e354d9edb61890973e373ef0
xfs: do not add buffers to the delwri queue until pushed

Instead of adding buffers to the delwri list as soon as they are logged,
even if they can't be written until commited because they are pinned
defer adding them to the delwri list until xfsaild pushes them.  This
makes the code more similar to other log items and prepares for writing
buffers directly from xfsaild.

The complication here is that we need to fail buffers that were added
but not logged yet in xfs_buf_item_unpin, borrowing code from
xfs_bioerror.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_trans_buf.c