search for: feaf468

Displaying 5 results from an estimated 5 matches for "feaf468".

2019 May 28
2
Re: [libnbd PATCH 4/4] api: Add DF flag support for pread
On Mon, May 27, 2019 at 09:01:01PM -0500, Eric Blake wrote: > diff --git a/lib/rw.c b/lib/rw.c > index feaf468..343c340 100644 > --- a/lib/rw.c > +++ b/lib/rw.c > @@ -234,11 +234,17 @@ int64_t > nbd_unlocked_aio_pread (struct nbd_handle *h, void *buf, > size_t count, uint64_t offset, uint32_t flags) > { > - if (flags != 0) { > + if ((flags & ~LIBNBD_C...
2019 May 28
0
[libnbd PATCH 4/4] api: Add DF flag support for pread
...nbd_unlocked_can_zero (struct nbd_handle *h) return get_flag (h, NBD_FLAG_SEND_WRITE_ZEROES); } +int +nbd_unlocked_can_df (struct nbd_handle *h) +{ + return get_flag (h, NBD_FLAG_SEND_DF); +} + int nbd_unlocked_can_multi_conn (struct nbd_handle *h) { diff --git a/lib/rw.c b/lib/rw.c index feaf468..343c340 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -234,11 +234,17 @@ int64_t nbd_unlocked_aio_pread (struct nbd_handle *h, void *buf, size_t count, uint64_t offset, uint32_t flags) { - if (flags != 0) { + if ((flags & ~LIBNBD_CMD_FLAG_DF) != 0) { set_error (EINV...
2019 May 28
0
Re: [libnbd PATCH 4/4] api: Add DF flag support for pread
On 5/28/19 4:26 AM, Richard W.M. Jones wrote: > On Mon, May 27, 2019 at 09:01:01PM -0500, Eric Blake wrote: >> diff --git a/lib/rw.c b/lib/rw.c >> index feaf468..343c340 100644 >> --- a/lib/rw.c >> +++ b/lib/rw.c >> @@ -234,11 +234,17 @@ int64_t >> nbd_unlocked_aio_pread (struct nbd_handle *h, void *buf, >> size_t count, uint64_t offset, uint32_t flags) >> { >> - if (flags != 0) { >&g...
2019 May 28
0
[libnbd PATCH 2/4] api: Rearrange flags argument to block_status
...&exportsize, cb) == -1) { + if (nbd_block_status (nbd, exportsize, 0, &exportsize, cb, + LIBNBD_CMD_FLAG_REQ_ONE) == -1) { fprintf (stderr, "%s\n", nbd_get_error ()); exit (EXIT_FAILURE); } diff --git a/lib/rw.c b/lib/rw.c index bd453d1..feaf468 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -127,13 +127,12 @@ nbd_unlocked_zero (struct nbd_handle *h, /* Issue a block status command and wait for the reply. */ int nbd_unlocked_block_status (struct nbd_handle *h, - uint64_t count, uint64_t offset, uint32_t flags, -...
2019 May 28
6
[RFC libnbd PATCH 0/4] Add CMD_FLAG_DF support
RFC because this is an API break, but we haven't declared stable API yet. If we like it, I'm working on using libnbd to implement the nbdkit-nbd plugin; knowing whether it is API version 0.1 or 0.2 will be useful. I also dabbled with allowing optional parameters in python, although my OCaml is weak enough that there may be cleaner ways to approach that. Eric Blake (4): api: Add flags