Skip to contentSkip to conversation

libata: Delegate nonrot flag setting to SCSI

PATCH Applied Martin K. Petersen 2 participants 4 messages Jun 25, 2009 – Jul 29, 2009 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata: Delegate nonrot flag setting to SCSI

Now that the SCSI disk driver correctly handles non-rotational devices we can move setting the queue flag to SCSI.

---

drivers/ata/libata-scsi.c +0 -4
@@ -1119,10 +1119,6 @@ static int ata_scsi_dev_config(struct sc
 
 		blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
 	} else {
-		if (ata_id_is_ssd(dev->id))
-			queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
-						sdev->request_queue);
-
 		/* ATA devices must be sector aligned */
 		blk_queue_update_dma_alignment(sdev->request_queue,
 					       ATA_SECT_SIZE - 1);
#1 lore raw
Quoted 11 lines · Martin K. Petersen

Now that the SCSI disk driver correctly handles non-rotational devices we can move setting the queue flag to SCSI.

---

drivers/ata/libata-scsi.c static int ata_scsi_dev_config(struct sc · line 1125

Quoted 7 lines
drivers/ata/libata-scsi.c +0 -4
@@ -1119,10 +1119,6 @@ static int ata_scsi_dev_config(struct sc
 
 		blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
 	} else {
-		if (ata_id_is_ssd(dev->id))
-			queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
-						sdev->request_queue);
-

Does the existence of this code cause any problems or regressions today?

It looks correct vis a vis current drivers/scsi/sd.c, but given that the merge window just closed, I lean towards classifying this as a cleanup (thus, 2.6.32).

Jeff

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jeff" == Jeff Garzik <[email protected]> writes:

Jeff> Does the existence of this code cause any problems or regressions Jeff> today?

Nope. We set the flag twice, that's all.

Jeff> It looks correct vis a vis current drivers/scsi/sd.c, but given Jeff> that the merge window just closed, I lean towards classifying this Jeff> as a cleanup (thus, 2.6.32).

Up to you. I obviously couldn't submit this patch until the relevant SCSI bits hit Linus' tree and that didn't happen until yesterday.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
Applied
#3 lore raw
In reply to Martin K. Petersen
Quoted 11 lines · Martin K. Petersen

Now that the SCSI disk driver correctly handles non-rotational devices we can move setting the queue flag to SCSI.

---

drivers/ata/libata-scsi.c static int ata_scsi_dev_config(struct sc · line 1123

Quoted 9 lines
drivers/ata/libata-scsi.c +0 -4
@@ -1119,10 +1119,6 @@ static int ata_scsi_dev_config(struct sc
 
 		blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
 	} else {
-		if (ata_id_is_ssd(dev->id))
-			queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
-						sdev->request_queue);
-
 		/* ATA devices must be sector aligned */
 		blk_queue_update_dma_alignment(sdev->request_queue,

applied