Skip to contentSkip to conversation

Fix blktap script

PATCH In review Masaki Kanno 2 participants 3 messages Jan 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix blktap script

Hi,

I believe that we should use fatal() in xen-hotplug-common.sh if the file does not exist.

Best regards,
Kan

tools/examples/blktap Thu Jan 24 14:57:48 2008 +0900 renamed from tools/examples/blktap Wed Jan 23 15:42:52 2008 +0000 +3 -3
diff -r 1c826ea72a80 tools/examples/blktap
@@ -71,9 +71,9 @@ fi
 fi
 # some versions of readlink cannot be passed a regular file
 if [ -L "$p" ]; then
-    file=$(readlink -f "$p") || ebusy "$p link does not exist."
+    file=$(readlink -f "$p") || fatal "$p link does not exist."
 else
-    [ -f "$p" ] || { ebusy "$p file does not exist."; }
+    [ -f "$p" ] || { fatal "$p file does not exist."; }
     file="$p"
 fi
 
@@ -85,7 +85,7 @@ fi
 
 if [ "$command" = 'add' ]
 then
-    [ -e "$file" ] || { ebusy $file does not exist; }
+    [ -e "$file" ] || { fatal $file does not exist; }
     success
 fi
#1 lore raw

Masaki Kanno writes ("[Xen-devel] [PATCH] Fix blktap script"):

Quoted 2 lines

I believe that we should use fatal() in xen-hotplug-common.sh if the file does not exist.

I would tend to agree but I presume that this was done like this because of some kind of race. Do we know what that race was and whether it has been fixed properly in the meantime ?

Ian.

#2 lore raw
Quoted 7 lines · Ian Jackson

Masaki Kanno writes ("[Xen-devel] [PATCH] Fix blktap script"):

Quoted 2 lines

I believe that we should use fatal() in xen-hotplug-common.sh if the file does not exist.

I would tend to agree but I presume that this was done like this because of some kind of race. Do we know what that race was and whether it has been fixed properly in the meantime ?

Hi Ian,

I don't know the race. Mails of related patche are as follows.

http://lists.xensource.com/archives/html/xen-devel/2006-11/msg00355.html
http://lists.xensource.com/archives/html/xen-devel/2007-08/msg00557.html

Best regards,
Kan