]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: mark inode buffers in cache
authorDave Chinner <dchinner@redhat.com>
Mon, 29 Jun 2020 21:48:46 +0000 (14:48 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Jul 2020 17:46:58 +0000 (10:46 -0700)
commit21a1a46d1b8a770e1fd03f4b55e79ea026982f50
tree4190924b5e494b4253b5a9b69a6c7b88aa93dce7
parent47bf2b988f728473e5702db05abd07bfb9f7f86a
xfs: mark inode buffers in cache

Inode buffers always have write IO callbacks, so by marking them
directly we can avoid needing to attach ->b_iodone functions to
them. This avoids an indirect call, and makes future modifications
much simpler.

While this is largely a refactor of existing functionality, we
broaden the scope of the flag to beyond where inodes are explicitly
attached because future changes need to know what type of log items
are attached to the buffer. Adding this buffer flag may invoke the
inode iodone callback in cases where it wouldn't have been
previously, but this is not a functional change because the callback
is identical to the normal buffer write iodone callback when inodes
are not attached.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_trans_buf.c