public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 lib/activate/activate.c libdm/libdm-deptree.c
Date: Mon, 26 Sep 2011 10:17:00 -0000	[thread overview]
Message-ID: <20110926101758.13423.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2011-09-26 10:17:52

Modified files:
	lib/activate   : activate.c 
	libdm          : libdm-deptree.c 

Log message:
	Add log_error even for general device in use when we can't do the sysfs checks.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.213&r2=1.214
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.111&r2=1.112

--- LVM2/lib/activate/activate.c	2011/09/22 17:33:50	1.213
+++ LVM2/lib/activate/activate.c	2011/09/26 10:17:51	1.214
@@ -533,8 +533,15 @@
 		return 1;
 
 	/* If sysfs is not used, use open_count information only. */
-	if (!*dm_sysfs_dir())
-		return !info->open_count;
+	if (!*dm_sysfs_dir()) {
+		if (info->open_count) {
+			log_error("Logical volume %s/%s in use.",
+				  lv->vg->name, lv->name);
+			return 0;
+		}
+
+		return 1;
+	}
 
 	if (dm_device_has_holders(info->major, info->minor)) {
 		log_error("Logical volume %s/%s is used by another device.",
--- LVM2/libdm/libdm-deptree.c	2011/09/22 17:36:50	1.111
+++ LVM2/libdm/libdm-deptree.c	2011/09/26 10:17:52	1.112
@@ -947,8 +947,15 @@
 		return 1;
 
 	/* If sysfs is not used, use open_count information only. */
-	if (!*dm_sysfs_dir())
-		return !info->open_count;
+	if (!*dm_sysfs_dir()) {
+		if (info->open_count) {
+			log_error("Device %" PRIu32 ":%" PRIu32 " in use",
+				  info->major, info->minor);
+			return 0;
+		}
+
+		return 1;
+	}
 
 	if (dm_device_has_holders(info->major, info->minor)) {
 		log_error("Device %" PRIu32 ":%" PRIu32 " is used "


                 reply	other threads:[~2011-09-26 10:17 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=20110926101758.13423.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).