Skip to content

Commit

Permalink
md: use REQ_NOIDLE flag in md_super_write()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Namhyung Kim authored and NeilBrown committed Aug 25, 2011
1 parent aeb9b21 commit a5bf4df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
bio->bi_end_io = super_written;

atomic_inc(&mddev->pending_writes);
submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
submit_bio(WRITE_FLUSH_FUA, bio);
}

void md_super_wait(mddev_t *mddev)
Expand Down

0 comments on commit a5bf4df

Please sign in to comment.