block: fix logging on capacity change
Local variable of 'capacity' stores the previous disk capacity, and
'size' variable records the latest disk capacity, so swap them for
fixing logging on capacity change.
Cc: Christoph Hellwig <hch@lst.de>
Fixes: a782483cc1
("block: remove the nr_sects field in struct hd_struct")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Родитель
97f433c360
Коммит
452c0bf875
|
@ -74,7 +74,7 @@ bool set_capacity_and_notify(struct gendisk *disk, sector_t size)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pr_info("%s: detected capacity change from %lld to %lld\n",
|
pr_info("%s: detected capacity change from %lld to %lld\n",
|
||||||
disk->disk_name, size, capacity);
|
disk->disk_name, capacity, size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Historically we did not send a uevent for changes to/from an empty
|
* Historically we did not send a uevent for changes to/from an empty
|
||||||
|
|
Загрузка…
Ссылка в новой задаче