summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-11-09 17:51:23 +0100
committerChristian Brauner <brauner@kernel.org>2026-11-11 11:59:17 +0100
commitd4fdde3257a577f184b4498d040f6fe20be72326 (patch)
treeba7a20aea692be344edd4fc3caf1d8865a2c5aae /include/linux/workqueue.h
parent05ad4c91fe2852a19d04311883420ffefb02300d (diff)
fs: set I_METADATA_WRITEBACK in mmb_mark_buffer_dirty()
ext2, ext4 without a journal, fat, udf and minix track the metadata buffers of an inode in a mapping_metadata_bhs list and sync them from ->sync_inode_metadata() and ->evict_inode(). The inode block itself is only tracked by I_METADATA_WRITEBACK which ->write_inode() sets after copying the inode into its buffer. Set the bit in mmb_mark_buffer_dirty() as well so that it covers all the metadata an inode may still have to write out. Set it after the buffer is on the list. An fsync() that sees the bit then also finds the buffer when it walks the list, and one that cleared the bit before we set it leaves it set for the next one. The inode itself may never have been dirtied. fat for example tracks the FAT buffers on a private inode that nothing marks dirty. So attach the inode to a wb before setting the bit, the way ext4_mark_iloc_dirty() does, or writeback_single_inode() has no wb to lock once evict() syncs it. That lets evict() write out everything the bit tracks in one place instead of every ->evict_inode() calling mmb_sync() itself. Suggested-by: Jan Kara <jack@suse.cz> Cc: stable@vger.kernel.org # v7.3 Link: https://patch.msgid.link/20261109-work-inode-metadata_writeback-v3-8-91ac6c024018@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions