Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: mark metadata blocks using bh flags

This allows metadata writebacks which are issued via block device
writeback to be sent with the current write request flags.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

+7 -1
+2
fs/ext4/ext4_jbd2.c
··· 215 215 216 216 might_sleep(); 217 217 218 + set_buffer_meta(bh); 219 + set_buffer_prio(bh); 218 220 if (ext4_handle_valid(handle)) { 219 221 err = jbd2_journal_dirty_metadata(handle, bh); 220 222 if (err) {
+5 -1
fs/ext4/inode.c
··· 1080 1080 /* For write_end() in data=journal mode */ 1081 1081 static int write_end_fn(handle_t *handle, struct buffer_head *bh) 1082 1082 { 1083 + int ret; 1083 1084 if (!buffer_mapped(bh) || buffer_freed(bh)) 1084 1085 return 0; 1085 1086 set_buffer_uptodate(bh); 1086 - return ext4_handle_dirty_metadata(handle, NULL, bh); 1087 + ret = ext4_handle_dirty_metadata(handle, NULL, bh); 1088 + clear_buffer_meta(bh); 1089 + clear_buffer_prio(bh); 1090 + return ret; 1087 1091 } 1088 1092 1089 1093 /*