search for: nbdkit_extent_type_data

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

2019 Mar 12
1
Re: [PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...h these points. In the second case a concrete implementation might look like this (without error checking): /* plugin method */ int extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, void *extents_h) { nbdkit_extent_add (extents_h, offset, count, NBDKIT_EXTENT_TYPE_DATA); nbdkit_extent_add (extents_h, offset+count, 1024, NBDKIT_EXTENT_TYPE_HOLE); return 0; } /* filter method */ int extents (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, uint32_t count, uint64_t offset, uint32_t flags, void *extents...
2019 Mar 12
2
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
Second version based on nbdkit_extent* calls, as discussed here: https://www.redhat.com/archives/libguestfs/2019-March/msg00033.html Note in particular there is some subtlety about how filters would work in this implementation. See docs/nbdkit-filter.pod for the details. Rich.
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...uint32_t type; /* NBDKIT_EXTENT_TYPE_* */ + }; + +The C<offset> and C<length> describe the extent, and the C<type> +should be one of the extent types: + +=over 4 + +=item C<NBDKIT_EXTENT_TYPE_HOLE> + +This extent represents an unallocated hole in the disk. + +=item C<NBDKIT_EXTENT_TYPE_DATA> + +This extent represents normal allocated data. + +=item C<NBDKIT_EXTENT_TYPE_ZERO> + +This extent represents zeroes. + +=item C<NBDKIT_EXTENT_TYPE_NONE> + +This is a special type which means the extent record is ignored by +nbdkit. It is used by some filters to delete extents fro...
2019 Mar 12
4
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
This tentative commit implements extents/can_extents, roughly as discussed in the previous thread here: https://www.redhat.com/archives/libguestfs/2019-March/msg00017.html I can't say that I'm a big fan of having the plugin allocate an extents array. There are no other plugin callbacks currently where we require the plugin to allocate complex data structures (or indeed do any allocation
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...t nbdkit_extents_map *extents_map, + uint64_t offset, uint64_t length, uint32_t type); + +Add an extent covering C<[offset...offset+length-1]> of one of +the following types: + +=over 4 + +=item NBDKIT_EXTENT_TYPE_HOLE + +An unallocated extent, a.k.a. a “hole”. + +=item NBDKIT_EXTENT_TYPE_DATA + +A normal extent containing data. + +=item NBDKIT_EXTENT_TYPE_ZERO + +An extent which is allocated and contains all zero bytes. + +=back + +If the new extent overlaps some previous extent in the map then the +overlapping part(s) are overwritten with the new type. Adjacent +extents of the same ty...
2019 Mar 12
2
Re: [PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...uint64_t offset, uint64_t length, uint32_t type); > + > +Add an extent covering C<[offset...offset+length-1]> of one of > +the following types: > + > +=over 4 > + > +=item NBDKIT_EXTENT_TYPE_HOLE > + > +An unallocated extent, a.k.a. a “hole”. > + > +=item NBDKIT_EXTENT_TYPE_DATA > + > +A normal extent containing data. > + > +=item NBDKIT_EXTENT_TYPE_ZERO > + > +An extent which is allocated and contains all zero bytes. The protocol allows all four combinations of the two bits (you could have a non-allocated area not known to read as zeroes, for example, s...
2019 Mar 12
0
Re: [PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...> > + > > +Add an extent covering C<[offset...offset+length-1]> of one of > > +the following types: > > + > > +=over 4 > > + > > +=item NBDKIT_EXTENT_TYPE_HOLE > > + > > +An unallocated extent, a.k.a. a “hole”. > > + > > +=item NBDKIT_EXTENT_TYPE_DATA > > + > > +A normal extent containing data. > > + > > +=item NBDKIT_EXTENT_TYPE_ZERO > > + > > +An extent which is allocated and contains all zero bytes. > > The protocol allows all four combinations of the two bits (you could > have a non-allocated are...