Re: Partition size set to 0 when resizing extended and adding logical partition with BLKPG

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

 



On 4/9/2019 12:41 PM, Kai Lüke wrote:
> $ sudo ./sim loop0
> new size in /sys/block/loop0/loop0p1/size: 0
> issuing BLKRRPART
> new size in /sys/block/loop0/loop0p1/size: 2

> int resizepart(char *path, int start, int fd) {
>   struct blkpg_partition part;
>   struct blkpg_ioctl_arg ioctl_arg;
>   memset(&part, 0, sizeof(part));
>   part.start = start;
>   part.length = 1;

I would suggest changing length to 2.  This is what parted and partx do
and it seems to work there.  Linux has always exposed 2 sectors through
the extended partition so you can have lilo install itself there.  It
may be that the kernel thinks that is the minimum allowed size.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux