gfs2: use bio op accessors
Separate the op from the rq_flag_bits and have gfs2 set/get the bio using bio_set_op_attrs/bio_op. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
@@ -657,7 +657,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
|
||||
struct gfs2_log_header *lh;
|
||||
unsigned int tail;
|
||||
u32 hash;
|
||||
int rw = WRITE_FLUSH_FUA | REQ_META;
|
||||
int op_flags = WRITE_FLUSH_FUA | REQ_META;
|
||||
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);
|
||||
@@ -682,12 +682,12 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
|
||||
if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) {
|
||||
gfs2_ordered_wait(sdp);
|
||||
log_flush_wait(sdp);
|
||||
rw = WRITE_SYNC | REQ_META | REQ_PRIO;
|
||||
op_flags = WRITE_SYNC | REQ_META | REQ_PRIO;
|
||||
}
|
||||
|
||||
sdp->sd_log_idle = (tail == sdp->sd_log_flush_head);
|
||||
gfs2_log_write_page(sdp, page);
|
||||
gfs2_log_flush_bio(sdp, rw);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, op_flags);
|
||||
log_flush_wait(sdp);
|
||||
|
||||
if (sdp->sd_log_tail != tail)
|
||||
@@ -738,7 +738,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl,
|
||||
|
||||
gfs2_ordered_write(sdp);
|
||||
lops_before_commit(sdp, tr);
|
||||
gfs2_log_flush_bio(sdp, WRITE);
|
||||
gfs2_log_flush_bio(sdp, REQ_OP_WRITE, 0);
|
||||
|
||||
if (sdp->sd_log_head != sdp->sd_log_flush_head) {
|
||||
log_flush_wait(sdp);
|
||||
|
مرجع در شماره جدید
Block a user