Whamcloud - gitweb
LU-11187 ldiskfs: don't mark mmp buffer head dirty
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.6 / ext4-mmp-dont-mark-bh-dirty.patch
1 From fe18d649891d813964d3aaeebad873f281627fbc Mon Sep 17 00:00:00 2001
2 From: Li Dongyang <dongyangli@ddn.com>
3 Date: Sat, 15 Sep 2018 17:11:25 -0400
4 Subject: [PATCH] ext4: don't mark mmp buffer head dirty
5
6 Marking mmp bh dirty before writing it will make writeback
7 pick up mmp block later and submit a write, we don't want the
8 duplicate write as kmmpd thread should have full control of
9 reading and writing the mmp block.
10 Another reason is we will also have random I/O error on
11 the writeback request when blk integrity is enabled, because
12 kmmpd could modify the content of the mmp block(e.g. setting
13 new seq and time) while the mmp block is under I/O requested
14 by writeback.
15
16 Signed-off-by: Li Dongyang <dongyangli@ddn.com>
17 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
18 Reviewed-by: Andreas Dilger <adilger@dilger.ca>
19 Cc: stable@vger.kernel.org
20 ---
21  fs/ext4/mmp.c | 1 -
22  1 file changed, 1 deletion(-)
23
24 Index: linux-stage/fs/ext4/mmp.c
25 ===================================================================
26 --- linux-stage.orig/fs/ext4/mmp.c
27 +++ linux-stage/fs/ext4/mmp.c
28 @@ -18,7 +18,6 @@ static int write_mmp_block(struct super_
29          * on frozen filesystem.
30          */
31         sb_start_write(sb);
32 -       mark_buffer_dirty(bh);
33         lock_buffer(bh);
34         bh->b_end_io = end_buffer_write_sync;
35         get_bh(bh);