search for: cow_can_flush

Displaying 7 results from an estimated 7 matches for "cow_can_flush".

2019 Mar 26
0
[PATCH nbdkit v4 05/15] cow: Disable extents information in this filter.
...uct nbdkit_next_ops *next_ops, void *nxdata, void *handle) @@ -128,6 +128,12 @@ cow_can_trim (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) return 0; } +static int +cow_can_extents (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + return 0; +} + static int cow_can_flush (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) { @@ -316,6 +322,7 @@ static struct nbdkit_filter filter = { .can_write = cow_can_write, .can_flush = cow_can_flush, .can_trim = cow_can_trim, + .can_extents = cow_can_extents, .can_fua...
2018 Jan 20
0
[PATCH nbdkit] filters: Add copy-on-write filter.
...39;t do, we can write, we + * cannot trim, and we can flush. + */ +static int +cow_can_write (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + return 1; +} + +static int +cow_can_trim (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + return 0; +} + +static int +cow_can_flush (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + return 1; +} + +/* These are the block operations. Note they implicitly read or write + * into the global ‘block’ array. + */ +static int +blk_read (struct nbdkit_next_ops *next_ops, void *nxdata, uint64_t blknum) +{ + off_t off...
2018 Jan 20
4
[PATCH nbdkit] filters: Add copy-on-write filter.
Eric, you'll probably find the design "interesting" ... It does work, for me at least. Rich.
2018 Jan 21
2
Re: [PATCH nbdkit] filters: Add copy-on-write filter.
...truct nbdkit_next_ops *next_ops, void *nxdata, if (size == -1) return -1; - if (ftruncate (fd, size) == -1) - return -1; - nbdkit_debug ("cow: underlying file size: %" PRIi64, size); + if (blk_set_size (size)) + return -1; + return size; } @@ -200,6 +228,36 @@ cow_can_flush (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) return 1; } +/* Return true if the block is allocated. Consults the bitmap. */ +static bool +blk_is_allocated (uint64_t blknum) +{ + uint64_t bm_offset = blknum / 8; + uint64_t bm_bit = blknum % 8; + + if (bm_offset >= bm_s...
2019 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's version 4. I'm a lot happier with this version: - all filters have been reviewed and changed where I think that's necessary - can_extents is properly defined and implemented now - NBD protocol is followed - I believe it addresses all previous review points where possible The "only" thing
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here so we have a reference in the mailing list in case we find bugs later (as I'm sure we will - it's a complex patch series). Great thanks to Eric Blake for tireless review on this one. It also seems to have identified a few minor bugs in qemu along the way. Rich.
2018 Mar 08
19
[nbdkit PATCH v3 00/15] Add FUA support to nbdkit
After more than a month since v2 [1], I've finally got my FUA support series polished. This is all of my outstanding patches, even though some of them were originally posted in separate threads from the original FUA post [2], [3] [1] https://www.redhat.com/archives/libguestfs/2018-January/msg00113.html [2] https://www.redhat.com/archives/libguestfs/2018-January/msg00219.html [3]