search for: nbd_flag_send_fua

Displaying 20 results from an estimated 27 matches for "nbd_flag_send_fua".

2017 Nov 15
1
[nbdkit PATCH] connections: Extract common export flag computation code
...return -1; + if (readonly || !fl) { + eflags |= NBD_FLAG_READ_ONLY; + conn->readonly = 1; + } + if (!conn->readonly) { + eflags |= NBD_FLAG_SEND_WRITE_ZEROES; + } + + fl = plugin_can_flush (conn); + if (fl == -1) + return -1; + if (fl) { + eflags |= NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA; + conn->can_flush = 1; + } + + fl = plugin_is_rotational (conn); + if (fl == -1) + return -1; + if (fl) { + eflags |= NBD_FLAG_ROTATIONAL; + conn->is_rotational = 1; + } + + fl = plugin_can_trim (conn); + if (fl == -1) + return -1; + if (fl) { + eflags |= NBD_FLAG_S...
2016 Sep 26
1
[PATCH] nbdkit: flags are 32 bits for oldstyle connections
...fl = plugin_can_write (conn); if (fl == -1) return -1; if (readonly || !fl) { - eflags |= NBD_FLAG_READ_ONLY; + flags |= NBD_FLAG_READ_ONLY; conn->readonly = 1; } @@ -184,7 +183,7 @@ if (fl == -1) return -1; if (fl) { - eflags |= NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA; + flags |= NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA; conn->can_flush = 1; } @@ -192,7 +191,7 @@ if (fl == -1) return -1; if (fl) { - eflags |= NBD_FLAG_ROTATIONAL; + flags |= NBD_FLAG_ROTATIONAL; conn->is_rotational = 1; } @@ -200,7 +199,7 @@ if (fl...
2018 Jan 24
0
[nbdkit PATCH 2/3] filter: Add .can_zero/.can_fua overrides
..., conn); if (fl == -1) @@ -435,13 +443,21 @@ compute_eflags (struct connection *conn, uint16_t *flags) eflags |= NBD_FLAG_SEND_TRIM; conn->can_trim = 1; } + + fl = backend->can_fua (backend, conn); + if (fl == -1) + return -1; + if (fl) { + eflags |= NBD_FLAG_SEND_FUA; + conn->can_fua = 1; + } } fl = backend->can_flush (backend, conn); if (fl == -1) return -1; if (fl) { - eflags |= NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA; + eflags |= NBD_FLAG_SEND_FLUSH; conn->can_flush = 1; } @@ -880,7 +896,7 @@ validate_request...
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 Aug 30
0
[nbdkit PATCH 6/9] server: Cache per-connection can_FOO flags
...st that did not match eflags. + */ + fl = backend_can_zero (backend, conn); + if (fl == -1) + return -1; + if (fl && can_write) + eflags |= NBD_FLAG_SEND_WRITE_ZEROES; - fl = backend_can_fua (backend, conn); - if (fl == -1) - return -1; - if (fl) { - eflags |= NBD_FLAG_SEND_FUA; - conn->can_fua = true; - } - } + fl = backend_can_trim (backend, conn); + if (fl == -1) + return -1; + if (fl && can_write) + eflags |= NBD_FLAG_SEND_TRIM; + + fl = backend_can_fua (backend, conn); + if (fl == -1) + return -1; + if (fl && can_write) +...
2019 Aug 30
3
[nbdkit PATCH v2 0/2] caching .can_write
This is a subset of the last half of the larger 9-patch series. The uncontroversial first half of that series is pushed, but here, I tried to reduce the size of the patches by splitting out some of the more complex changes, so that the rest of the changes remaining in the series are more mechanical. In turn, it forced me to write timing tests, which let me spot another spot where we are wasting
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
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
...if (fl) { eflags |= NBD_FLAG_SEND_TRIM; - conn->can_trim = 1; + conn->can_trim = true; } fl = backend->can_fua (backend, conn); @@ -443,7 +443,7 @@ compute_eflags (struct connection *conn, uint16_t *flags) return -1; if (fl) { eflags |= NBD_FLAG_SEND_FUA; - conn->can_fua = 1; + conn->can_fua = true; } } @@ -452,7 +452,7 @@ compute_eflags (struct connection *conn, uint16_t *flags) return -1; if (fl) { eflags |= NBD_FLAG_SEND_FLUSH; - conn->can_flush = 1; + conn->can_flush = true; } fl = back...
2018 Jan 24
8
[nbdkit PATCH 0/3] Add nozero filter
I still need to add testsuite coverage. Perhaps it might be easier if I create a new '--filter=log logfile=foo' filter that produces a log of which commands a client sent, then compare the log using a known client that uses write_zeroes (qemu-io works well) both with and without --filter=nozero to prove that the change in advertisement changes the commands sent over the wire (that would
2016 Jan 11
1
[PATCH] Add support for newstyle NBD protocol (RHBZ#1297100).
Experimental and only very lightly tested so far. Rich.
2019 Mar 18
0
[PATCH nbdkit 2/2] server: Split out NBD protocol code from connections code.
...} - - fl = backend->can_trim (backend, conn); - if (fl == -1) - return -1; - if (fl) { - eflags |= NBD_FLAG_SEND_TRIM; - conn->can_trim = true; - } - - fl = backend->can_fua (backend, conn); - if (fl == -1) - return -1; - if (fl) { - eflags |= NBD_FLAG_SEND_FUA; - conn->can_fua = true; - } - } - - fl = backend->can_flush (backend, conn); - if (fl == -1) - return -1; - if (fl) { - eflags |= NBD_FLAG_SEND_FLUSH; - conn->can_flush = true; - } - - fl = backend->is_rotational (backend, conn); - if (fl == -1) - return -1;...
2019 Jan 04
10
[PATCH nbdkit 0/7] server: Implement NBD_FLAG_CAN_MULTI_CONN.
First thing to say is that I need to do a *lot* more testing on this, so this is just an early peek. In particular, although it passed ‘make check && make check-valgrind’ I have *not* tested it against a multi-conn-aware client such as the Linux kernel >= 4.9. This implements NBD_FLAG_CAN_MULTI_CONN, described in the protocol doc as: "NBD_FLAG_CAN_MULTI_CONN: Indicates that
2019 Mar 18
3
[PATCH nbdkit 0/2] server: Split out NBD protocol code from connections code.
These are a couple of patches in preparation for the Block Status implementation. While the patches (especially the second one) are very large they are really just elementary code motion. Rich.
2019 Jan 05
15
[PATCH nbdkit v2 01/11] server: Implement NBD_FLAG_CAN_MULTI_CONN.
For existing commits, this is almost identical to v1, except that I updated some commit messages and reordered the commits in a somewhat more logical sequence. The main changes are the extra commits: [06/11] plugins: Return NBD_FLAG_CAN_MULTI_CONN from some readonly plugins. - Readonly plugins that can set the flag unconditionally. [09/11] partitioning: Return NBD_FLAG_CAN_MULTI_CONN. [10/11]
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
..._SEND_WRITE_ZEROES; + if (i == -1) { + nbdkit_error ("failure to check zero flag: %s", nbd_get_error ()); + return -1; + } + return i; } static int nbdplug_can_fua (void *handle) { struct handle *h = handle; + int i = nbd_can_fua (h->nbd); - return h->flags & NBD_FLAG_SEND_FUA ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE; + if (i == -1) { + nbdkit_error ("failure to check fua flag: %s", nbd_get_error ()); + return -1; + } + return i ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE; } static int nbdplug_can_multi_conn (void *handle) { struct handle *h = handle; +...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
..._SEND_WRITE_ZEROES; + if (i == -1) { + nbdkit_error ("failure to check zero flag: %s", nbd_get_error ()); + return -1; + } + return i; } static int nbdplug_can_fua (void *handle) { struct handle *h = handle; + int i = nbd_can_fua (h->nbd); - return h->flags & NBD_FLAG_SEND_FUA ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE; + if (i == -1) { + nbdkit_error ("failure to check fua flag: %s", nbd_get_error ()); + return -1; + } + return i ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE; } static int nbdplug_can_multi_conn (void *handle) { struct handle *h = handle; +...
2020 Mar 19
1
[nbdkit PATCH] nbd: Drop nbd-standalone fallback
...return !!(h->flags & NBD_FLAG_SEND_TRIM); -} - -static int -nbd_can_zero (void *handle) -{ - struct handle *h = handle; - - return !!(h->flags & NBD_FLAG_SEND_WRITE_ZEROES); -} - -static int -nbd_can_fua (void *handle) -{ - struct handle *h = handle; - - return h->flags & NBD_FLAG_SEND_FUA ? NBDKIT_FUA_NATIVE : NBDKIT_FUA_NONE; -} - -static int -nbd_can_multi_conn (void *handle) -{ - struct handle *h = handle; - - return !!(h->flags & NBD_FLAG_CAN_MULTI_CONN); -} - -static int -nbd_can_cache (void *handle) -{ - struct handle *h = handle; - - if (h->flags & NBD_FLAG_...
2020 Feb 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
...BD_FLAG_SEND_FAST_ZERO; - fl = backend_can_trim (backend); + fl = backend_can_trim (top); if (fl == -1) return -1; if (fl) eflags |= NBD_FLAG_SEND_TRIM; - fl = backend_can_fua (backend); + fl = backend_can_fua (top); if (fl == -1) return -1; if (fl) eflags |= NBD_FLAG_SEND_FUA; - fl = backend_can_flush (backend); + fl = backend_can_flush (top); if (fl == -1) return -1; if (fl) eflags |= NBD_FLAG_SEND_FLUSH; - fl = backend_is_rotational (backend); + fl = backend_is_rotational (top); if (fl == -1) return -1; if (fl) eflags |= NBD_FLA...
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package: https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17 Note that comment 21 provides a newer package 0.1.1-1 with a different API; and that libnbd has more unreleased API changes in the pipeline (whether that will be called 0.2 or 0.1.2); so we'll have to tweak things based on what is actually available in distros.
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing, although it was not compiled against libxml2 so it lacks uri support (I ended up testing patch 4 with a self-built libnbd). Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add URI support, better timing results Still not done - patch 5 needs associated tests Eric Blake (5): nbd: Check for libnbd nbd: