Message ID | 20250415-loop-uevent-changed-v3-1-60ff69ac6088@linutronix.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v3] loop: LOOP_SET_FD: send uevents for partitions | expand |
On Tue 15-04-25 16:55:06, Thomas Weißschuh wrote: > Remove the suppression of the uevents before scanning for partitions. > The partitions inherit their suppression settings from their parent device, > which lead to the uevents being dropped. > > This is similar to the same changes for LOOP_CONFIGURE done in > commit bb430b694226 ("loop: LOOP_CONFIGURE: send uevents for partitions"). > > Fixes: 498ef5c777d9 ("loop: suppress uevents while reconfiguring the device") > Cc: stable@vger.kernel.org > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > Changes in v3: > - Rebase onto block/block-6.15 > - Drop already applied patch "loop: properly send KOBJ_CHANGED uevent for disk device" > - Add patch to fix partition uevents for LOOP_SET_FD > - Link to v2: https://lore.kernel.org/r/20250415-loop-uevent-changed-v2-1-0c4e6a923b2a@linutronix.de > > Changes in v2: > - Use correct Fixes tag > - Rework commit message slightly > - Rebase onto v6.15-rc1 > - Link to v1: https://lore.kernel.org/r/20250317-loop-uevent-changed-v1-1-cb29cb91b62d@linutronix.de > --- > drivers/block/loop.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > index 3be7f00e7fc740da2745ffbccfcebe53eef2ddaa..e9ec7a45f3f2d1dd2a82b3506f3740089a20ae05 100644 > --- a/drivers/block/loop.c > +++ b/drivers/block/loop.c > @@ -662,12 +662,12 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, > * dependency. > */ > fput(old_file); > + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); > if (partscan) > loop_reread_partitions(lo); > > error = 0; > done: > - dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); > kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE); > return error; > > @@ -675,6 +675,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, > loop_global_unlock(lo, is_loop); > out_putf: > fput(file); > + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); > goto done; > } > > > --- > base-commit: 7ed2a771b5fb3edee9c4608181235c30b40bb042 > change-id: 20250307-loop-uevent-changed-aa3690f43e03 > > Best regards, > -- > Thomas Weißschuh <thomas.weissschuh@linutronix.de> >
On Tue, 15 Apr 2025 16:55:06 +0200, Thomas Weißschuh wrote: > Remove the suppression of the uevents before scanning for partitions. > The partitions inherit their suppression settings from their parent device, > which lead to the uevents being dropped. > > This is similar to the same changes for LOOP_CONFIGURE done in > commit bb430b694226 ("loop: LOOP_CONFIGURE: send uevents for partitions"). > > [...] Applied, thanks! [1/1] loop: LOOP_SET_FD: send uevents for partitions commit: 0dba7a05b9e47d8b546399117b0ddf2426dc6042 Best regards,
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 3be7f00e7fc740da2745ffbccfcebe53eef2ddaa..e9ec7a45f3f2d1dd2a82b3506f3740089a20ae05 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -662,12 +662,12 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, * dependency. */ fput(old_file); + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); if (partscan) loop_reread_partitions(lo); error = 0; done: - dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE); return error; @@ -675,6 +675,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, loop_global_unlock(lo, is_loop); out_putf: fput(file); + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); goto done; }
Remove the suppression of the uevents before scanning for partitions. The partitions inherit their suppression settings from their parent device, which lead to the uevents being dropped. This is similar to the same changes for LOOP_CONFIGURE done in commit bb430b694226 ("loop: LOOP_CONFIGURE: send uevents for partitions"). Fixes: 498ef5c777d9 ("loop: suppress uevents while reconfiguring the device") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> --- Changes in v3: - Rebase onto block/block-6.15 - Drop already applied patch "loop: properly send KOBJ_CHANGED uevent for disk device" - Add patch to fix partition uevents for LOOP_SET_FD - Link to v2: https://lore.kernel.org/r/20250415-loop-uevent-changed-v2-1-0c4e6a923b2a@linutronix.de Changes in v2: - Use correct Fixes tag - Rework commit message slightly - Rebase onto v6.15-rc1 - Link to v1: https://lore.kernel.org/r/20250317-loop-uevent-changed-v1-1-cb29cb91b62d@linutronix.de --- drivers/block/loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- base-commit: 7ed2a771b5fb3edee9c4608181235c30b40bb042 change-id: 20250307-loop-uevent-changed-aa3690f43e03 Best regards,