search for: nbd_cmd_flag_no_hol

Displaying 20 results from an estimated 83 matches for "nbd_cmd_flag_no_hol".

Did you mean: nbd_cmd_flag_no_hole
2018 Apr 10
4
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...ge actually being zeroed after this. > > > > So it seems that may_trim=1 is wrong, since trim cannot replace zero. Note that the current plugin ignores may_trim. It is not used at all, so it's not relevant to this problem. However this flag actually corresponds to the inverse of NBD_CMD_FLAG_NO_HOLE which is defined by the NBD spec as: bit 1, NBD_CMD_FLAG_NO_HOLE; valid during NBD_CMD_WRITE_ZEROES. SHOULD be set to 1 if the client wants to ensure that the server does not create a hole. The client MAY send NBD_CMD_FLAG_NO_HOLE even if NBD_FLAG_SEND_TRIM was not set in the...
2018 Apr 10
0
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...;>> >> >> So it seems that may_trim=1 is wrong, since trim cannot replace zero. > > Note that the current plugin ignores may_trim. It is not used at all, > so it's not relevant to this problem. > > However this flag actually corresponds to the inverse of > NBD_CMD_FLAG_NO_HOLE which is defined by the NBD spec as: > > bit 1, NBD_CMD_FLAG_NO_HOLE; valid during > NBD_CMD_WRITE_ZEROES. SHOULD be set to 1 if the client wants to > ensure that the server does not create a hole. The client MAY send > NBD_CMD_FLAG_NO_HOLE even if NBD_FLAG_SEND_TRI...
2019 Sep 24
2
[PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
...NBD_SIMPLE_REPLY_MAGIC 0x67446698 @@ -239,12 +239,11 @@ struct nbd_structured_reply_error { #define NBD_CMD_WRITE_ZEROES 6 #define NBD_CMD_BLOCK_STATUS 7 -/* Command flags. Exposed by the generator as LIBNBD_CMD_FLAG_* instead -#define NBD_CMD_FLAG_FUA (1<<0) -#define NBD_CMD_FLAG_NO_HOLE (1<<1) -#define NBD_CMD_FLAG_DF (1<<2) -#define NBD_CMD_FLAG_REQ_ONE (1<<3) -*/ +#define NBD_CMD_FLAG_FUA (1<<0) +#define NBD_CMD_FLAG_NO_HOLE (1<<1) +#define NBD_CMD_FLAG_DF (1<<2) +#define NBD_CMD_FLAG_REQ_ONE (1<<3) +#define NBD...
2018 Apr 10
0
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...> > > > > > So it seems that may_trim=1 is wrong, since trim cannot replace zero. > > Note that the current plugin ignores may_trim. It is not used at all, > so it's not relevant to this problem. > > However this flag actually corresponds to the inverse of > NBD_CMD_FLAG_NO_HOLE which is defined by the NBD spec as: > > bit 1, NBD_CMD_FLAG_NO_HOLE; valid during > NBD_CMD_WRITE_ZEROES. SHOULD be set to 1 if the client wants to > ensure that the server does not create a hole. The client MAY send > NBD_CMD_FLAG_NO_HOLE even if NBD_FLAG_SEND_TRIM...
2017 Nov 15
1
[nbdkit PATCH] connections: Improve error responses
...17,20 @@ validate_request (struct connection *conn, nbdkit_error ("invalid request: unknown command (%" PRIu32 ") ignored", cmd); *error = EINVAL; - return 0; + return false; } /* Validate flags */ if (flags & ~(NBD_CMD_FLAG_FUA | NBD_CMD_FLAG_NO_HOLE)) { nbdkit_error ("invalid request: unknown flag (0x%x)", flags); *error = EINVAL; - return 0; + return false; } if ((flags & NBD_CMD_FLAG_NO_HOLE) && cmd != NBD_CMD_WRITE_ZEROES) { nbdkit_error ("invalid request: NO_HOLE flag needs WRIT...
2019 Mar 29
3
[nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
...FLAG_SEND_DF (1 << 7) #define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* NBD options (new style handshake only). */ @@ -217,6 +218,7 @@ extern const char *name_of_nbd_cmd (int); extern const char *name_of_nbd_cmd_flag (int); #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) +#define NBD_CMD_FLAG_DF (1<<2) #define NBD_CMD_FLAG_REQ_ONE (1<<3) /* Error codes (previously errno). diff --git a/server/protocol-handshake.c b/server/protocol-handshake.c index 9653210..f0e5a2c 100644 --- a/server/protocol-handshake.c +++ b/server/protocol-ha...
2019 Aug 23
1
[nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO
...; 11) /* NBD options (new style handshake only). */ extern const char *name_of_nbd_opt (int); @@ -223,10 +224,11 @@ extern const char *name_of_nbd_cmd (int); #define NBD_CMD_BLOCK_STATUS 7 extern const char *name_of_nbd_cmd_flag (int); -#define NBD_CMD_FLAG_FUA (1<<0) -#define NBD_CMD_FLAG_NO_HOLE (1<<1) -#define NBD_CMD_FLAG_DF (1<<2) -#define NBD_CMD_FLAG_REQ_ONE (1<<3) +#define NBD_CMD_FLAG_FUA (1<<0) +#define NBD_CMD_FLAG_NO_HOLE (1<<1) +#define NBD_CMD_FLAG_DF (1<<2) +#define NBD_CMD_FLAG_REQ_ONE (1<<3) +#define NBD_CMD...
2019 Sep 24
0
Re: [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
...> char zeroes[124]; /* must be sent as zero bytes */ > -} __attribute__((packed)); > +} NBD_ATTRIBUTE_PACKED; Redundant type. > > -/* Command flags. Exposed by the generator as LIBNBD_CMD_FLAG_* instead > -#define NBD_CMD_FLAG_FUA (1<<0) > -#define NBD_CMD_FLAG_NO_HOLE (1<<1) > -#define NBD_CMD_FLAG_DF (1<<2) > -#define NBD_CMD_FLAG_REQ_ONE (1<<3) > -*/ > +#define NBD_CMD_FLAG_FUA (1<<0) > +#define NBD_CMD_FLAG_NO_HOLE (1<<1) > +#define NBD_CMD_FLAG_DF (1<<2) > +#define NBD_CMD_FLAG_...
2017 Jan 20
7
[nbdkit PATCH 0/5] Add WRITE_ZEROES support
The upstream protocol recently promoted NBD_CMD_WRITE_ZEROES from experimental to a documented extension. Exposing support for this allows plugin writers to create sparse files when driven by a client that knows how to use the extension; meanwhile, even if a plugin does not support this extension, the server benefits from less network traffic from the client. Eric Blake (5): protocol: Support
2019 Mar 20
0
[PATCH nbdkit 3/8] server: Implement Block Status requests to read allocation status.
...,12 @@ extern const char *name_of_nbd_cmd (int); #define NBD_CMD_FLUSH 3 #define NBD_CMD_TRIM 4 #define NBD_CMD_WRITE_ZEROES 6 +#define NBD_CMD_BLOCK_STATUS 7 extern const char *name_of_nbd_cmd_flag (int); #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) +#define NBD_CMD_FLAG_REQ_ONE (1<<3) /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c index db01f7b..0b...
2019 Mar 29
0
Re: [nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
...7) > #define NBD_FLAG_CAN_MULTI_CONN (1 << 8) > > /* NBD options (new style handshake only). */ > @@ -217,6 +218,7 @@ extern const char *name_of_nbd_cmd (int); > extern const char *name_of_nbd_cmd_flag (int); > #define NBD_CMD_FLAG_FUA (1<<0) > #define NBD_CMD_FLAG_NO_HOLE (1<<1) > +#define NBD_CMD_FLAG_DF (1<<2) > #define NBD_CMD_FLAG_REQ_ONE (1<<3) > > /* Error codes (previously errno). > diff --git a/server/protocol-handshake.c b/server/protocol-handshake.c > index 9653210..f0e5a2c 100644 > --- a/server/protocol-h...
2018 Jan 16
9
[nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
Tested via: term1$ qemu-nbd -k $PWD/sock -t -f raw -x foo junk --trace=nbd_\* term2$ ./nbdkit -f -v -e bar nbd socket=$PWD/sock export=foo term3$ qemu-io -t none -f raw nbd://localhost:10809/bar --trace=nbd_\* and checking the traces to see that 'w 0 1' vs. 'w -f 0 1' was able to influence whether the FUA flag showed up at the server in term1. Still to go: figure out how to
2018 Apr 10
4
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
Am 10.04.2018 um 15:03 hat Nir Soffer geschrieben: > On Tue, Apr 10, 2018 at 1:44 PM Richard W.M. Jones <rjones@redhat.com> > wrote: > > > We now have true zeroing support in oVirt imageio, thanks for that. > > > > However a problem is that ‘qemu-img convert’ issues zero requests for > > the whole disk before starting the transfer. It does this using 32 MB
2019 Mar 19
0
[PATCH nbdkit 3/9] server: Implement Block Status requests to read allocation status.
...,12 @@ extern const char *name_of_nbd_cmd (int); #define NBD_CMD_FLUSH 3 #define NBD_CMD_TRIM 4 #define NBD_CMD_WRITE_ZEROES 6 +#define NBD_CMD_BLOCK_STATUS 7 extern const char *name_of_nbd_cmd_flag (int); #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) +#define NBD_CMD_FLAG_REQ_ONE (1<<3) /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c index db01f7b..5e...
2019 Apr 01
3
Re: [nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
...AG_CAN_MULTI_CONN (1 << 8) >> >> /* NBD options (new style handshake only). */ >> @@ -217,6 +218,7 @@ extern const char *name_of_nbd_cmd (int); >> extern const char *name_of_nbd_cmd_flag (int); >> #define NBD_CMD_FLAG_FUA (1<<0) >> #define NBD_CMD_FLAG_NO_HOLE (1<<1) >> +#define NBD_CMD_FLAG_DF (1<<2) >> #define NBD_CMD_FLAG_REQ_ONE (1<<3) >> >> /* Error codes (previously errno). >> diff --git a/server/protocol-handshake.c b/server/protocol-handshake.c >> index 9653210..f0e5a2c 100644 >&...
2020 Feb 12
1
Re: Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
On Wed, Feb 12, 2020 at 06:09:11AM -0600, Eric Blake wrote: > On 2/12/20 1:27 AM, Wouter Verhelst wrote: > >Hi, > > > >On Mon, Feb 10, 2020 at 10:52:55PM +0000, Richard W.M. Jones wrote: > >>But anyway ... could a flag indicating that the whole image is sparse > >>be useful, either as well as NBD_INIT_SPARSE or instead of it? You > >>could use it to
2019 Mar 18
0
[PATCH nbdkit 2/2] server: Split out NBD protocol code from connections code.
...r = EINVAL; - return false; - } - break; - - default: - nbdkit_error ("invalid request: unknown command (%" PRIu32 ") ignored", - cmd); - *error = EINVAL; - return false; - } - - /* Validate flags */ - if (flags & ~(NBD_CMD_FLAG_FUA | NBD_CMD_FLAG_NO_HOLE)) { - nbdkit_error ("invalid request: unknown flag (0x%x)", flags); - *error = EINVAL; - return false; - } - if ((flags & NBD_CMD_FLAG_NO_HOLE) && - cmd != NBD_CMD_WRITE_ZEROES) { - nbdkit_error ("invalid request: NO_HOLE flag needs WRITE_ZEROES reques...
2019 Sep 16
1
[libnbd PATCH] api: Add set_handshake_flags for integration
...BD_FLAG_HAS_FLAGS (1 << 0) @@ -238,10 +239,12 @@ struct nbd_structured_reply_error { #define NBD_CMD_WRITE_ZEROES 6 #define NBD_CMD_BLOCK_STATUS 7 +/* Command flags. Exposed by the generator as LIBNBD_CMD_FLAG_* instead #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) #define NBD_CMD_FLAG_DF (1<<2) #define NBD_CMD_FLAG_REQ_ONE (1<<3) +*/ /* NBD error codes. */ #define NBD_SUCCESS 0 diff --git a/generator/generator b/generator/generator index a72f36c..170121e 100755 --- a/generator/generator +++ b/generator/generator @@...
2018 Dec 06
0
[PATCH nbdkit 3/5] protocol: Generate map functions from NBD protocol flags to printable strings.
...ne NBD_CMD_WRITE 1 #define NBD_CMD_DISC 2 /* Disconnect. */ @@ -155,12 +162,14 @@ struct reply { #define NBD_CMD_TRIM 4 #define NBD_CMD_WRITE_ZEROES 6 +extern const char *name_of_nbd_cmd_flag (int); #define NBD_CMD_FLAG_FUA (1<<0) #define NBD_CMD_FLAG_NO_HOLE (1<<1) /* Error codes (previously errno). * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb */ +extern const char *name_of_nbd_error (int); #define NBD_SUCCESS 0 #define NBD_EPERM 1 #define NBD_EIO 5 diff --git a/.gitig...
2017 Jan 24
3
Re: [nbdkit PATCH 0/2] bind .zero to more languages
.... The spec says that the server is not required to trim (so falling back to pwrite is always appropriate), but the way the spec is worded, using fallocate(FALLOC_FL_PUNCH_HOLE) is only appropriate when the may_trim flag is set in the existing C interface (which in turn corresponds to a lack of the NBD_CMD_FLAG_NO_HOLE flag on the wire). Having a boolean can_zero() callback is insufficient to tell whether the plugin would behave differently for may_trim=0 vs. may_trim=1 So here's some ideas for alternative implementations in the language bindings: 1) give the binding a way to request graceful fallback to...