libata: Delegate nonrot flag setting to SCSI
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 scblk_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 );
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.
Signed-off-by Martin K. Petersen <[email protected]>---
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 scblk_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
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
Jeff Garzik
AppliedQuoted 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.
Signed-off-by Martin K. Petersen <[email protected]>---
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 scblk_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