[dm-devel] kpartx bug fixes for dos extended partition [2/4]

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Thu Dec 1 20:14:41 UTC 2005


Hi Christophe,

kpartx usually doesn't create a mapping for extended partition.
However, it does if it's empty.
It's harmless but not consistent.
Attached patch makes it consistent by not creating a mapping
even when the extended partition is empty.

Please consider to apply.

If you have logical partitions in extended partition:
  # parted /dev/sdc p
  Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
  Disk label type: msdos
  Minor    Start       End     Type      Filesystem  Flags
  1          7.844     31.376  extended
  5          7.875     23.532  logical

No mapping is created for extended partition:
  # dmsetup table|grep sdc|sort
  sdc5: 0 32067 linear 8:32 16128

However, if the extended partition is empty:
  # parted /dev/sdc p
  Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
  Disk label type: msdos
  Minor    Start       End     Type      Filesystem  Flags
  1          7.844     31.376  extended

The following mapping is created:
  # dmsetup table|grep sdc|sort
  sdc1: 0 48195 linear 8:32 16065

Thanks,
Nick


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-kpartx-avoid-mapping-empty-extended-part.patch
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20051201/14f5596d/attachment.bin>


More information about the dm-devel mailing list