Skip to content

Commit a5bf4df

Browse files
namhyungneilbrown
authored andcommitted
md: use REQ_NOIDLE flag in md_super_write()
Queue idling is used for the anticipation of immediate sequencial I/O's but md_super_write() is a kind of one- shot operation, coupled with md_super_wait(), so the idling in this case will be just a waste of time. Specifying REQ_NOIDLE prevents it. Instead of adding the flag to submit_bio() directly, use pre-defined macro WRITE_FLUSH_FUA. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
1 parent aeb9b21 commit a5bf4df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/md/md.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
848848
bio->bi_end_io = super_written;
849849

850850
atomic_inc(&mddev->pending_writes);
851-
submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
851+
submit_bio(WRITE_FLUSH_FUA, bio);
852852
}
853853

854854
void md_super_wait(mddev_t *mddev)

0 commit comments

Comments
 (0)