summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.h
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-09-10 01:22:07 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-09-17 13:07:55 -0400
commit045d3fe766b01921e24e2d4178e011b3b09ad4d6 (patch)
treeae0d69a0181def3bea7e7387d79e61ee943cc940 /drivers/scsi/sd.h
parenta36c61f9025b8924f99f54d518763bee7aa84085 (diff)
downloadtalos-obmc-linux-045d3fe766b01921e24e2d4178e011b3b09ad4d6.tar.gz
talos-obmc-linux-045d3fe766b01921e24e2d4178e011b3b09ad4d6.zip
[SCSI] sd: Update thin provisioning support
Add support for the Thin Provisioning VPD page and use the TPU and TPWS bits to switch between UNMAP and WRITE SAME(16) for discards. If no TP VPD page is present we fall back to old scheme where the max descriptor count combined with the max lba count are used trigger UNMAP. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r--drivers/scsi/sd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index 315ce9d96b1f..a40730ee465c 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -63,6 +63,9 @@ struct scsi_disk {
unsigned first_scan : 1;
unsigned thin_provisioning : 1;
unsigned unmap : 1;
+ unsigned tpws : 1;
+ unsigned tpu : 1;
+ unsigned tpvpd : 1;
};
#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
OpenPOWER on IntegriCloud