search for: nbd_cmd_flag_req_one

Displaying 20 results from an estimated 60 matches for "nbd_cmd_flag_req_one".

2019 Mar 29
3
[nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
.../* 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-handshake.c @@ -121,6 +121,9 @@ protocol_compute_eflags (struct connection *conn, uint16_t...
2019 Mar 11
2
Re: Supporting sparse disks in nbdkit
...ays 0? */, > > Unless we support the REQ_ONE flag (where the client specifically wants > only one extent returned). ... > > nbdkit would need to do some massaging on this to get it into the > > right format for NBD_CMD_BLOCK_STATUS. (I'm very confused about what > > NBD_CMD_FLAG_REQ_ONE is supposed to do.) > > REQ_ONE says that a successful answer has to be exactly one extent, > covering only the head of the region. (That is, force the server to > behave as if obtaining information beyond the first extent is > expensive). It also tells the server that it must not r...
2019 Mar 29
0
Re: [nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
...andshake 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-handshake.c > @@ -121,6 +121,9 @@ protocol_compute_eflags...
2019 Sep 24
2
[PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
...y_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_CMD_FLAG_FAST_ZERO (1<<4) /* NBD error codes. */ #define NBD_SUCCESS 0 --...
2019 Mar 12
2
Re: Supporting sparse disks in nbdkit
...t the REQ_ONE flag (where the client specifically wants >>> only one extent returned). >> ... >>>> nbdkit would need to do some massaging on this to get it into the >>>> right format for NBD_CMD_BLOCK_STATUS. (I'm very confused about what >>>> NBD_CMD_FLAG_REQ_ONE is supposed to do.) >>> >>> REQ_ONE says that a successful answer has to be exactly one extent, >>> covering only the head of the region. (That is, force the server to >>> behave as if obtaining information beyond the first extent is >>> expensive). It a...
2019 Aug 23
1
[nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO
...t (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_FLAG_FAST_ZERO (1<<4) /* Error codes (previously errno). * See http://git.qemu...
2019 Apr 01
3
Re: [nbdkit PATCH] protocol: Trivially implement NBD_CMD_FLAG_DF
...gt; @@ -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-handshake.c >> @@ -121,6 +121,9...
2019 Mar 19
0
[PATCH nbdkit 3/9] server: Implement Block Status requests to read allocation status.
...nt); #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..5edeaf3 100644 --- a/server/protocol-handshake-...
2019 Mar 20
0
[PATCH nbdkit 3/8] server: Implement Block Status requests to read allocation status.
...nt); #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..0be185c 100644 --- a/server/protocol-handshake-...
2019 Mar 11
0
Re: Supporting sparse disks in nbdkit
...gt; Unless we support the REQ_ONE flag (where the client specifically wants >> only one extent returned). > ... >>> nbdkit would need to do some massaging on this to get it into the >>> right format for NBD_CMD_BLOCK_STATUS. (I'm very confused about what >>> NBD_CMD_FLAG_REQ_ONE is supposed to do.) >> >> REQ_ONE says that a successful answer has to be exactly one extent, >> covering only the head of the region. (That is, force the server to >> behave as if obtaining information beyond the first extent is >> expensive). It also tells the server...
2019 Sep 24
0
Re: [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
...d)); > +} 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_REQ_ONE (1<<3) > +#define NBD_CMD_FLAG_FAST_ZERO (1<<4) Another case where having...
2019 Mar 08
2
Supporting sparse disks in nbdkit
...he VDDK plugin easier), and adjacent extents of the same type would be coalesced automatically. But it's an error if returned extents overlap each other. nbdkit would need to do some massaging on this to get it into the right format for NBD_CMD_BLOCK_STATUS. (I'm very confused about what NBD_CMD_FLAG_REQ_ONE is supposed to do.) We will also need a corresponding ‘can_extents’, which is analogous to ‘can_write’ etc and is what would control the output of NBD_OPT_{SET,LIST}_META_CONTEXT. For nbdkit-file-filter: - Fairly simple implementation using SEEK_HOLE/SEEK_DATA. - Not sure how we detect zeroes w...
2019 Mar 12
0
Re: Supporting sparse disks in nbdkit
...where the client specifically wants > >>>only one extent returned). > >>... > >>>>nbdkit would need to do some massaging on this to get it into the > >>>>right format for NBD_CMD_BLOCK_STATUS. (I'm very confused about what > >>>>NBD_CMD_FLAG_REQ_ONE is supposed to do.) > >>> > >>>REQ_ONE says that a successful answer has to be exactly one extent, > >>>covering only the head of the region. (That is, force the server to > >>>behave as if obtaining information beyond the first extent is > >&gt...
2019 Apr 11
3
nbdkit, VDDK, extents, readahead, etc
...ps, 1734345216 bytes, 5.84423e+07 bits/s extents: 70 ops, 135654246400 bytes, 4.57114e+09 bits/s Note if you deduct 120 seconds (see point (1) above) from these times then it goes from 203s -> 117s, about a 40% saving. We can likely do better by having > 32 bit requests and qemu not using NBD_CMD_FLAG_REQ_ONE. (4) We can also add nbdkit-readahead-filter in both cases to see if that helps or not: With noextents and readahead: elapsed time: 325.358 s read: 265 ops, 17179869184 bytes, 4.22423e+08 bits/s As expected the readahead filter reduces the numbers of iops greatly. But in this back-to-back c...
2019 Apr 12
2
Re: nbdkit, VDDK, extents, readahead, etc
...tents: 70 ops, 135654246400 bytes, 4.57114e+09 bits/s > > > >Note if you deduct 120 seconds (see point (1) above) from these times > >then it goes from 203s -> 117s, about a 40% saving. We can likely do > >better by having > 32 bit requests and qemu not using > >NBD_CMD_FLAG_REQ_ONE. > > > How did you run qemu-img? The full command was: LD_LIBRARY_PATH=vmware-vix-disklib-distrib/lib64 \ ./nbdkit -r -U - vddk file="[datastore1] Fedora 28/Fedora 28.vmdk" \ libdir=vmware-vix-disklib-distrib \ server=vmware user=root...
2019 May 25
1
[nbdkit PATCH] nbd: Rewrite thread passing to use semaphore rather than pipe
...int32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents) { struct handle *h = handle; - int c; + struct transaction *s; assert (!(flags & ~NBDKIT_FLAG_REQ_ONE) && h->extents); - c = nbd_request_full (h, flags & NBDKIT_FLAG_REQ_ONE ? NBD_CMD_FLAG_REQ_ONE : 0, + s = nbd_request_full (h, flags & NBDKIT_FLAG_REQ_ONE ? NBD_CMD_FLAG_REQ_ONE : 0, NBD_CMD_BLOCK_STATUS, offset, count, NULL, NULL, extents); - return c < 0 ? c : nbd_reply (h, c); + return s ? nbd_reply (h, s) : -1; } /* Cache a p...
2022 Dec 16
1
[PATCH v2 1/6] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length
...on viable server implementations > than to add yet another round of handshaking. Also, mentioning > amplification effects is worthwhile. > > When qemu first implemented NBD_CMD_BLOCK_STATUS for the > base:allocation context (qemu commit e7b1948d51, Mar 2018), it behaved > as if NBD_CMD_FLAG_REQ_ONE were always passed by the client, and never > responded with more than one extent. Later, when adding its > qemu:dirty-bitmap:XYZ context extension (qemu commit 3d068aff16, Jun > 2018), it added a cap to 128k extents (1M+4 bytes), and that cap was > applied to base:allocation once qemu...
2019 Apr 15
1
Re: nbdkit, VDDK, extents, readahead, etc
...14e+09 bits/s > >>> > >>>Note if you deduct 120 seconds (see point (1) above) from these times > >>>then it goes from 203s -> 117s, about a 40% saving. We can likely do > >>>better by having > 32 bit requests and qemu not using > >>>NBD_CMD_FLAG_REQ_ONE. > >>> > >>How did you run qemu-img? > > > >The full command was: > > > >LD_LIBRARY_PATH=vmware-vix-disklib-distrib/lib64 \ > >./nbdkit -r -U - vddk file="[datastore1] Fedora 28/Fedora 28.vmdk" \ > > libdir=vmwar...
2023 Mar 03
1
[PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS
...arher than "file". NBD does not deal > (conceptually) with files... Agreed - we have been fairly consistent on the term 'export' (whether that export be a file or some other source of data). Will fix (perhaps separately and just push it as trivial). > > > - the `NBD_CMD_FLAG_REQ_ONE` flag, each chunk contains exactly one > > - descriptor where the *length* of the descriptor MUST NOT be > > - greater than the *length* of the request; otherwise, a chunk MAY > > - contain multiple descriptors, and the final descriptor MAY extend > > - beyond th...
2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
...gth of human readable error. */ - /* Followed by human readable error string. */ + /* Followed by human readable error string, and possibly more structure. */ } __attribute__((packed)); #define NBD_REQUEST_MAGIC 0x25609513 @@ -221,9 +239,7 @@ struct structured_reply_error { #define NBD_CMD_FLAG_REQ_ONE (1<<3) #define NBD_CMD_FLAG_FAST_ZERO (1<<4) -/* Error codes (previously errno). - * See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ca4414804114fd0095b317785bc0b51862e62ebb - */ +/* NBD error codes. */ #define NBD_SUCCESS 0 #define NBD_EPERM 1 #define NBD_EIO...