linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "heming.zhao" <heming.zhao@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>,
	LVM general discussion and development <linux-lvm@redhat.com>
Cc: teigland@sourceware.org
Subject: Re: [linux-lvm] [PATCH v2] lvs: add -o lv_usable
Date: Thu, 10 Sep 2020 14:34:15 +0800	[thread overview]
Message-ID: <4a6b7e89-49b9-72a8-6938-a1fc7419ccc1@suse.com> (raw)
In-Reply-To: <74001d9c-1024-81c9-66f9-d5bc399e1ca1@redhat.com>

On 9/10/20 1:17 AM, Zdenek Kabelac wrote:
> Dne 09. 09. 20 v 18:47 Zhao Heming napsal(a):
>> report LV is usable for upper layer.
>>
>> leave issues
>> - this patch doesn't contain dm table comparison. So if the disk
>> �� is removed then re-inserted, but the re-inserted disk
>> �� major:minor is changed, the code doesn't have ability to detect.
>> - raid10: removing any 2 disks will think as array broken.
>>
>> Signed-off-by: Zhao Heming <heming.zhao@suse.com>
>> ---
>> v2:
>> - remove dm table parsing code in _lv_is_usable()
>> - add new status bit NOT_USABLE_LV.
>> �� note, I chose the first available bit 0x0000000080000000
>> - _lvusable_disp() uses lv_is_usable() to return usable status
>>
>  ����dm_list_iterate_items(lvseg, &lv->segments) {
>> ��������� for (s = 0; s < lvseg->area_count; ++s) {
>> ������������� if (seg_type(lvseg, s) == AREA_PV) {
>> -��������������� if (is_missing_pv(seg_pv(lvseg, s)))
>> +��������������� pv = seg_pv(lvseg, s);
>> +��������������� if (!(pv->dev) && is_missing_pv(pv)) {
>> ��������������������� lv->status |= PARTIAL_LV;
>> +������������������� lv->status |= NOT_USABLE_LV;
>> +��������������� }
>> ������������� }
>> ��������� }
>> ����� }
> 
> Hi
> 
> As it can be seen here - there is big intersection with meaning of
> PARTIAL_LV.
> 
> And the question is - what does it mean in the context of various segment
> types.
> 
> I believe we need to discuss with Heinz - whether we want to mark
> Raid LVs partial in case they are actually 'only leg-pertial' and should
> be actually activatable without partial activation� - which is ATM abused for this purpose.
> 
> ATM I'm not sure we want to introduce new flags, which has only slight
> deviation from current partial flag - which should deserve closer look
> of its meaning.
> 
> We'll try to find something with Heinz to agree with.
> 
Ok, wait for feedback from Heinz.

I agree with you. the PARTIAL_LV is more closer to the new bit NOT_USABLE_LV.
There is another bit MISSING_PV, which is set when pv is missing or the pv is not workable.

 From my understanding, we could reuse the PARTIAL_LV to show different meaning according to different context. For example, in raid env, the top layer LV will be set PARTIAL_LV when the raid array not usable (e.g. raid0 missing a disk). Other cases, within raid limit, top layer raid LV won't be set. if following the rule, there will no need to set the new bit NOT_USABLE_LV.

Heming

  reply	other threads:[~2020-09-10  6:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 16:47 [linux-lvm] [PATCH v2] lvs: add -o lv_usable Zhao Heming
2020-09-09 17:17 ` Zdenek Kabelac
2020-09-10  6:34   ` heming.zhao [this message]
2020-09-17 10:18     ` Heinz Mauelshagen
2020-09-18  7:07       ` heming.zhao
2020-09-18 11:38         ` Heinz Mauelshagen
2020-09-19  3:58           ` heming.zhao

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=4a6b7e89-49b9-72a8-6938-a1fc7419ccc1@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=teigland@sourceware.org \
    --cc=zkabelac@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).