[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH] (1/2) new library interface for vg_read



Hi,

Dave Wysochanski <dwysocha redhat com> writes:
> Can you clean up some of the return value prototypes so they use
> uint32_t consistently for return values?  This includes
> vg_check_status(), vg_read_error(), vg_exists(), and the flag
> definitions.
I have changed those, plus removed the warning you mentioned in other mail,
I'll probably re-add separately later. I'm attaching new-changes and new-all,
first just giving the diff against the previous version of the patch. I'm not
sure I agree that they should all be uint32_t though, but I suppose it's a
minor point.

The diff-diff:

diff -rN -p -u old-lvmlib/lib/device/dev-io.c new-lvmlib/lib/device/dev-io.c
--- old-lvmlib/lib/device/dev-io.c	2008-12-12 10:17:26.189888644 +0100
+++ new-lvmlib/lib/device/dev-io.c	2008-12-12 10:17:26.233891234 +0100
@@ -622,11 +622,6 @@ int dev_write(struct device *dev, uint64
 	where.start = offset;
 	where.size = len;
 
-	if (!vg_write_lock_held()) {
-		log_error("Attempted to write unlocked VG's device.");
-		return_0;
-	}
-
 	dev->flags |= DEV_ACCESSED_W;
 
 	return _aligned_io(&where, buffer, 1);
diff -rN -p -u old-lvmlib/lib/metadata/metadata.c new-lvmlib/lib/metadata/metadata.c
--- old-lvmlib/lib/metadata/metadata.c	2008-12-12 10:17:26.185888066 +0100
+++ new-lvmlib/lib/metadata/metadata.c	2008-12-12 10:17:26.233891234 +0100
@@ -2388,7 +2388,7 @@ int pv_analyze(struct cmd_context *cmd, 
  * 0 - fail
  * 1 - success
  */
-static int _vg_check_status(const struct volume_group *vg, uint32_t status)
+static uint32_t _vg_check_status(const struct volume_group *vg, uint32_t status)
 {
 	uint32_t ret = 0;
 	if ((status & CLUSTERED) &&
@@ -2424,7 +2424,7 @@ int vg_check_status(const struct volume_
 	return !_vg_check_status(vg, status);
 }
 
-int vg_read_error(vg_t *vg) {
+uint32_t vg_read_error(vg_t *vg) {
 	if (!vg)
 		return FAILED_ALLOCATION;
 	if (vg->read_failed & EXISTENCE_CHECK)
@@ -2436,7 +2436,7 @@ int vg_read_error(vg_t *vg) {
    true (it might exist, but we are not sure, as the read failed for some
    other reason). */
 
-int vg_exists(vg_t *vg) {
+uint32_t vg_exists(vg_t *vg) {
 	if (!vg)
 		return 1;
 	log_error("vg_exists: %d != %d?", vg->read_failed, FAILED_NOTFOUND | EXISTENCE_CHECK);
@@ -2563,7 +2563,7 @@ vg_t *vg_lock_and_read(struct cmd_contex
 	const char *lock;
 	int consistent = 1;
 	int consistent_in;
-	int failure = 0;
+	uint32_t failure = 0;
 
 	if (misc_flags & ALLOW_INCONSISTENT || !(lock_flags & LCK_WRITE))
 	consistent = 0;
diff -rN -p -u old-lvmlib/lib/metadata/metadata-exported.h new-lvmlib/lib/metadata/metadata-exported.h
--- old-lvmlib/lib/metadata/metadata-exported.h	2008-12-12 10:17:26.173889125 +0100
+++ new-lvmlib/lib/metadata/metadata-exported.h	2008-12-12 10:17:26.233891234 +0100
@@ -382,8 +382,8 @@ vg_t *vg_lock_and_read(struct cmd_contex
 		       uint32_t lock_flags, uint32_t status_flags,
 		       uint32_t misc_flags);
 
-int vg_read_error(vg_t *vg);
-int vg_exists(vg_t *vg);
+uint32_t vg_read_error(vg_t *vg);
+uint32_t vg_exists(vg_t *vg);
 vg_t *vg_read(struct cmd_context *cmd, const char *vg_name,
 	      const char *vgid, uint32_t flags);
 
@@ -538,7 +538,7 @@ int vg_add_snapshot(const char *name,
 
 int vg_remove_snapshot(struct logical_volume *cow);
 
-int vg_check_status(const struct volume_group *vg, uint32_t status);
+uint32_t vg_check_status(const struct volume_group *vg, uint32_t status);
 
 /*
 * Mirroring functions

And the full-diff:

Fri Dec 12 10:15:00 CET 2008  Petr Rockai <me mornfall net>
  * Library portions of vg_read patches.
diff -rN -p -u old-lvmlib/lib/metadata/metadata.c new-lvmlib/lib/metadata/metadata.c
--- old-lvmlib/lib/metadata/metadata.c	2008-12-12 10:17:29.049888169 +0100
+++ new-lvmlib/lib/metadata/metadata.c	2008-12-12 10:17:29.085893444 +0100
@@ -224,8 +224,8 @@ int get_pv_from_vg_by_id(const struct fo
 	struct pv_list *pvl;
 	int consistent = 0;
 
-	if (!(vg = vg_read(fmt->cmd, vg_name, vgid, &consistent))) {
-		log_error("get_pv_from_vg_by_id: vg_read failed to read VG %s",
+	if (!(vg = vg_read_internal(fmt->cmd, vg_name, vgid, &consistent))) {
+		log_error("get_pv_from_vg_by_id: vg_read_internal failed to read VG %s",
 			  vg_name);
 		return 0;
 	}
@@ -332,7 +332,7 @@ static int remove_lvs_in_vg(struct cmd_c
 
 /* FIXME: remove redundant vg_name */
 int vg_remove_single(struct cmd_context *cmd, const char *vg_name,
-		     struct volume_group *vg, int consistent,
+		     struct volume_group *vg,
 		     force_t force __attribute((unused)))
 {
 	struct physical_volume *pv;
@@ -340,7 +340,7 @@ int vg_remove_single(struct cmd_context 
 	unsigned lv_count;
 	int ret = 1;
 
-	if (!vg || !consistent || vg_missing_pv_count(vg)) {
+	if (vg_read_error(vg) || vg_missing_pv_count(vg)) {
 		log_error("Volume group \"%s\" not found, is inconsistent "
 			  "or has PVs missing.", vg_name);
 		log_error("Consider vgreduce --removemissing if metadata "
@@ -503,7 +503,7 @@ struct volume_group *vg_create(struct cm
 		return_NULL;
 
 	/* is this vg name already in use ? */
-	if (vg_read(cmd, vg_name, NULL, &consistent)) {
+	if (vg_read_internal(cmd, vg_name, NULL, &consistent)) {
 		log_err("A volume group called '%s' already exists.", vg_name);
 		goto bad;
 	}
@@ -1684,12 +1684,12 @@ int vg_missing_pv_count(const vg_t *vg)
 	return ret;
 }
 
-/* Caller sets consistent to 1 if it's safe for vg_read to correct
+/* Caller sets consistent to 1 if it's safe for vg_read_internal to correct
  * inconsistent metadata on disk (i.e. the VG write lock is held).
  * This guarantees only consistent metadata is returned.
  * If consistent is 0, caller must check whether consistent == 1 on return
  * and take appropriate action if it isn't (e.g. abort; get write lock
- * and call vg_read again).
+ * and call vg_read_internal again).
  *
  * If precommitted is set, use precommitted metadata if present.
  *
@@ -1716,7 +1716,7 @@ static struct volume_group *_vg_read(str
 
 	if (is_orphan_vg(vgname)) {
 		if (use_precommitted) {
-			log_error("Internal error: vg_read requires vgname "
+			log_error("Internal error: vg_read_internal requires vgname "
 				  "with pre-commit.");
 			return NULL;
 		}
@@ -1974,7 +1974,7 @@ static struct volume_group *_vg_read(str
 	return correct_vg;
 }
 
-struct volume_group *vg_read(struct cmd_context *cmd, const char *vgname,
+struct volume_group *vg_read_internal(struct cmd_context *cmd, const char *vgname,
 			     const char *vgid, int *consistent)
 {
 	struct volume_group *vg;
@@ -2002,7 +2002,7 @@ struct volume_group *vg_read(struct cmd_
 
 /* This is only called by lv_from_lvid, which is only called from
  * activate.c so we know the appropriate VG lock is already held and
- * the vg_read is therefore safe.
+ * the vg_read_internal is therefore safe.
  */
 static struct volume_group *_vg_read_by_vgid(struct cmd_context *cmd,
 					    const char *vgid,
@@ -2034,7 +2034,7 @@ static struct volume_group *_vg_read_by_
 	if (memlock())
 		return NULL;
 
-	/* FIXME Need a genuine read by ID here - don't vg_read by name! */
+	/* FIXME Need a genuine read by ID here - don't vg_read_internal by name! */
 	/* FIXME Disabled vgrenames while active for now because we aren't
 	 *       allowed to do a full scan here any more. */
 
@@ -2218,7 +2218,7 @@ static int _get_pvs(struct cmd_context *
 			stack;
 			continue;
 		}
-		if (!(vg = vg_read(cmd, vgname, vgid, &consistent))) {
+		if (!(vg = vg_read_internal(cmd, vgname, vgid, &consistent))) {
 			stack;
 			continue;
 		}
@@ -2388,77 +2388,242 @@ int pv_analyze(struct cmd_context *cmd, 
  * 0 - fail
  * 1 - success
  */
-int vg_check_status(const struct volume_group *vg, uint32_t status)
+static uint32_t _vg_check_status(const struct volume_group *vg, uint32_t status)
 {
+	uint32_t ret = 0;
 	if ((status & CLUSTERED) &&
 	    (vg_is_clustered(vg)) && !locking_is_clustered() &&
 	    !lockingfailed()) {
 		log_error("Skipping clustered volume group %s", vg->name);
-		return 0;
+		ret |= FAILED_CLUSTERED;
 	}
 
 	if ((status & EXPORTED_VG) &&
 	    (vg->status & EXPORTED_VG)) {
 		log_error("Volume group %s is exported", vg->name);
-		return 0;
+		ret |= FAILED_EXPORTED;
 	}
 
 	if ((status & LVM_WRITE) &&
 	    !(vg->status & LVM_WRITE)) {
 		log_error("Volume group %s is read-only", vg->name);
-		return 0;
+		ret |= FAILED_READ_ONLY;
 	}
+
 	if ((status & RESIZEABLE_VG) &&
 	    !(vg->status & RESIZEABLE_VG)) {
 		log_error("Volume group %s is not resizeable.", vg->name);
-		return 0;
+		ret |= FAILED_RESIZEABLE;
 	}
 
+	return ret;
+}
+
+int vg_check_status(const struct volume_group *vg, uint32_t status)
+{
+	return !_vg_check_status(vg, status);
+}
+
+uint32_t vg_read_error(vg_t *vg) {
+	if (!vg)
+		return FAILED_ALLOCATION;
+	if (vg->read_failed & EXISTENCE_CHECK)
+		return vg->read_failed & ~(EXISTENCE_CHECK | FAILED_NOTFOUND);
+	return vg->read_failed;
+}
+
+/* Returns true if the volume group already exists. If unsure, it will return
+   true (it might exist, but we are not sure, as the read failed for some
+   other reason). */
+
+uint32_t vg_exists(vg_t *vg) {
+	if (!vg)
+		return 1;
+	log_error("vg_exists: %d != %d?", vg->read_failed, FAILED_NOTFOUND | EXISTENCE_CHECK);
+	if (vg->read_failed == (FAILED_NOTFOUND | EXISTENCE_CHECK))
+		return 0;
 	return 1;
 }
 
+static vg_t *_vg_make_handle(struct cmd_context *cmd,
+			     struct volume_group *vg,
+			     uint32_t failure)
+{
+	if (!vg)
+		if (!(vg = dm_pool_zalloc(cmd->mem, sizeof(*vg))))
+			return_NULL;
+	vg->read_failed = failure;
+	return vg;
+}
+
+/*
+ * High-level read-for-update function.
+ * On failure:
+ *  - out of memory: NULL is returned
+ *  - other: a volume group with "failed" field set to nonzero is returned
+ *
+ * Failures:
+ *  - metadata inconsistent and automatic correction failed: FAILED_INCONSISTENT
+ *  - VG is read-only: FAILED_READ_ONLY
+ *  - VG is EXPORTED, unless flags has ALLOW_EXPORTED: FAILED_EXPORTED
+ *  - VG is not RESIZEABLE, unless flags has ALLOW_NONRESIZEABLE:
+ *    FAILED_RESIZEABLE
+ *  - locking failed: FAILED_LOCKING
+ *
+ * On failures, all locks are released, unless KEEP_LOCK has been supplied.
+ *
+ * If EXISTENCE_CHECK is set in flags, if the VG exists, a non-NULL struct
+ * volume_group will be returned every time, but if it has INCONSISTENT_VG set,
+ * the other fields will be uninitialized. You *have to* check for
+ * INCONSISTENT_VG if passing EXISTENCE_CHECK. You also *must not* use it if it
+ * has INCONSISTENT_VG set.
+ */
+vg_t *vg_read_for_update(struct cmd_context *cmd, const char *vg_name,
+			 const char *vgid, uint32_t flags)
+{
+	return vg_read(cmd, vg_name, vgid, flags | READ_FOR_UPDATE);
+}
+
+/*
+ * FIXME we want vg_read to attempt automatic recovery after acquiring a
+ * temporary write lock -- if that fails, we bail out as usual, with failed &
+ * FAILED_INCONSISTENT. If it works, we are good to go. Code that's been in
+ * toollib just set lock type to LCK_WRITE and called vg_read_internal with
+ * *consistent = 1.
+ */
+vg_t *vg_read(struct cmd_context *cmd, const char *vg_name,
+	      const char *vgid, uint32_t flags)
+{
+	uint32_t status = CLUSTERED;
+	uint32_t lock = LCK_VG_READ;
+
+	if (flags & READ_FOR_UPDATE) {
+		status |= EXPORTED_VG | LVM_WRITE;
+		lock = LCK_VG_WRITE;
+	}
+
+	if (flags & ALLOW_EXPORTED)
+		status &= ~EXPORTED_VG;
+
+	if (flags & REQUIRE_RESIZEABLE)
+		status |= RESIZEABLE_VG;
+
+	if (flags & NONBLOCKING_LOCK)
+		lock |= LCK_NONBLOCK;
+
+	return vg_lock_and_read(cmd, vg_name, vgid, lock, status, flags);
+}
+
+static vg_t *_recover_vg(struct cmd_context *cmd, const char *lock, const char *vg_name,
+			 const char *vgid, uint32_t lock_flags )
+{
+	int consistent = 1;
+	struct volume_group *vg;
+
+	lock_flags &= ~LCK_TYPE_MASK;
+	lock_flags |= LCK_WRITE;
+
+	unlock_vg(cmd, lock);
+
+	dev_close_all();
+
+	if (!lock_vol(cmd, lock, lock_flags))
+		return_NULL;
+
+	if (!(vg = vg_read_internal(cmd, vg_name, vgid, &consistent)))
+		return_NULL;
+	if (!consistent)
+		return_NULL;
+	return vg;
+}
+
 /*
  * vg_lock_and_read - consolidate vg locking, reading, and status flag checking
  *
+ * misc_flags:
+ *  ALLOW_INCONSISTENT: disable autocorrection
+ *  
+ * Setting ALLOW_INCONSISTENT might give you inconsistent metadata. You will
+ * *still* get FAILED_INCONSISTENT in case the metadata has *really* been
+ * inconsistent. However, you still get the latest version of metadata in VG.
+ *
+ *
+ *
  * Returns:
- * NULL - failure
- * non-NULL - success; volume group handle
+ * Use vg_read_error(vg) to determine the result. Nonzero vg_read_error(vg)
+ * means there were problems reading the volume group.
+ * Zero value means that the VG is open and appropriate locks are held.
  */
 vg_t *vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
 		       const char *vgid,
 		       uint32_t lock_flags, uint32_t status_flags,
 		       uint32_t misc_flags)
 {
-	struct volume_group *vg;
+	struct volume_group *vg = 0;
+	const char *lock;
 	int consistent = 1;
+	int consistent_in;
+	uint32_t failure = 0;
 
-	if (!(misc_flags & CORRECT_INCONSISTENT))
-		consistent = 0;
+	if (misc_flags & ALLOW_INCONSISTENT || !(lock_flags & LCK_WRITE))
+	consistent = 0;
 
-	if (!validate_name(vg_name)) {
+	if (!validate_name(vg_name) && !is_orphan_vg(vg_name)) {
 		log_error("Volume group name %s has invalid characters",
 			  vg_name);
 		return NULL;
 	}
 
-	if (!lock_vol(cmd, vg_name, lock_flags)) {
-		log_error("Can't get lock for %s", vg_name);
-		return NULL;
+	lock = (misc_flags & ORPHAN_LOCK ? VG_ORPHANS : vg_name);
+	if (!(misc_flags & DISABLE_LOCK)) {
+		if (!lock_vol(cmd, lock, lock_flags)) {
+			log_error("Can't get lock for %s", vg_name);
+			return _vg_make_handle(cmd, vg, FAILED_LOCKING);
+		}
 	}
 
-	if (!(vg = vg_read(cmd, vg_name, vgid, &consistent)) ||
-	    ((misc_flags & FAIL_INCONSISTENT) && !consistent)) {
-		log_error("Volume group \"%s\" not found", vg_name);
-		unlock_vg(cmd, vg_name);
-		return NULL;
+	if (misc_flags & ORPHAN_LOCK)
+		status_flags &= ~LVM_WRITE;
+
+	if (misc_flags & EXISTENCE_CHECK)
+		consistent = 0;
+
+	consistent_in = consistent;
+
+	/* If consistent == 1, we get NULL here if correction fails. */
+	if (!(vg = vg_read_internal(cmd, vg_name, vgid, &consistent))) {
+		if (consistent_in && !consistent) {
+			log_error("Volume group \"%s\" inconsistent.", vg_name);
+			failure |= FAILED_INCONSISTENT;
+			goto_bad;
+		}
+		if (!(misc_flags & EXISTENCE_CHECK))
+			log_error("Volume group \"%s\" not found", vg_name);
+		failure |= FAILED_NOTFOUND | (misc_flags & EXISTENCE_CHECK);
+		goto_bad;
 	}
 
-	if (!vg_check_status(vg, status_flags)) {
-		unlock_vg(cmd, vg_name);
-		return NULL;
+	/* consistent == 0 when VG is not found, but failed == FAILED_NOTFOUND */
+	if (!consistent && !failure) {
+		vg = _recover_vg(cmd, lock, vg_name, vgid, lock_flags);
+		if (!vg) {
+			log_error("Recovery of volume group \"%s\" failed.",
+			  vg_name);
+			failure |= FAILED_INCONSISTENT;
+			goto_bad;
+		}
 	}
 
-	return vg;
+	failure |= _vg_check_status(vg, status_flags);
+	if (failure)
+		goto_bad;
+
+	return _vg_make_handle(cmd, vg, failure);
+ bad:
+	if (failure != (FAILED_NOTFOUND | EXISTENCE_CHECK))
+		if (!(misc_flags & KEEP_LOCK) && !(misc_flags & DISABLE_LOCK))
+			unlock_vg(cmd, lock);
+	return _vg_make_handle(cmd, vg, failure);
 }
 
 /*
diff -rN -p -u old-lvmlib/lib/metadata/metadata-exported.h new-lvmlib/lib/metadata/metadata-exported.h
--- old-lvmlib/lib/metadata/metadata-exported.h	2008-12-12 10:17:29.049888169 +0100
+++ new-lvmlib/lib/metadata/metadata-exported.h	2008-12-12 10:17:29.081893075 +0100
@@ -76,7 +76,7 @@ struct pv_segment;
 						   written out in metadata*/
 
 //#define POSTORDER_FLAG	0x02000000U /* Not real flags, reserved for
-//#define POSTORDER_OPEN_FLAG	0x04000000U    temporary use inside vg_read. */
+//#define POSTORDER_OPEN_FLAG	0x04000000U    temporary use inside vg_read_internal. */
 
 #define LVM_READ              	0x00000100U	/* LV VG */
 #define LVM_WRITE             	0x00000200U	/* LV VG */
@@ -99,6 +99,32 @@ struct pv_segment;
 #define CORRECT_INCONSISTENT    0x00000001U /* Correct inconsistent metadata */
 #define FAIL_INCONSISTENT       0x00000002U /* Fail if metadata inconsistent */
 
+/* vg_read and vg_read_for_update flags */
+#define ALLOW_INCONSISTENT 0x1
+#define ALLOW_EXPORTED 0x2
+#define REQUIRE_RESIZEABLE 0x4
+#define EXISTENCE_CHECK 0x8
+
+#define NONBLOCKING_LOCK 0x100
+#define KEEP_LOCK 0x200
+#define DISABLE_LOCK 0x400
+#define ORPHAN_LOCK 0x800
+
+#define READ_FOR_UPDATE 0x1000
+
+/* vg's "read_failed" field */
+#define FAILED_INCONSISTENT 0x1
+#define FAILED_LOCKING 0x2
+#define FAILED_NOTFOUND 0x4
+// 0x8 is left out for EXISTENCE_CHECK
+
+#define FAILED_READ_ONLY 0x10
+#define FAILED_EXPORTED 0x20
+#define FAILED_RESIZEABLE 0x40
+#define FAILED_CLUSTERED 0x80
+
+#define FAILED_ALLOCATION 0x100
+
 /* Mirror conversion type flags */
 #define MIRROR_BY_SEG		0x00000001U	/* segment-by-segment mirror */
 #define MIRROR_BY_LV		0x00000002U	/* mirror using whole mimage LVs */
@@ -197,6 +223,8 @@ struct volume_group {
 	char *system_id;
 
 	uint32_t status;
+	uint32_t read_failed;
+
 	alloc_policy_t alloc;
 
 	uint32_t extent_size;
@@ -328,7 +356,7 @@ struct lv_list {
 int vg_write(struct volume_group *vg);
 int vg_commit(struct volume_group *vg);
 int vg_revert(struct volume_group *vg);
-struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name,
+struct volume_group *vg_read_internal(struct cmd_context *cmd, const char *vg_name,
 			     const char *vgid, int *consistent);
 struct physical_volume *pv_read(struct cmd_context *cmd, const char *pv_name,
 				struct dm_list *mdas, uint64_t *label_sector,
@@ -348,11 +376,20 @@ int is_orphan(const pv_t *pv);
 int vgs_are_compatible(struct cmd_context *cmd,
 		       struct volume_group *vg_from,
 		       struct volume_group *vg_to);
+
 vg_t *vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
 		       const char *vgid,
 		       uint32_t lock_flags, uint32_t status_flags,
 		       uint32_t misc_flags);
 
+uint32_t vg_read_error(vg_t *vg);
+uint32_t vg_exists(vg_t *vg);
+vg_t *vg_read(struct cmd_context *cmd, const char *vg_name,
+	      const char *vgid, uint32_t flags);
+
+vg_t *vg_read_for_update(struct cmd_context *cmd, const char *vg_name,
+			 const char *vgid, uint32_t flags);
+
 /* pe_start and pe_end relate to any existing data so that new metadata
 * areas can avoid overlap */
 pv_t *pv_create(const struct cmd_context *cmd,
@@ -378,7 +415,7 @@ struct volume_group *vg_create(struct cm
 			       int pv_count, char **pv_names);
 int vg_remove(struct volume_group *vg);
 int vg_remove_single(struct cmd_context *cmd, const char *vg_name,
-		     struct volume_group *vg, int consistent,
+		     struct volume_group *vg,
 		     force_t force);
 int vg_rename(struct cmd_context *cmd, struct volume_group *vg,
 	      const char *new_name);
@@ -501,7 +538,7 @@ int vg_add_snapshot(const char *name,
 
 int vg_remove_snapshot(struct logical_volume *cow);
 
-int vg_check_status(const struct volume_group *vg, uint32_t status);
+uint32_t vg_check_status(const struct volume_group *vg, uint32_t status);
 
 /*
 * Mirroring functions
diff -rN -p -u old-lvmlib/lib/metadata/metadata.h new-lvmlib/lib/metadata/metadata.h
--- old-lvmlib/lib/metadata/metadata.h	2008-12-12 10:17:29.033890815 +0100
+++ new-lvmlib/lib/metadata/metadata.h	2008-12-12 10:17:29.085893444 +0100
@@ -68,12 +68,13 @@
 //						   written out in metadata*/
 
 #define POSTORDER_FLAG		0x02000000U /* Not real flags, reserved for  */
-#define POSTORDER_OPEN_FLAG	0x04000000U /* temporary use inside vg_read. */
+#define POSTORDER_OPEN_FLAG	0x04000000U /* temporary use inside vg_read_internal. */
 
 //#define LVM_READ              	0x00000100U	/* LV VG */
 //#define LVM_WRITE             	0x00000200U	/* LV VG */
 //#define CLUSTERED         	0x00000400U	/* VG */
 #define SHARED            	0x00000800U	/* VG */
+//#define INCONSISTENT_VG         0x00001000U	/* VG */
 
 /* Format features flags */
 //#define FMT_SEGMENTS		0x00000001U	/* Arbitrary segment params? */

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]