All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: linux-lvm@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: [linux-lvm] [PATCH LVM2] (1/3) remove unnecessary parameter from _check_contiguous
Date: Fri, 06 Oct 2006 17:55:12 -0400	[thread overview]
Message-ID: <4526D0C0.70804@ce.jp.nec.com> (raw)
In-Reply-To: <4526D08C.8010303@ce.jp.nec.com>

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

This patch removes 'struct physical_volume' from _check_contiguous.
The pv can be obtained later by pva->map->pv.

The patch doesn't fix any bug but is a preparation for later patch.

diffstat:
 lib/metadata/lv_manip.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America


[-- Attachment #2: 04-remove-unnecessary-arg-from-check_contiguous.patch --]
[-- Type: text/x-patch, Size: 1686 bytes --]

diff -X dontdiff -urp LVM2.03.regionsizefix/lib/metadata/lv_manip.c LVM2.04.shrink-checkcontig-arg/lib/metadata/lv_manip.c
--- LVM2.03.regionsizefix/lib/metadata/lv_manip.c	2006-10-05 20:21:27.000000000 -0400
+++ LVM2.04.shrink-checkcontig-arg/lib/metadata/lv_manip.c	2006-10-07 00:46:29.000000000 -0400
@@ -690,8 +690,7 @@ static int _comp_area(const void *l, con
 /*
  * Is pva contiguous to any existing areas or on the same PV?
  */
-static int _check_contiguous(struct lv_segment *prev_lvseg,
-			     struct physical_volume *pv, struct pv_area *pva,
+static int _check_contiguous(struct lv_segment *prev_lvseg, struct pv_area *pva,
 			     struct pv_area **areas, uint32_t areas_size)
 {
 	struct pv_segment *prev_pvseg;
@@ -703,7 +702,7 @@ static int _check_contiguous(struct lv_s
 			lastseg = list_item(list_last(&seg_lv(prev_lvseg, s)->segments), struct lv_segment);
 			/* FIXME For more areas supply flattened prev_lvseg to ensure consistency */
 			if (lastseg->area_count == 1 &&
-			    _check_contiguous(lastseg, pv, pva, &areas[s], 1))
+			    _check_contiguous(lastseg, pva, &areas[s], 1))
 				return 1;
 			continue;
 		}
@@ -711,7 +710,7 @@ static int _check_contiguous(struct lv_s
 		if (!(prev_pvseg = seg_pvseg(prev_lvseg, s)))
 			continue; /* FIXME Broken */
 
-		if ((prev_pvseg->pv != pv))
+		if ((prev_pvseg->pv != pva->map->pv))
 			continue;
 
 		if (prev_pvseg->pe + prev_pvseg->len == pva->start) {
@@ -907,7 +906,6 @@ static int _find_parallel_space(struct a
 				if (contiguous) {
 					if (prev_lvseg &&
 					    _check_contiguous(prev_lvseg,
-							      pvm->pv,
 							      pva, areas,
 							      areas_size)) {
 						contiguous_count++;

  reply	other threads:[~2006-10-06 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 21:54 [linux-lvm] [PATCH LVM2] (0/3) 'cling' allocation policy Jun'ichi Nomura
2006-10-06 21:55 ` Jun'ichi Nomura [this message]
2006-10-06 21:56 ` [linux-lvm] [PATCH LVM2] (2/3) use _for_each_pv() from _check_contiguous() Jun'ichi Nomura
2006-10-07 23:38   ` [linux-lvm] " Alasdair G Kergon
2006-10-09 16:27     ` Jun'ichi Nomura
2006-10-06 21:56 ` [linux-lvm] [PATCH LVM2] (3/3) add 'cling' allocation policy Jun'ichi Nomura
2006-10-08 12:06   ` [linux-lvm] " Alasdair G Kergon
2006-10-07 10:51 ` [linux-lvm] Re: [PATCH LVM2] (0/3) " Alasdair G Kergon

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=4526D0C0.70804@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=agk@redhat.com \
    --cc=linux-lvm@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.