search for: blocksize_parse

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

2018 Feb 01
1
Re: [nbdkit PATCH v2 3/3] filters: Add blocksize filter
On Wed, Jan 31, 2018 at 09:26:39PM -0600, Eric Blake wrote: > +static int > +blocksize_parse (const char *name, const char *s, unsigned int *v) Maybe use nbdkit_parse_size? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to ins...
2018 Feb 01
0
[nbdkit PATCH v2 3/3] filters: Add blocksize filter
...ng as we don't have parallel requests, we can reuse a common + * buffer for alignment purposes; size it to the maximum we allow for + * minblock. */ +static char bounce[BLOCKSIZE_MIN_LIMIT]; +static unsigned int minblock; +static unsigned int maxdata; +static unsigned int maxlen; + +static int +blocksize_parse (const char *name, const char *s, unsigned int *v) +{ + unsigned long l; + char *end; + unsigned int scale = 1; + + errno = 0; + l = strtol (s, &end, 0); + if (errno || s == end) { + nbdkit_error ("unable to parse '%s' for parameter '%s'", s, name); + retur...
2018 Mar 08
0
[nbdkit PATCH v3 05/15] filters: Add blocksize filter
...ng as we don't have parallel requests, we can reuse a common + * buffer for alignment purposes; size it to the maximum we allow for + * minblock. */ +static char bounce[BLOCKSIZE_MIN_LIMIT]; +static unsigned int minblock; +static unsigned int maxdata; +static unsigned int maxlen; + +static int +blocksize_parse (const char *name, const char *s, unsigned int *v) +{ + int64_t size = nbdkit_parse_size (s); + + if (UINT_MAX < size) { + nbdkit_error ("parameter '%s' too large", name); + return -1; + } + *v = size; + return 0; +} + +/* Called for each key=value passed on the comm...
2018 Feb 01
6
[nbdkit PATCH v2 0/3] add log, blocksize filters
Since v1: add the blocksize filter, add testsuite coverage of the log filter, several fixes to the log filter based on what adding tests revealed I'm still working on FUA flag support patches on top of this; the patches should all be committed in the same release, as we want to minimize the number of releases that cause a filter ABI/API bump Eric Blake (3): backend: Rework internal/filter
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]