]> www.pilppa.org Git - linux-2.6-omap-h63xx.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)
commit0fc71e3d6520ba7abad5cfbc9a33db0190e4d5b8
tree4793789ea94ffec2c5169378fd6ed7228fb31eeb
parent0e11e342bac31f51ea055b147d20f77b59b9dd2c
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