From: Tejun Heo <tj@kernel.org>
To: "Hawrylewicz Czarnowski,
Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>
Cc: dm-devel@redhat.com, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: HPA unlock during partition scan of RAID components
Date: Thu, 3 Nov 2011 08:54:16 -0700 [thread overview]
Message-ID: <20111103153835.GF4417@google.com> (raw)
In-Reply-To: <74AAB12B538EC94087A0D16AFDFC24F4045674@IRSMSX102.ger.corp.intel.com>
Hello,
(cc'ing dm-devel)
On Thu, Nov 03, 2011 at 01:02:37AM +0000, Hawrylewicz Czarnowski, Przemyslaw wrote:
> Recently we have encountered a problem with unlocking of HPA on disks belonging to RAID array.
> The scenario in the simplest form is as follows:
> * take HPA resized drives
> * use SW Raid solution with metadata located at the end of disk (eg. md v1.0, IMSM)
> * create raid0/10/5 using whole devices (eg. /dev/sda) (raid size must extend capacity of single device; raid1 is not the case here)
> * create any partition with size exceeding HPA limit of single component
>
> According to the code of rescan_partitions(), if disk has capacity limit enabled (HPA) and boundary of partition extends beyond that limit, it is bypassed/unlocked (regardless of libata.ignore_hpa state).
> As for single block device it is proper action - for raid using whole block device it is not. The partition table despite the fact it is read from single disk belongs to raid array. Values in RAID context are set properly. But from the point of view of single device - they are not.
> Problem is that in general rescan_partition() has no knowledge of any raid array using that block device. Moreover, that raid is not assembled yet.
> And the result: as HPA limit is unlocked and metadata on this device in not recognizable anymore - in worst case raid is not assembled or failed.
>
> The simplest resolution is to conditionally forbid HPA unlocking (eg. extending ignore_hpa parameter) but I suppose a better and more 'intelligent' solution can be found.
This has come up a couple times and I think the proper solution is to
always unlock HPA and expose both sizes - locked and unlocked and let
dm, md or whatever do whatever is approriate. Block or driver layer
doesn't have any way to determine which one is the right bet - it
simply doesn't have enough information. I tried to bounce this idea
off people who whould actually be using this (dm/md) but haven't heard
back yet.
Thanks.
--
tejun
next parent reply other threads:[~2011-11-03 15:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <74AAB12B538EC94087A0D16AFDFC24F4045674@IRSMSX102.ger.corp.intel.com>
2011-11-03 15:54 ` Tejun Heo [this message]
2011-11-03 19:00 ` HPA unlock during partition scan of RAID components Phillip Susi
2011-11-04 14:48 ` Tejun Heo
2011-11-04 15:42 ` Phillip Susi
2011-11-04 15:52 ` Tejun Heo
2011-11-04 16:26 ` Phillip Susi
2011-11-04 16:32 ` Tejun Heo
2011-11-04 21:08 ` Phillip Susi
2011-11-04 21:50 ` Tejun Heo
2011-11-05 1:29 ` Phillip Susi
2011-11-05 1:43 ` Tejun Heo
2011-11-05 2:26 ` Phillip Susi
2011-11-05 2:52 ` Tejun Heo
2011-11-05 3:50 ` Phillip Susi
2011-11-03 20:46 ` NeilBrown
2011-11-03 21:08 ` Tejun Heo
2012-05-15 0:50 ` Charles Nordlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111103153835.GF4417@google.com \
--to=tj@kernel.org \
--cc=bzolnier@gmail.com \
--cc=dm-devel@redhat.com \
--cc=przemyslaw.hawrylewicz.czarnowski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.