[dm-devel] [PATCH] kpartx: Add -P option for partition scanning
Ritika Srivastava
ritika.srivastava at oracle.com
Thu Mar 3 17:38:22 UTC 2022
On 3/3/22, 2:57 AM, "Martin Wilck" wrote:
> I agree. kpartx is a tool for creating linear dm mappings that behave
> roughly like partitions. And it should stay that way. We (made the
> mistake to) add convenience functionality to setup loop devices when
> kpartx is called with a regular file argument. That doesn't mean that
> kpartx is a generic tool for handling loop devices or partition
> devices. We should stick to the "do one thing, do it right" philosophy
> here.
> TBH, he usage "kpartx -av /some/file" just to create the loop device,
> if the file has no partition table, looks like an abuse to me. I
> wouldn't recommend to rely on that behavior. It might change in the
> future.
Thank you for clarifying this.
I was under the impression that since kpartx supports loop device creation,
it may as well support partition scanning functionality - just like losetup does.
Will keep this in mind and be wary about using kpartx -a to create loop device.
Thank you, Ben and Martin, for your review.
Thanks,
Ritika
More information about the dm-devel
mailing list