Displaying 6 results from an estimated 6 matches for "flag_df".
2019 Apr 23
0
[nbdkit PATCH 3/7] RFC: protocol: Only send EOVERFLOW when valid
...ver/protocol.c b/server/protocol.c
index a52bb56..0a9f73c 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -326,7 +326,7 @@ skip_over_write_buffer (int sock, size_t count)
/* Convert a system errno to an NBD_E* error code. */
static int
-nbd_errno (int error)
+nbd_errno (int error, bool flag_df)
{
switch (error) {
case 0:
@@ -349,7 +349,9 @@ nbd_errno (int error)
return NBD_ESHUTDOWN;
#endif
case EOVERFLOW:
- return NBD_EOVERFLOW;
+ if (flag_df)
+ return NBD_EOVERFLOW;
+ /* fallthrough */
case EINVAL:
default:
return NBD_EINVAL;
@@ -368,7 +370,7 @@...
2019 Aug 23
1
[nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO
.../
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_FLAG_FAST_ZERO (1<<4)
/* Error...
2019 Apr 23
3
Re: [nbdkit PATCH 3/7] RFC: protocol: Only send EOVERFLOW when valid
...a52bb56..0a9f73c 100644
> --- a/server/protocol.c
> +++ b/server/protocol.c
> @@ -326,7 +326,7 @@ skip_over_write_buffer (int sock, size_t count)
>
> /* Convert a system errno to an NBD_E* error code. */
> static int
> -nbd_errno (int error)
> +nbd_errno (int error, bool flag_df)
> {
> switch (error) {
> case 0:
> @@ -349,7 +349,9 @@ nbd_errno (int error)
> return NBD_ESHUTDOWN;
> #endif
> case EOVERFLOW:
> - return NBD_EOVERFLOW;
> + if (flag_df)
> + return NBD_EOVERFLOW;
> + /* fallthrough */
> case EIN...
2019 Mar 08
1
Re: [PATCH nbdkit] Minimal implementation of NBD Structured Replies.
On Fri, Mar 08, 2019 at 09:03:05AM -0600, Eric Blake wrote:
> On 3/8/19 4:04 AM, Richard W.M. Jones wrote:
> > Also we do not understand NBD_CMD_FLAG_DF, but that seems to be OK
> > because (a) we don't advertize the feature and (b) we only send back a
> > single chunk anyway.
>
> Or, we COULD advertise it because we always honor it (but that's a
> larger diffstat, and thus at odds with "minimal implementation&quo...
2019 Apr 23
12
[nbdkit PATCH 0/7] Implement structured replies in nbd plugin
I'm hoping to implement .extents for the nbd plugin; this is a
prerequisite. I'm not sure about patch 3 - if we like it, I'll
squash it to 2, if we don't, I think we are okay just dropping
it. I'm also wondering if we have to worry about malicious
plugins that don't populate the entire .pread buffer in an
effort to get nbdkit to expose portions of the heap; my patch 7
loses
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem
to four different projects:
- nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag
- qemu: Implement the flag for both clients and server
- libnbd: Implement the flag for clients
- nbdkit: Implement the flag for servers, including the nbd passthrough
client
If you want to test the patches together, I've pushed a