All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>, keir.fraser@citrix.com
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH]fix losetup -r flag when sharing disk
Date: Fri, 25 Jan 2008 18:08:04 +0800	[thread overview]
Message-ID: <4799B504.30703@oracle.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

hi keir,

this small patch fixes the losetup -r flag when we specify 'w!' to the disk mode.

the mode from canonicalise_mode can be 'r' 'w' or '!'. ian's patch doesn't consider
the '!' case.

when I specify 'w!' to a disk mode, will results disk setup failure.
log in /var/log/xen/xen-hotplug.log:
[--snip--]
losetup: invalid option -- !
usage:
  losetup loop_device                                       # give info
  losetup -d loop_device                                    # delete
  losetup -f                                                # find unused
  losetup -a                                                # list all used
  losetup -r                                                # read-only loop
  losetup [-e encryption] [-o offset] [-r] {-f|loop_device} file # setup
xenstore-read: couldn't read path backend/vbd/1/768/node
[--snip--]

ian, please confirm.

this patch should apply to xen-unstable and xen-3.2-testing as well.

regards,

zhigang

[-- Attachment #2: block-roflag-sharing.patch --]
[-- Type: text/x-patch, Size: 462 bytes --]

--- xen-unstable/tools/examples/block.orig	2008-01-25 17:52:19.000000000 +0800
+++ xen-unstable/tools/examples/block	2008-01-25 17:53:38.000000000 +0800
@@ -329,7 +329,7 @@ mount it read-write in a guest domain."
 
         if LANG=C losetup -h 2>&1 | grep read-only >/dev/null
         then
-          roflag="-$mode"; roflag="${roflag#-w}"
+          roflag="-$mode"; roflag="${roflag#-w}"; roflag="${roflag#-!}"
         else
           roflag=''
         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-01-25 10:08 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=4799B504.30703@oracle.com \
    --to=zhigang.x.wang@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir.fraser@citrix.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.