]> git.baikalelectronics.ru Git - kernel.git/commit
block: add partition attribute for partition number
authorTejun Heo <tj@kernel.org>
Mon, 13 Oct 2008 11:27:59 +0000 (13:27 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 17 Oct 2008 06:46:56 +0000 (08:46 +0200)
commit3668a29404c71c77c85960d7d9b0ba5f55f899d6
tree4793789ea94ffec2c5169378fd6ed7228fb31eeb
parente31e357765e40a9d21907adfd8b7903b239f293a
block: add partition attribute for partition number

With extended devt, finding out the partition number becomes a bit
more challenging as subtracting the minor number from that of the
parent device doesn't work anymore.  The only thing left is parsing
the partition name which is brittle and not exactly universal (some
have '-' between the device name and partition number while others
don't).  This patch introduced partition attribute which contains the
partition number of the device.  This should make finding partitions
and its index easier.

This problem and solution were suggested by H. Peter Anvin.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/partitions/check.c