All of lore.kernel.org
 help / color / mirror / Atom feed
From: malahal@us.ibm.com <malahal@us.ibm.com>
To: lvm-devel@redhat.com
Subject: Re: [PATCH 2 of 10] LVM: make log_area a list
Date: Wed, 14 Oct 2009 10:16:09 -0700	[thread overview]
Message-ID: <20091014171609.GA9054@us.ibm.com> (raw)
In-Reply-To: <0FBED8C9-24F0-48D7-81E5-A041AA11F03D@redhat.com>

Jonathan Brassow [jbrassow at redhat.com] wrote:
>
> On Oct 12, 2009, at 8:48 PM, malahal at us.ibm.com wrote:
>
>> Jonathan Brassow [jbrassow at redhat.com] wrote:
>>> Patch name: lvm-make-log_area-a-list.patch
>>>
>>> The 'alloc_handle' structure only has space for one log_area.
>>> We change that to a list to allow an arbitrary number of
>>> log areas.
>>>
>>> RFC: Jonathan Brassow <jbrassow@redhat.com>
>>>
>>> @@ -1061,10 +1065,14 @@ static int _find_parallel_space(struct a
>>> 				continue;	/* Next PV */
>>>
>>> 			if (alloc != ALLOC_ANYWHERE) {
>>> -				/* Don't allocate onto the log pv */
>>> -				if (ah->log_count &&
>>> -				    pvm->pv == ah->log_area.pv)
>>> -					continue;	/* Next PV */
>>> +				/* Don't allocate onto the log pvs */
>>> +				dm_list_iterate_items(aa, &ah->log_areas)
>>> +					if (pvm->pv == aa->pv)
>>> +						skip = 1;
>>
>>                                       You can 'break' soon after setting 
>> skip.
>
> If I use 'break' won't that break out of the 'dm_list_iterate_items' and 
> not the enclosing loop - giving an incorrect result?

IIRC, there are two dm_list_iterate_items loops. You can 'break' from the
inner loop after setting 'skip=1' and the next statement will check that
skip is set and execute 'continue' for the outer loop.

My understanding is that the current code executes the inner loop to
completion every time.

Thanks, Malahal.



  reply	other threads:[~2009-10-14 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08 21:18 [PATCH 2 of 10] LVM: make log_area a list Jonathan Brassow
2009-10-08 21:18 ` Jonathan Brassow
2009-10-13  1:48 ` malahal
2009-10-13  1:48   ` malahal
2009-10-13 21:28   ` Jonathan Brassow
2009-10-14 17:16     ` malahal [this message]
2009-10-14 18:58       ` Jonathan Brassow
2009-10-15 22:47 ` Alasdair G Kergon
2009-10-15 23:18 ` Alasdair G Kergon
2009-10-21 20:25   ` Jonathan Brassow
  -- strict thread matches above, loose matches on Subject: below --
2010-01-20  2:21 Jonathan Brassow

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=20091014171609.GA9054@us.ibm.com \
    --to=malahal@us.ibm.com \
    --cc=lvm-devel@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 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.