All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/metadata/raid_manip.c
Date: 13 Sep 2011 16:33:23 -0000	[thread overview]
Message-ID: <20110913163323.16570.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow at sourceware.org	2011-09-13 16:33:22

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : raid_manip.c 

Log message:
	Changing RAID status flags to 64-bit broke some binary flag operations.
	
	LVM_WRITE is a 32-bit flag.  Now that RAID[_IMAGE|_META] are 64-bit,
	and'ing a RAID LV's status against LVM_WRITE can reset the higher order
	flags.
	
	A similar thing will affect thinp flags if not careful.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2103&r2=1.2104
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/raid_manip.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13

--- LVM2/WHATS_NEW	2011/09/13 14:37:48	1.2103
+++ LVM2/WHATS_NEW	2011/09/13 16:33:21	1.2104
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Fix improper RAID 64-bit status flag reset when and'ing against 32-bit flag.
   Fix log size calculation when only a log is being added to a mirror.
   Work around resume_lv causing error LV scanning during splitmirror operation.
   Add 7th lv_attr char to show the related kernel target.
--- LVM2/lib/metadata/raid_manip.c	2011/09/06 18:49:32	1.12
+++ LVM2/lib/metadata/raid_manip.c	2011/09/13 16:33:21	1.13
@@ -971,7 +971,11 @@
 		if (!_lv_is_on_pvs(seg_lv(seg, s), splittable_pvs))
 			continue;
 		lv_set_visible(seg_lv(seg, s));
-		seg_lv(seg, s)->status &= ~LVM_WRITE;
+		/*
+		 * LVM_WRITE is 32-bit, if we don't '|' it with
+		 * UINT64_C(0) it will remove all higher order flags
+		 */
+		seg_lv(seg, s)->status &= ~(UINT64_C(0) | LVM_WRITE);
 		break;
 	}
 



             reply	other threads:[~2011-09-13 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 16:33 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 20:05 LVM2 ./WHATS_NEW lib/metadata/raid_manip.c jbrassow
2012-04-12  3:16 jbrassow
2012-04-11 14:20 jbrassow
2012-04-11  1:23 jbrassow
2012-02-13 11:10 zkabelac
2011-12-01  0:21 jbrassow
2011-08-18 19:31 jbrassow

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=20110913163323.16570.qmail@sourceware.org \
    --to=jbrassow@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.