search for: retry_trim

Displaying 12 results from an estimated 12 matches for "retry_trim".

2019 Oct 04
1
Re: [nbdkit PATCH 2/5] retry: Check size before transactions
...ext_ops *next_ops, void *nxdata, > *err = EROFS; > return -1; > } > + if (! valid_range (next_ops, nxdata, count, offset, true, err)) > + return -1; > if (next_ops->can_write (nxdata) != 1) { > *err = EROFS; > r = -1; > @@ -258,6 +273,8 @@ retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, > *err = EROFS; > return -1; > } > + if (! valid_range (next_ops, nxdata, count, offset, true, err)) > + return -1; > if (next_ops->can_trim (nxdata) != 1) { > *err = EROFS; > r = -1; > @@ -...
2019 Oct 04
0
[nbdkit PATCH 2/5] retry: Check size before transactions
...226,6 +239,8 @@ retry_pwrite (struct nbdkit_next_ops *next_ops, void *nxdata, *err = EROFS; return -1; } + if (! valid_range (next_ops, nxdata, count, offset, true, err)) + return -1; if (next_ops->can_write (nxdata) != 1) { *err = EROFS; r = -1; @@ -258,6 +273,8 @@ retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, *err = EROFS; return -1; } + if (! valid_range (next_ops, nxdata, count, offset, true, err)) + return -1; if (next_ops->can_trim (nxdata) != 1) { *err = EROFS; r = -1; @@ -312,6 +329,8 @@ retry_zero (struct nbdkit_nex...
2019 Oct 01
0
[nbdkit PATCH 3/6] retry: Check next_ops->can_FOO on retry
...return -1; + } + if (next_ops->can_write (nxdata) != 1) { + *err = EROFS; + r = -1; + } + else + r = next_ops->pwrite (nxdata, buf, count, offset, flags, err); if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; return r; @@ -236,7 +249,16 @@ retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, int r; again: - r = next_ops->trim (nxdata, count, offset, flags, err); + if (h->reopens && force_readonly) { + *err = EROFS; + return -1; + } + if (next_ops->can_trim (nxdata) != 1) { + *err = EROFS; + r = -1;...
2019 Sep 19
0
[PATCH nbdkit v3 2/3] Add new retry filter.
...*err) +{ + struct retry_handle *h = handle; + struct retry_data data = {0}; + int r; + + again: + r = next_ops->pwrite (nxdata, buf, count, offset, flags, err); + if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; + + return r; +} + +/* Trim. */ +static int +retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, + uint32_t count, uint64_t offset, uint32_t flags, + int *err) +{ + struct retry_handle *h = handle; + struct retry_data data = {0}; + int r; + + again: + r = next_ops->trim (nxdata, count, offs...
2019 Sep 19
0
[PATCH nbdkit 2/2] Add new retry filter.
...*err) +{ + struct retry_handle *h = handle; + struct retry_data data = {0}; + int r; + + again: + r = next_ops->pwrite (nxdata, buf, count, offset, flags, err); + if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; + + return r; +} + +/* Trim. */ +static int +retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, + uint32_t count, uint64_t offset, uint32_t flags, + int *err) +{ + struct retry_handle *h = handle; + struct retry_data data = {0}; + int r; + + again: + r = next_ops->trim (nxdata, count, offs...
2019 Sep 19
6
[PATCH nbdkit 0/2] Add new retry filter.
This is a retry filter implementation as outlined here: https://www.redhat.com/archives/libguestfs/2019-September/msg00167.html It is only lightly tested. One way to test it is to try an SSH copy (see the commit message for patch 2/2), and in the middle of the copy kill the per-connection sshd on the remote machine. You will see that the copy recovers after a few seconds. Add the nbdkit -v
2019 Sep 19
7
[PATCH nbdkit v2 0/4] Add new retry filter.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-September/msg00199.html v2: - Adds a fairly simple yet comprehensive test using sh plugin. - Rebase and retest. Patch 1 is a misc patch not really related to the series. Rich.
2019 Sep 19
7
[PATCH nbdkit v3 0/3] Add new retry filter.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-September/msg00221.html I think this is more like "the one". It handles reopen failing correctly, and there is a second test for that. I also ran my sshd tests locally and it worked in all scenarios I could think up (except of course sshd not being available at the start, but we want that to fail). Rich.
2019 Oct 03
7
[nbdkit PATCH 0/4] More work with retry safety
I'm still working on another set of patches to have reopen call .finalize/.prepare (so that another filter can safely appear between retry and the plugin), but for tonight, these are the patches I think are ready to go. Eric Blake (4): retry: Handle can_fua and can_fast_zero changes tests: Test retry with different fua/fast-zero flags server: Close backends if a filter's .open fails
2019 Oct 04
6
[nbdkit PATCH 0/5] Another round of retry fixes
I still don't have .prepare/.finalize working cleanly across reopen, but did find a nasty bug where a botched assertion means we failed to notice reads beyond EOF in both the xz and retry filter. Refactoring backend.c will make .finalize work easier. Eric Blake (5): xz: Avoid reading beyond EOF retry: Check size before transactions tests: Test retry when get_size values change
2019 Oct 01
9
[nbdkit PATCH v2 0/6] Improve retry filter
Includes a rework of the previously posted patch for --run improvements (mostly with improved comments and commit message; I decided that waiting for the captive nbdkit to exit was overkill), and four new patches. The tests are intentionally separate, to allow rearranging the order of the series to see the failures being fixed. Eric Blake (6): server: Propagate unexpected nbdkit failure with
2019 Oct 07
6
[nbdkit PATCH 0/5] More retry fixes
I think this is my last round of patches for issues I identified with the retry filter. With this in place, it should be safe to interject another filter in between retry and the plugin. Eric Blake (5): retry: Don't call into closed plugin tests: Refactor test-retry-reopen-fail.sh tests: Enhance retry test to cover failed reopen server: Move prepare/finalize/close recursion to