Re: [PATCH] losetup: don't skip adding a new device if it already has a device node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/25/22 10:09, Christoph Hellwig wrote:
> Linux plans to deprecate the auto-creation of block devices based on
> access to the devic node starting from kernel 5.18.  Without that feature

's/devic/device/g'

> losetup will fail to create the loop device if a device node already
> exists, but the loop device to back it in the kernel does not exist yet.
> This is a scenario that should not happen in modern udev based
> distributions, but apparently there still are various scripts around that
> manually call the superflous mknod.

's/superflous/superfluous/g'

> 
> Change losetup to unconditionally call loopcxt_add_device when a specific
> device node is specified on the command line.  If the loop device
> already exists the LOOP_CTL_ADD ioctl will fail, but given that losetup
> ignores the return value from loopcxt_add_device that failure has no
> further effect.
> 
> Reported-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck






[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux