summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_aops.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2016-04-06 08:12:28 +1000
committerDave Chinner <david@fromorbit.com>2016-04-06 08:12:28 +1000
commit37992c18bba3f578860c6448b7bae18a14e535d3 (patch)
tree9598b6b0af53ccdec9d3c650df4f82efc16c3ed3 /fs/xfs/xfs_aops.h
parentbb18782aa47d8cde90fed5cb0af312642e98a4fa (diff)
xfs: don't release bios on completion immediately
Completion of an ioend requires us to walk the bufferhead list to end writback on all the bufferheads. This, in turn, is needed so that we can end writeback on all the pages we just did IO on. To remove our dependency on bufferheads in writeback, we need to turn this around the other way - we need to walk the pages we've just completed IO on, and then walk the buffers attached to the pages and complete their IO. In doing this, we remove the requirement for the ioend to track bufferheads directly. To enable IO completion to walk all the pages we've submitted IO on, we need to keep the bios that we used for IO around until the ioend has been completed. We can do this simply by chaining the bios to the ioend at completion time, and then walking their pages directly just before destroying the ioend. Signed-off-by: Dave Chinner <dchinner@redhat.com> [hch: changed the xfs_finish_page_writeback calling convention] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_aops.h')
-rw-r--r--fs/xfs/xfs_aops.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_aops.h b/fs/xfs/xfs_aops.h
index 8947991e0990..61a3dc3dbdf8 100644
--- a/fs/xfs/xfs_aops.h
+++ b/fs/xfs/xfs_aops.h
@@ -46,13 +46,14 @@ typedef struct xfs_ioend {
int io_error; /* I/O error code */
atomic_t io_remaining; /* hold count */
struct inode *io_inode; /* file being written to */
- struct buffer_head *io_buffer_head;/* buffer linked list head */
- struct buffer_head *io_buffer_tail;/* buffer linked list tail */
size_t io_size; /* size of the extent */
xfs_off_t io_offset; /* offset in the file */
struct work_struct io_work; /* xfsdatad work queue */
struct xfs_trans *io_append_trans;/* xact. for size update */
struct bio *io_bio; /* bio being built */
+ struct bio *io_bio_done; /* bios completed */
+ struct bio *io_bio_done_tail; /* bios completed */
+ spinlock_t io_lock; /* for bio completion list */
} xfs_ioend_t;
extern const struct address_space_operations xfs_address_space_operations;