All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <heinzm@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - raid: cleanup _lv_set_image_lvs_start_les()
Date: Tue, 7 Mar 2017 15:55:41 -0500	[thread overview]
Message-ID: <201703072055.v27KtfWj008999@lists01.pubmisc.prod.ext.phx2.redhat.com> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9ed11e919187fcc6d2a0ab192937e3cebed08592
Commit:        9ed11e919187fcc6d2a0ab192937e3cebed08592
Parent:        05aceaffbd184c6b5d892d92a6c4d9db182da8f8
Author:        Heinz Mauelshagen <heinzm@redhat.com>
AuthorDate:    Tue Mar 7 21:55:19 2017 +0100
Committer:     Heinz Mauelshagen <heinzm@redhat.com>
CommitterDate: Tue Mar 7 21:55:19 2017 +0100

raid: cleanup _lv_set_image_lvs_start_les()

Avoid second loop.
---
 lib/metadata/raid_manip.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 1a4a860..40044f2 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1302,12 +1302,11 @@ static int _lv_set_image_lvs_start_les(struct logical_volume *lv)
 			data_seg->le = le;
 			le += data_seg->len;
 		}
-	}
 
-	/* Try merging rimage sub LV segments _after_ adjusting start LEs */
-	for (s = 0; s < seg->area_count; s++)
+		/* Try merging rimage sub LV segments _after_ adjusting start LEs */
 		if (!lv_merge_segments(seg_lv(seg, s)))
 			return_0;
+	}
 
 	return 1;
 }



                 reply	other threads:[~2017-03-07 20:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201703072055.v27KtfWj008999@lists01.pubmisc.prod.ext.phx2.redhat.com \
    --to=heinzm@sourceware.org \
    --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.