|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] fix sharing-check for blktap
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@xxxxxxxxxxxxxx>
Signed-off-by: Takanori Kasai <kasai.takanori@xxxxxxxxxxxxxx>
Best Regards,
--
Hirofumi Tsujimura
# HG changeset patch
# User tsujimura.hirof@xxxxxxxxxxxxxx
# 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@xxxxxxxxxxxxxx>
Signed-off-by: Takanori Kasai <kasai.takanori@xxxxxxxxxxxxxx>
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] fix sharing-check for blktap,
Hirofumi Tsujimura <=
|
|
|
|
|