Patchwork libata: Delegate nonrot flag setting to SCSI

login
register
mail settings
Submitter Martin K. Petersen
Date June 25, 2009, 1:01 a.m.
Message ID <yq1eit9rurq.fsf@sermon.lab.mkp.net>
Download mbox | patch
Permalink /patch/29147/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Martin K. Petersen - June 25, 2009, 1:01 a.m.
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 <martin.petersen@oracle.com>

---

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik - June 25, 2009, 1:36 a.m.
Martin K. Petersen wrote:
> 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 <martin.petersen@oracle.com>
> 
> ---
> 
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -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




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen - June 25, 2009, 2:46 a.m.
>>>>> "Jeff" == Jeff Garzik <jeff@garzik.org> 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.
Jeff Garzik - July 29, 2009, 1:16 a.m.
Martin K. Petersen wrote:
> 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 <martin.petersen@oracle.com>
> 
> ---
> 
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -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


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -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);