[PATCH] ide: set missing QUEUE_FLAG_ADD_RANDOM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While the whole block layer has migrated to mq framework,
QUEUE_FLAG_ADD_RANDOM is not included in QUEUE_FLAG_MQ_DEFAULT as the
default flags.

Keep 'blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, ...)' there as the
statement is self explanatory. Besides it can make the code stronger
to keep a complete if-clear-else-set statement, no matter how
QUEUE_FLAG_MQ_DEFAULT could be refactored.

Signed-off-by: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx>
---
 drivers/ide/ide-disk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 34b9441084f8..7f19af48a6e7 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -688,6 +688,9 @@ static void ide_disk_setup(ide_drive_t *drive)
 	if (ata_id_is_ssd(id)) {
 		blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
 		blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q);
+	} else {
+		blk_queue_flag_clear(QUEUE_FLAG_NONROT, q);
+		blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q);
 	}
 
 	/* calculate drive capacity, and select LBA if possible */
-- 
2.27.0




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux