block: default BLOCK_LEGACY_AUTOLOAD to y
PATCH 1/1 block: default BLOCK_LEGACY_AUTOLOAD to y
As Luis reported, losetup currently doesn't properly create the loop device without this if the device node already exists because old scripts created it manually. So default to y for now and remove the aggressive removal schedule.
--- block/Kconfig | 8 +++----- block/bdev.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-)
block/Kconfig +3 -5
@@ -28,15 +28,13 @@ if BLOCK config BLOCK_LEGACY_AUTOLOAD bool "Legacy autoloading support" + default y help Enable loading modules and creating block device instances based on accesses through their device special file. This is a historic Linux feature and makes no sense in a udev world where device files are - created on demand. - - Say N here unless booting or other functionality broke without it, in - which case you should also send a report to your distribution and - [email protected]. + created on demand, but scripts that manually create device nodes and + then call losetup might rely on this behavior. config BLK_RQ_ALLOC_TIME bool
block/bdev.c +1 -1
@@ -738,7 +738,7 @@ struct block_device *blkdev_get_no_open(dev_t dev) inode =ilookup (blockdev_superblock, dev);if (inode)pr_warn_ratelimited ( -"block device autoloading is deprecated. It will be removed in Linux 5.19\n" ); +"block device autoloading is deprecated and will be removed.\n" ); }if (!inode)return NULL ;
Signature · 1 line
2.30.2
Quoted 7 lines · Christoph Hellwig
As Luis reported, losetup currently doesn't properly create the loop device without this if the device node already exists because old scripts created it manually. So default to y for now and remove the aggressive removal schedule.
Reported-by Luis Chamberlain <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
Looks good.
-ck
Quoted 6 lines · Christoph Hellwig
As Luis reported, losetup currently doesn't properly create the loop device without this if the device node already exists because old scripts created it manually. So default to y for now and remove the aggressive removal schedule.
Applied, thanks!
[1/1] block: default BLOCK_LEGACY_AUTOLOAD to y
commit: 23c8d32e573c97177eb51c1384b774cfa7fa3710
Best regards,
Signature · 1 line
Jens Axboe
Quoted 7 lines · Christoph Hellwig
As Luis reported, losetup currently doesn't properly create the loop device without this if the device node already exists because old scripts created it manually. So default to y for now and remove the aggressive removal schedule.
Reported-by Luis Chamberlain <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
I'm saddened by the fact that we're not going to get an idea of how far and wide the stupid mknod prior to modprobe use is by making this as y default even though I know this is the right thing to do.
I think our ownly measure of success here is to really push Linux distributions to start disabling BLOCK_LEGACY_AUTOLOAD and getting their help to see what burts into flames.
Without that endevour we're positioning ourselves to keep the stupid BLOCK_LEGACY_AUTOLOAD forever.
I *thought* that for some odd uses cases, maybe early-init, or virt-io, mknod might be used to this day, because of some odd boot failures I saw with linux-next, but I'm no longer seeing those boot failures anymore and I cannot confirm.
Luis
Hi,
Quoted 9 lines · Luis Chamberlain
Quoted 7 lines · Christoph Hellwig
As Luis reported, losetup currently doesn't properly create the loop device without this if the device node already exists because old scripts created it manually. So default to y for now and remove the aggressive removal schedule.
Reported-by Luis Chamberlain <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>
Quoted 7 lines
I'm saddened by the fact that we're not going to get an idea of how far and wide the stupid mknod prior to modprobe use is by making this as y default even though I know this is the right thing to do.
I think our ownly measure of success here is to really push Linux distributions to start disabling
BLOCK_LEGACY_AUTOLOADand getting their help to see what burts into flames.
I just spent some time bisecting another thing that regresses without BLOCK_LEGACY_AUTOLOAD (which was disabled here): mdadm software raid auto-assemble on boot (with udev).
I think it's because it tries to open /dev/md127 and then fails since it's not created automatically.
Regards,
Anisse