From: shaohua.li@intel.com
To: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Cc: jaxboe@fusionio.com, htejun@gmail.com, hch@infradead.org,
jgarzik@pobox.com, djwong@us.ibm.com, sshtylyov@mvista.com,
Shaohua Li <shaohua.li@intel.com>
Subject: [patch v3 3/3] SATA: enable non-queueable flush flag
Date: Thu, 05 May 2011 09:59:35 +0800 [thread overview]
Message-ID: <20110505020417.986492128@sli10-conroe.sh.intel.com> (raw)
In-Reply-To: <20110505015932.306763905@sli10-conroe.sh.intel.com>
[-- Attachment #1: sata-add-nonqueueable.patch --]
[-- Type: text/plain, Size: 1868 bytes --]
Enable non-queueable flush flag for SATA.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
drivers/ata/libata-scsi.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
Index: linux/drivers/ata/libata-scsi.c
===================================================================
--- linux.orig/drivers/ata/libata-scsi.c 2011-05-05 09:09:58.000000000 +0800
+++ linux/drivers/ata/libata-scsi.c 2011-05-05 09:46:07.000000000 +0800
@@ -1089,21 +1089,21 @@ static int atapi_drain_needed(struct req
static int ata_scsi_dev_config(struct scsi_device *sdev,
struct ata_device *dev)
{
+ struct request_queue *q = sdev->request_queue;
+
if (!ata_id_has_unload(dev->id))
dev->flags |= ATA_DFLAG_NO_UNLOAD;
/* configure max sectors */
- blk_queue_max_hw_sectors(sdev->request_queue, dev->max_sectors);
+ blk_queue_max_hw_sectors(q, dev->max_sectors);
if (dev->class == ATA_DEV_ATAPI) {
- struct request_queue *q = sdev->request_queue;
void *buf;
sdev->sector_size = ATA_SECT_SIZE;
/* set DMA padding */
- blk_queue_update_dma_pad(sdev->request_queue,
- ATA_DMA_PAD_SZ - 1);
+ blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);
/* configure draining */
buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
@@ -1131,8 +1131,7 @@ static int ata_scsi_dev_config(struct sc
"sector_size=%u > PAGE_SIZE, PIO may malfunction\n",
sdev->sector_size);
- blk_queue_update_dma_alignment(sdev->request_queue,
- sdev->sector_size - 1);
+ blk_queue_update_dma_alignment(q, sdev->sector_size - 1);
if (dev->flags & ATA_DFLAG_AN)
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
@@ -1145,6 +1144,8 @@ static int ata_scsi_dev_config(struct sc
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
}
+ blk_queue_flush_queueable(q, false);
+
dev->sdev = sdev;
return 0;
}
next prev parent reply other threads:[~2011-05-05 2:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 1:59 [patch v3 0/3] block: optimize flush for non-queueable flush drive shaohua.li
2011-05-05 1:59 ` [patch v3 1/3] block: add a non-queueable flush flag shaohua.li
2011-05-05 2:17 ` Jeff Garzik
2011-05-05 2:21 ` Shaohua Li
2011-05-05 7:53 ` Tejun Heo
2011-05-05 1:59 ` [patch v3 2/3] block: hold queue if flush is running for non-queueable flush drive shaohua.li
2011-05-05 8:38 ` Tejun Heo
2011-05-06 4:32 ` Shaohua Li
2011-05-06 6:53 ` Tejun Heo
2011-05-06 17:28 ` Jens Axboe
2011-05-09 13:03 ` Vivek Goyal
2011-05-09 13:50 ` Shaohua Li
2011-05-09 13:58 ` Vivek Goyal
2011-05-09 14:37 ` Tejun Heo
2011-05-05 1:59 ` shaohua.li [this message]
2011-05-05 7:54 ` [patch v3 3/3] SATA: enable non-queueable flush flag Tejun Heo
2011-05-05 12:33 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110505020417.986492128@sli10-conroe.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=djwong@us.ibm.com \
--cc=hch@infradead.org \
--cc=htejun@gmail.com \
--cc=jaxboe@fusionio.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sshtylyov@mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®