diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2012-02-13 15:39:00 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 09:39:09 -0600 |
commit | 89730393f260aef7fce9f6fd475da148517a4c5c (patch) | |
tree | f01e8f64dfd43dc38c27f4f1d8be45ed2f43346d /drivers/scsi/sd.c | |
parent | 66a651aa7a48b7c6181aff556937454c87bb9feb (diff) | |
download | talos-op-linux-89730393f260aef7fce9f6fd475da148517a4c5c.tar.gz talos-op-linux-89730393f260aef7fce9f6fd475da148517a4c5c.zip |
[SCSI] sd: Make sure provisioning mode is reported correctly
The provisioning_mode parameter in sysfs did not get updated in the
SD_LBP_DISABLE case. Make sure the provisioning mode is always set
correctly.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c691fb50e6cb..8c525aa1b858 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -497,6 +497,8 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode) max(sdkp->physical_block_size, sdkp->unmap_granularity * logical_block_size); + sdkp->provisioning_mode = mode; + switch (mode) { case SD_LBP_DISABLE: @@ -524,8 +526,6 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode) q->limits.max_discard_sectors = max_blocks * (logical_block_size >> 9); queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); - - sdkp->provisioning_mode = mode; } /** |