From f1c90ec108efa6f113be4ee0da65331f6e15877a Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Thu, 9 Jul 2009 22:50:45 +0000 Subject: [PATCH] Check MD devices for a partition table during device scan. --- WHATS_NEW | 1 + lib/device/device.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 4ecf16c2b..cd0b19765 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.49 - ================================ + Check MD devices for a partition table during device scan. Add extended device (blkext) and MD partition (mdp) types to filters. Fix and precise metadata read errors for segment areas. Fix segment metadata read function errors to use proper segment name. diff --git a/lib/device/device.c b/lib/device/device.c index 9d3c1cf7d..3248dd655 100644 --- a/lib/device/device.c +++ b/lib/device/device.c @@ -43,6 +43,10 @@ static int _is_partitionable(struct device *dev) { int parts = max_partitions(MAJOR(dev->dev)); + /* All MD devices are partitionable via blkext (as of 2.6.28) */ + if (MAJOR(dev->dev) == md_major()) + return 1; + if ((parts <= 1) || (MINOR(dev->dev) % parts)) return 0;