Skip to content

Commit

Permalink
scsi: Convert to use set_capacity_revalidate_and_notify
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
balbir-aws authored and axboe committed Mar 18, 2020
1 parent cb224c3 commit 78317c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/sd.c
Expand Up @@ -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);

Expand Down

0 comments on commit 78317c5

Please sign in to comment.