Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f0b9b63 authored by Jan Kara's avatar Jan Kara
Browse files

gfs2: Make flush bios explicitely sync



Commit b685d3d6 "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.

Fixes: b685d3d6
CC: Steven Whitehouse <swhiteho@redhat.com>
CC: cluster-devel@redhat.com
CC: stable@vger.kernel.org
Acked-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent fde8e33d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -659,7 +659,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
	struct 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);