lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [resend v1 5/5] drivers/scsi/sd.c: Convert to use disk_set_capacity
From
Date

Balbir,

> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 5afb0046b12a..1a3be30b6b78 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3184,7 +3184,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
>
> sdkp->first_scan = 0;
>
> - set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
> + disk_set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
> sd_config_write_same(sdkp);
> kfree(buffer);

We already emit an SDEV_EVT_CAPACITY_CHANGE_REPORTED event if device
capacity changes. However, this event does not automatically cause
revalidation.

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2020-01-07 04:50    [W:0.302 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site