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

GFS2: Fix up REQ flags

Christoph has split up REQ_PRIO from REQ_META. That means that
we can drop REQ_PRIO from places where is it not needed. I'm
not at all sure that the combination WRITE_FLUSH_FUA | REQ_PRIO
makes any kind of sense, anyway.

In addition, I've added REQ_META to one place in the code where
it was missing. REQ_PRIO has been left for read/writes triggered
by glock acquisition and writeback only. We can adjust it again
if required, but these are the most important points from a
performance perspective.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>

+5 -5
+1 -1
fs/gfs2/log.c
··· 626 626 if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) 627 627 submit_bh(WRITE_SYNC | REQ_META | REQ_PRIO, bh); 628 628 else 629 - submit_bh(WRITE_FLUSH_FUA | REQ_META | REQ_PRIO, bh); 629 + submit_bh(WRITE_FLUSH_FUA | REQ_META, bh); 630 630 wait_on_buffer(bh); 631 631 632 632 if (!buffer_uptodate(bh))
+2 -2
fs/gfs2/meta_io.c
··· 435 435 if (buffer_uptodate(first_bh)) 436 436 goto out; 437 437 if (!buffer_locked(first_bh)) 438 - ll_rw_block(READ_SYNC | REQ_META | REQ_PRIO, 1, &first_bh); 438 + ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh); 439 439 440 440 dblock++; 441 441 extlen--; ··· 444 444 bh = gfs2_getbuf(gl, dblock, CREATE); 445 445 446 446 if (!buffer_uptodate(bh) && !buffer_locked(bh)) 447 - ll_rw_block(READA, 1, &bh); 447 + ll_rw_block(READA | REQ_META, 1, &bh); 448 448 brelse(bh); 449 449 dblock++; 450 450 extlen--;
+1 -1
fs/gfs2/ops_fstype.c
··· 224 224 225 225 bio->bi_end_io = end_bio_io_page; 226 226 bio->bi_private = page; 227 - submit_bio(READ_SYNC | REQ_META | REQ_PRIO, bio); 227 + submit_bio(READ_SYNC | REQ_META, bio); 228 228 wait_on_page_locked(page); 229 229 bio_put(bio); 230 230 if (!PageUptodate(page)) {
+1 -1
fs/gfs2/quota.c
··· 712 712 set_buffer_uptodate(bh); 713 713 714 714 if (!buffer_uptodate(bh)) { 715 - ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh); 715 + ll_rw_block(READ | REQ_META, 1, &bh); 716 716 wait_on_buffer(bh); 717 717 if (!buffer_uptodate(bh)) 718 718 goto unlock_out;