Commit c1e0f8e6 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: set XBF_DONE on newly formatted btree block that are ready for writing

The btree bulkloading code calls xfs_buf_delwri_queue_here when it has
finished formatting a new btree block and wants to queue it to be
written to disk.  Once the new btree root has been committed, the blocks
(and hence the buffers) will be accessible to the rest of the
filesystem.  Mark each new buffer as DONE when adding it to the delwri
list so that the next btree traversal can skip reloading the contents
from disk.
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 13ae04d8
...@@ -342,6 +342,12 @@ xfs_btree_bload_drop_buf( ...@@ -342,6 +342,12 @@ xfs_btree_bload_drop_buf(
if (*bpp == NULL) if (*bpp == NULL)
return; return;
/*
* Mark this buffer XBF_DONE (i.e. uptodate) so that a subsequent
* xfs_buf_read will not pointlessly reread the contents from the disk.
*/
(*bpp)->b_flags |= XBF_DONE;
xfs_buf_delwri_queue_here(*bpp, buffers_list); xfs_buf_delwri_queue_here(*bpp, buffers_list);
xfs_buf_relse(*bpp); xfs_buf_relse(*bpp);
*bpp = NULL; *bpp = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment