From: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] fix sharing-check for blktap
Date: Tue, 22 Apr 2008 09:02:28 +0900 [thread overview]
Message-ID: <480D2B14.1060401@jp.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
Hi, all
This is a patch to run a check_blktap_sharing() only
when a disk is added to guest with blktap.
A check_blktap_sharing() doesn't have to be run when a disk is removed.
In actuality , a sharing check function is not run
when a disk is removed with block(VBD).
Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Best Regards,
--
Hirofumi Tsujimura
[-- Attachment #2: fix_sharing-check_for_blktap.patch --]
[-- Type: text/plain, Size: 1596 bytes --]
# HG changeset patch
# User tsujimura.hirof@jp.fujitsu.com
# Date 1208420638 -32400
# Node ID 8de7969c0979a3b71983a5452a8c81aabbb3e7fe
# Parent 08e010c3f2519a585e2948871ab6be0fe25d93d4
run check_blktap_sharing() only when a disk is added to a guest with blktap.
Signed-off-by: Hirofumi Tsujimura <tsujimura.hirof@jp.fujitsu.com>
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
diff -r 08e010c3f251 -r 8de7969c0979 tools/examples/blktap
--- a/tools/examples/blktap Tue Apr 15 16:39:00 2008 +0100
+++ b/tools/examples/blktap Thu Apr 17 17:23:58 2008 +0900
@@ -54,10 +54,6 @@
echo 'ok'
}
-FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
-FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm")
-mode=$(xenstore_read "$XENBUS_PATH/mode")
-mode=$(canonicalise_mode "$mode")
t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
if [ -n "$t" ]
@@ -77,15 +73,21 @@
file="$p"
fi
-if [ "$mode" != '!' ]
-then
- result=$(check_blktap_sharing "$file" "$mode")
- [ "$result" = 'ok' ] || ebusy "$file already in use by other domain"
-fi
-
if [ "$command" = 'add' ]
then
[ -e "$file" ] || { fatal $file does not exist; }
+
+ FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
+ FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm")
+ mode=$(xenstore_read "$XENBUS_PATH/mode")
+ mode=$(canonicalise_mode "$mode")
+
+ if [ "$mode" != '!' ]
+ then
+ result=$(check_blktap_sharing "$file" "$mode")
+ [ "$result" = 'ok' ] || ebusy "$file already in use by other domain"
+ fi
+
success
fi
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-04-22 0:02 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=480D2B14.1060401@jp.fujitsu.com \
--to=tsujimura.hirof@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.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.