block: fix a device invalidation regression
Historically we only set the capacity to zero for devices that support partitions (independ of actually having partitions created). Doing that is rather inconsistent, but changing it broke legacy udisks polling for legacy ide-cdrom devices. Use the crude a crude check for devices that either are non-removable or partitionable to get the sane behavior for most device while not breaking userspace for this particular setup. Fixes: a1548b67 ("block: move rescan_partitions to fs/block_dev.c") Reported-by: NHe Zhe <zhe.he@windriver.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Tested-by: NHe Zhe <zhe.he@windriver.com> Signed-off-by: NJens Axboe <axboe@kernel.dk>
Showing
想要评论请 注册 或 登录