Patch "gfs2: Make flush bios explicitely sync" has been added to the 4.11-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
gfs2: Make flush bios explicitely sync
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gfs2-make-flush-bios-explicitely-sync.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
0f0b9b63e14fc3f66e4d342df016c9b071c5abedMon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Tue, 2 May 2017 13:14:13 +0200
Subject: gfs2: Make flush bios explicitely sync
From: Jan Kara <[email protected]>
commit 0f0b9b63e14fc3f66e4d342df016c9b071c5abed upstream.
Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions
Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC.
--- fs/gfs2/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/log.c +1 -1
@@ -659,7 +659,7 @@ static void log_write_header(struct gfs2struct gfs2_log_header *lh;unsigned int tail;u32 hash; -int op_flags =REQ_PREFLUSH |REQ_FUA |REQ_META ; +int op_flags =REQ_PREFLUSH |REQ_FUA |REQ_META |REQ_SYNC ;struct page *page =mempool_alloc (gfs2_page_pool,GFP_NOIO );enum gfs2_freeze_state state =atomic_read (&sdp->sd_freeze_state); lh =page_address (page);
Patches currently in stable-queue which might be from [email protected] are
queue-4.11/gfs2-make-flush-bios-explicitely-sync.patch