diff options
author | Ritesh Harjani (IBM) <ritesh.list@gmail.com> | 2023-04-21 11:46:12 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-05-16 11:32:42 +0200 |
commit | 31b2ebc0929e964f4edfbfa7129d43f7e3c17165 (patch) | |
tree | 7dffe7cab84d3b01029d2e0a5c1ebd38b290e411 /fs/ext4/fsync.c | |
parent | ext2/dax: Fix ext2_setsize when len is page aligned (diff) | |
download | linux-31b2ebc0929e964f4edfbfa7129d43f7e3c17165.tar.xz linux-31b2ebc0929e964f4edfbfa7129d43f7e3c17165.zip |
fs/buffer.c: Add generic_buffers_fsync*() implementation
Some of the higher layers like iomap takes inode_lock() when calling
generic_write_sync().
Also writeback already happens from other paths without inode lock,
so it's difficult to say that we really need sync_mapping_buffers() to
take any inode locking here. Having said that, let's add
generic_buffers_fsync/_noflush() implementation in buffer.c with no
inode_lock/unlock() for now so that filesystems like ext2 and
ext4's nojournal mode can use it.
Ext4 when got converted to iomap for direct-io already copied it's own
variant of __generic_file_fsync() without lock.
This patch adds generic_buffers_fsync()
& generic_buffers_fsync_noflush() implementations for use in filesystems
like ext2 & ext4 respectively.
Later we can review other filesystems as well to see if we can make
generic_buffers_fsync/_noflush() which does not take any inode_lock() as
the default path.
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <d573408ac8408627d23a3d2d166e748c172c4c9e.1682069716.git.ritesh.list@gmail.com>
Diffstat (limited to 'fs/ext4/fsync.c')
0 files changed, 0 insertions, 0 deletions