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

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


Hi Christophe,

the latest kpartx generates wrong mapping for
MS-DOS extended partitions.
Attached patch fixes the problem.
Please consider to apply.

Consider you created the following partition table.
  # 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          0.031      7.844  primary
  2          7.844     31.376  extended
  5          7.875     23.532  logical
  6         23.563     31.376  logical

kpartx should generate the following mappings:
  # dmsetup table|grep sdc|sort
  sdc1: 0 16002 linear 8:32 63
  sdc5: 0 32067 linear 8:32 16128
  sdc6: 0 16002 linear 8:32 48258

However, actually it generates:
  # dmsetup table|grep sdc|sort
  sdc1: 0 16002 linear 8:32 63
  sdc5: 0 32067 linear 8:32 16128
  sdc6: 0 16065 linear 8:32 80325
  sdc7: 0 16002 linear 8:32 48258

Thanks,
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-kpartx-dont-count-hidden-extended.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20051201/be9d58ec/attachment.bin>


More information about the dm-devel mailing list