scsi: Convert to use set_capacity_revalidate_and_notify
authorBalbir Singh <sblbir@amazon.com>
Fri, 13 Mar 2020 05:30:09 +0000 (05:30 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Mar 2020 21:13:21 +0000 (15:13 -0600)
block/genhd provides set_capacity_revalidate_and_notify() for sending RESIZE
notifications via uevents. This notification is newly added to scsi sd.

Signed-off-by: Balbir Singh <sblbir@amazon.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c

index 8ca9299ffd36ecd141959e947994fa387d2c7e5a..707f47c0ec982fc7babe47c6ee225e3b0c87bfdb 100644 (file)
@@ -3187,7 +3187,8 @@ static int sd_revalidate_disk(struct gendisk *disk)
 
        sdkp->first_scan = 0;
 
-       set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
+       set_capacity_revalidate_and_notify(disk,
+               logical_to_sectors(sdp, sdkp->capacity), false);
        sd_config_write_same(sdkp);
        kfree(buffer);