Messages in this thread | | | From | "Singh, Balbir" <> | Subject | Re: [RFC PATCH] block/genhd: Notify udev about capacity change | Date | Wed, 11 Dec 2019 19:36:09 +0000 |
| |
On Tue, 2019-12-10 at 03:01 +0000, Balbir Singh wrote: > Allow block/genhd to notify user space (via udev) about disk size changes > using a new helper disk_set_capacity(), which is a wrapper on top > of set_capacity(). disk_set_capacity() will only notify via udev if > the current capacity or the target capacity is not zero. > > disk_set_capacity() is not enabled for all devices, just virtio block, > xen-blockfront, nvme and sd. Owners of other block disk devices can > easily move over by changing set_capacity() to disk_set_capacity() > > Background: > > As a part of a patch to allow sending the RESIZE event on disk capacity > change, Christoph (hch@lst.de) requested that the patch be made generic > and the hacks for virtio block and xen block devices be removed and > merged via a generic helper. > > Testing: > 1. I did some basic testing with an NVME device, by resizing it in > the backend and ensured that udevd received the event. > > Suggested-by: Christoph Hellwig <hch@lst.de> > Signed-off-by: Balbir Singh <sblbir@amazon.com> > Signed-off-by: Someswarudu Sangaraju <ssomesh@amazon.com> >
Any feedback on the RFC?
Balbir Singh.
| |