[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" o
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" option |
Date: |
Tue, 19 Apr 2016 20:58:25 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sat, 04/16 17:32, Denis V. Lunev wrote:
> On 04/15/2016 06:28 AM, Fam Zheng wrote:
> >Signed-off-by: Fam Zheng <address@hidden>
> >---
> > qemu-nbd.c | 6 +++++-
> > qemu-nbd.texi | 2 ++
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> >diff --git a/qemu-nbd.c b/qemu-nbd.c
> >index b5751f8..37da7a9 100644
> >--- a/qemu-nbd.c
> >+++ b/qemu-nbd.c
> >@@ -464,7 +464,7 @@ int main(int argc, char **argv)
> > off_t fd_size;
> > QemuOpts *sn_opts = NULL;
> > const char *sn_id_or_name = NULL;
> >- const char *sopt = "hVb:o:p:rsnP:c:dvk:e:f:tl:x:";
> >+ const char *sopt = "hVb:o:p:rsnLP:c:dvk:e:f:tl:x:";
> > struct option lopt[] = {
> > { "help", no_argument, NULL, 'h' },
> > { "version", no_argument, NULL, 'V' },
> >@@ -473,6 +473,7 @@ int main(int argc, char **argv)
> > { "socket", required_argument, NULL, 'k' },
> > { "offset", required_argument, NULL, 'o' },
> > { "read-only", no_argument, NULL, 'r' },
> >+ { "no-lock", no_argument, NULL, 'L' },
> > { "partition", required_argument, NULL, 'P' },
> > { "connect", required_argument, NULL, 'c' },
> > { "disconnect", no_argument, NULL, 'd' },
> >@@ -628,6 +629,9 @@ int main(int argc, char **argv)
> > nbdflags |= NBD_FLAG_READ_ONLY;
> > flags &= ~BDRV_O_RDWR;
> > break;
> >+ case 'L':
> >+ flags |= BDRV_O_NO_LOCK;
> >+ break;
> > case 'P':
> > partition = strtol(optarg, &end, 0);
> > if (*end) {
> >diff --git a/qemu-nbd.texi b/qemu-nbd.texi
> >index 9f23343..6b7b1d1 100644
> >--- a/qemu-nbd.texi
> >+++ b/qemu-nbd.texi
> >@@ -43,6 +43,8 @@ Force the use of the block driver for format @var{fmt}
> >instead of
> > auto-detecting
> > @item -r, --read-only
> > Export the disk as read-only
> >address@hidden -L, --no-lock
> >+Disable image locking
> > @item -P, address@hidden
> > Only expose partition @var{num}
> > @item -s, --snapshot
> pls fix
>
> static void usage(const char *name)
> {
> (printf) (
> "Usage: %s [OPTIONS] FILE\n"
>
Will do.
Fam
- [Qemu-block] [PATCH for-2.7 v2 08/17] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, (continued)
- [Qemu-block] [PATCH for-2.7 v2 08/17] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 09/17] qemu-img: Add "-L" option to sub commands, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 10/17] qemu-img: Update documentation of "-L" option, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" option, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 12/17] qemu-iotests: 140: Disable image lock for qemu-io access, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 13/17] qemu-iotests: 046: Move version detection out from verify_io, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 15/17] qemu-iotests: Disable image lock when checking test image, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 14/17] qemu-iotests: Wait for QEMU processes before checking image in 091, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 16/17] block: Turn on image locking by default, Fam Zheng, 2016/04/14
- [Qemu-block] [PATCH for-2.7 v2 17/17] qemu-iotests: Add test case 152 for image locking, Fam Zheng, 2016/04/14
- Re: [Qemu-block] [PATCH for-2.7 v2 00/17] block: Lock images when opening, Denis V. Lunev, 2016/04/16
- Re: [Qemu-block] [PATCH for-2.7 v2 00/17] block: Lock images when opening, Daniel P. Berrange, 2016/04/18