提交 a98239de 编写于 作者: J Jens Axboe

ide-disk: update to using blk_queue_write_cache()

Signed-off-by: NJens Axboe <axboe@fb.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 bfd230ac
...@@ -522,7 +522,7 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) ...@@ -522,7 +522,7 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect)
static void update_flush(ide_drive_t *drive) static void update_flush(ide_drive_t *drive)
{ {
u16 *id = drive->id; u16 *id = drive->id;
unsigned flush = 0; bool wc = false;
if (drive->dev_flags & IDE_DFLAG_WCACHE) { if (drive->dev_flags & IDE_DFLAG_WCACHE) {
unsigned long long capacity; unsigned long long capacity;
...@@ -546,12 +546,12 @@ static void update_flush(ide_drive_t *drive) ...@@ -546,12 +546,12 @@ static void update_flush(ide_drive_t *drive)
drive->name, barrier ? "" : "not "); drive->name, barrier ? "" : "not ");
if (barrier) { if (barrier) {
flush = REQ_FLUSH; wc = true;
blk_queue_prep_rq(drive->queue, idedisk_prep_fn); blk_queue_prep_rq(drive->queue, idedisk_prep_fn);
} }
} }
blk_queue_flush(drive->queue, flush); blk_queue_write_cache(drive->queue, wc, false);
} }
ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册