[dm-devel] [for-4.16 PATCH v4 3/4] block: allow gendisk's request_queue registration to be deferred
Mike Snitzer
snitzer at redhat.com
Fri Jan 12 02:03:20 UTC 2018
On Thu, Jan 11 2018 at 7:37pm -0500,
Bart Van Assche <Bart.VanAssche at wdc.com> wrote:
> On Thu, 2018-01-11 at 15:14 -0500, Mike Snitzer wrote:
> > -void device_add_disk(struct device *parent, struct gendisk *disk)
> > +void device_add_disk_no_queue_reg(struct device *parent, struct gendisk *disk)
> > {
> > dev_t devt;
> > int retval;
> > @@ -682,7 +682,6 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
> > exact_match, exact_lock, disk);
> > }
> > register_disk(parent, disk);
> > - blk_register_queue(disk);
> >
> > /*
> > * Take an extra ref on queue which will be put on disk_release()
> > @@ -693,6 +692,21 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
> > disk_add_events(disk);
> > blk_integrity_add(disk);
> > }
> > +EXPORT_SYMBOL(device_add_disk_no_queue_reg);
>
> Hello Mike,
>
> This change can increase the time between the generation of the disk uevent
> and the registration of the request queue sysfs attributes. Can this cause
> any udev rules to fail?
Certainly not for DM (DM has very sophisticated udev rules that wait for
the final dm generated "CHANGE" event before considering a device to be
"ready").
But are you asking about non-DM devices? I cannot see, what amounts to,
moving blk_register_queue() to the end of device_add_disk() as reason for
concern. If it were there technically would already be that race.
Mike
More information about the dm-devel
mailing list