From: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: linux-scsi@vger.kernel.org, gregkh@linuxfoundation.org,
jasowang@redhat.com, ohering@suse.com, jbottomley@parallels.com,
linux-kernel@vger.kernel.org, hch@infradead.org,
apw@canonical.com, devel@linuxdriverproject.org
Subject: [PATCH 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
Date: Thu, 24 Jul 2014 08:58:15 +0100 [thread overview]
Message-ID: <20140724075815.GD15127@sucs.org> (raw)
In-Reply-To: <20140724074739.GA15127@sucs.org>
Some block devices (such as Hyper-V passthrough SSDs) support logical
block provisioning (e.g. via UNMAP) but don't set lbpme thus disabling
discard. If the try_lbp quirk is in use skip lbpme checks that lead up
to the logical block provisioning tests.
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
---
drivers/scsi/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8249e51..8bf34bc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2559,7 +2559,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
sdkp->max_ws_blocks = (u32)get_unaligned_be64(&buffer[36]);
- if (!sdkp->lbpme)
+ if (!sdkp->lbpme && !sdkp->device->try_lbp)
goto out;
lba_count = get_unaligned_be32(&buffer[20]);
@@ -2633,7 +2633,7 @@ static void sd_read_block_provisioning(struct scsi_disk *sdkp)
unsigned char *buffer;
const int vpd_len = 8;
- if (sdkp->lbpme == 0)
+ if (sdkp->lbpme == 0 && sdkp->device->test_lbp == 0)
return;
buffer = kmalloc(vpd_len, GFP_KERNEL);
--
1.9.3
WARNING: multiple messages have this Message-ID (diff)
From: Sitsofe Wheeler <sitsofe@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, ohering@suse.com,
apw@canonical.com, jasowang@redhat.com, jbottomley@parallels.com,
hch@infradead.org, linux-scsi@vger.kernel.org
Subject: [PATCH 3/3] [SCSI] Make LBP quirk skip lbpme checks tests
Date: Thu, 24 Jul 2014 08:58:15 +0100 [thread overview]
Message-ID: <20140724075815.GD15127@sucs.org> (raw)
In-Reply-To: <20140724074739.GA15127@sucs.org>
Some block devices (such as Hyper-V passthrough SSDs) support logical
block provisioning (e.g. via UNMAP) but don't set lbpme thus disabling
discard. If the try_lbp quirk is in use skip lbpme checks that lead up
to the logical block provisioning tests.
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
---
drivers/scsi/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8249e51..8bf34bc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2559,7 +2559,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
sdkp->max_ws_blocks = (u32)get_unaligned_be64(&buffer[36]);
- if (!sdkp->lbpme)
+ if (!sdkp->lbpme && !sdkp->device->try_lbp)
goto out;
lba_count = get_unaligned_be32(&buffer[20]);
@@ -2633,7 +2633,7 @@ static void sd_read_block_provisioning(struct scsi_disk *sdkp)
unsigned char *buffer;
const int vpd_len = 8;
- if (sdkp->lbpme == 0)
+ if (sdkp->lbpme == 0 && sdkp->device->test_lbp == 0)
return;
buffer = kmalloc(vpd_len, GFP_KERNEL);
--
1.9.3
next prev parent reply other threads:[~2014-07-24 7:58 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 23:06 [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags K. Y. Srinivasan
2014-07-21 23:06 ` K. Y. Srinivasan
2014-07-23 10:04 ` Sitsofe Wheeler
2014-07-23 11:51 ` Christoph Hellwig
2014-07-23 11:51 ` Christoph Hellwig
2014-07-23 12:54 ` Sitsofe Wheeler
2014-07-23 12:54 ` Sitsofe Wheeler
2014-07-23 14:10 ` Christoph Hellwig
2014-07-23 15:31 ` Sitsofe Wheeler
2014-07-23 15:31 ` Sitsofe Wheeler
2014-07-23 15:40 ` KY Srinivasan
2014-07-23 15:40 ` KY Srinivasan
2014-07-23 15:39 ` KY Srinivasan
2014-07-23 15:39 ` KY Srinivasan
2014-07-23 14:10 ` Sitsofe Wheeler
2014-07-23 14:10 ` Sitsofe Wheeler
2014-07-23 14:15 ` Christoph Hellwig
2014-07-23 20:13 ` Sitsofe Wheeler
2014-07-23 20:13 ` Sitsofe Wheeler
2014-07-24 7:47 ` [PATCH 0/3] Enable discard on Hyper-V Sitsofe Wheeler
2014-07-24 7:47 ` Sitsofe Wheeler
2014-07-24 7:52 ` [PATCH 1/3] [SCSI] Add quirk for forcing logical block provisioning tests Sitsofe Wheeler
2014-07-24 7:52 ` Sitsofe Wheeler
2014-07-24 7:56 ` [PATCH 2/3] [SCSI] storvsc: Add Hyper-V " Sitsofe Wheeler
2014-07-24 7:56 ` Sitsofe Wheeler
2014-07-24 14:09 ` James Bottomley
2014-07-24 14:09 ` James Bottomley
2014-07-24 18:03 ` Sitsofe Wheeler
2014-07-24 18:03 ` Sitsofe Wheeler
2014-07-24 7:58 ` Sitsofe Wheeler [this message]
2014-07-24 7:58 ` [PATCH 3/3] [SCSI] Make LBP quirk skip lbpme checks tests Sitsofe Wheeler
2014-07-24 12:22 ` [PATCH v2 " Sitsofe Wheeler
2014-07-24 12:22 ` Sitsofe Wheeler
2014-07-24 13:54 ` Martin K. Petersen
2014-07-24 13:54 ` Martin K. Petersen
2014-07-24 15:34 ` Christoph Hellwig
2014-07-24 15:34 ` Christoph Hellwig
2014-07-24 15:35 ` Christoph Hellwig
2014-07-24 15:35 ` Christoph Hellwig
2014-07-24 16:24 ` Sitsofe Wheeler
2014-07-24 16:24 ` Sitsofe Wheeler
2014-07-24 15:36 ` Sitsofe Wheeler
2014-07-24 15:36 ` Sitsofe Wheeler
2014-07-24 15:54 ` Martin K. Petersen
2014-07-24 15:54 ` Martin K. Petersen
2014-07-25 16:47 ` KY Srinivasan
2014-07-25 16:47 ` KY Srinivasan
2014-07-25 16:57 ` Martin K. Petersen
2014-07-25 16:57 ` Martin K. Petersen
2014-07-26 13:44 ` KY Srinivasan
2014-07-26 13:44 ` KY Srinivasan
2014-07-26 16:54 ` Martin K. Petersen
2014-07-26 16:54 ` Martin K. Petersen
2014-07-26 17:17 ` KY Srinivasan
2014-07-26 17:17 ` KY Srinivasan
2014-07-26 19:25 ` Martin K. Petersen
2014-07-26 19:25 ` Martin K. Petersen
2014-07-27 2:09 ` KY Srinivasan
2014-07-27 2:09 ` KY Srinivasan
2014-07-28 18:50 ` KY Srinivasan
2014-07-28 19:02 ` Martin K. Petersen
2014-07-28 19:02 ` Martin K. Petersen
2014-07-28 19:05 ` KY Srinivasan
2014-07-28 19:05 ` KY Srinivasan
2014-07-28 20:02 ` James Bottomley
2014-07-28 20:02 ` James Bottomley
2014-07-28 20:05 ` KY Srinivasan
2014-07-28 20:05 ` KY Srinivasan
2014-07-29 17:41 ` KY Srinivasan
2014-07-29 17:41 ` KY Srinivasan
2014-07-29 19:30 ` Martin K. Petersen
2014-07-29 19:30 ` Martin K. Petersen
2014-07-25 17:10 ` James Bottomley
2014-07-25 17:10 ` James Bottomley
2014-07-26 13:42 ` KY Srinivasan
2014-07-26 13:42 ` KY Srinivasan
2014-07-24 12:37 ` [PATCH 0/3] Enable discard on Hyper-V Sitsofe Wheeler
2014-07-24 12:37 ` Sitsofe Wheeler
2014-07-24 5:40 ` [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags Hannes Reinecke
2014-08-01 19:48 ` Sitsofe Wheeler
2014-08-01 19:48 ` Sitsofe Wheeler
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=20140724075815.GD15127@sucs.org \
--to=sitsofe@gmail.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jasowang@redhat.com \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ohering@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.