search for: cacheextents_ext

Displaying 9 results from an estimated 9 matches for "cacheextents_ext".

2019 May 15
2
[nbdkit PATCH] Introduce cacheextents filter
...fset=%" PRIu64 + ": length=%" PRIu64 + "; type=%x", + ex.offset, ex.length, ex.type); + if (nbdkit_add_extent (cache_extents, ex.offset, ex.length, ex.type) < 0) + return -1; + } + + return 0; +} + +static int +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offset, uint32_t flags, + struct nbdkit_extents *extents, + int *err) +{ + nbdkit_debug ("cacheextents:" + " ca...
2019 May 15
0
Re: [nbdkit PATCH] Introduce cacheextents filter
..."; type=%x", > + ex.offset, ex.length, ex.type); > + if (nbdkit_add_extent (cache_extents, ex.offset, ex.length, ex.type) < 0) .. and the same here. > + return -1; > + } > + > + return 0; > +} > + > +static int > +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, > + void *handle, uint32_t count, uint64_t offset, uint32_t flags, > + struct nbdkit_extents *extents, > + int *err) > +{ > + nbdkit_debug ("cacheextents:" &...
2019 May 15
6
[nbdkit PATCH v2] Introduce cacheextents filter
...": length=%" PRIu64 + "; type=%x", + ex.offset, ex.length, ex.type); + if (nbdkit_add_extent (cache_extents, ex.offset, ex.length, ex.type) == -1) { + *err = errno; + return -1; + } + } + + return 0; +} + +static int +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offset, uint32_t flags, + struct nbdkit_extents *extents, + int *err) +{ + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); + + nbdkit_debug (&qu...
2019 Jun 11
5
[nbdkit PATCH v2] Introduce cacheextents filter
...": length=%" PRIu64 + "; type=%x", + ex.offset, ex.length, ex.type); + if (nbdkit_add_extent (cache_extents, ex.offset, ex.length, ex.type) == -1) { + *err = errno; + return -1; + } + } + + return 0; +} + +static int +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offset, uint32_t flags, + struct nbdkit_extents *extents, + int *err) +{ + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); + + nbdkit_debug (&qu...
2019 May 16
0
Re: [nbdkit PATCH v2] Introduce cacheextents filter
...> is one hole extent spanning the whole disk (where there is no space for > improvement) this does not add any noticeable overhead. > > Signed-off-by: Martin Kletzander <mkletzan@redhat.com> > --- > +++ b/filters/cacheextents/cacheextents.c > + > +static int > +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, > + void *handle, uint32_t count, uint64_t offset, uint32_t flags, > + struct nbdkit_extents *extents, > + int *err) > +{ > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock...
2019 May 16
0
Re: [nbdkit PATCH v2] Introduce cacheextents filter
...*/ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; -/* The real size of the underlying plugin. */ -static uint64_t size; - /* Cached extents from the last extents () call and its start and end for the sake of simplicity. */ struct nbdkit_extents *cache_extents; @@ -131,9 +128,8 @@ cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, } nbdkit_debug ("cacheextents: cache miss"); - int r = next_ops->extents (nxdata, count, offset, flags, extents, err); - if (r == -1) - return r; + if (next_ops->extents (nxdata, count, offset, flags, extents, err) =...
2019 May 16
1
Re: [nbdkit PATCH v2] Introduce cacheextents filter
...= PTHREAD_MUTEX_INITIALIZER; > >-/* The real size of the underlying plugin. */ >-static uint64_t size; >- > /* Cached extents from the last extents () call and its start and end for the > sake of simplicity. */ > struct nbdkit_extents *cache_extents; >@@ -131,9 +128,8 @@ cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, > } > > nbdkit_debug ("cacheextents: cache miss"); >- int r = next_ops->extents (nxdata, count, offset, flags, extents, err); >- if (r == -1) >- return r; >+ if (next_ops->extents (nxdata, count, off...
2019 Jun 11
0
Re: [nbdkit PATCH v2] Introduce cacheextents filter
...type=0 to match... > + ex.offset, ex.length, ex.type); > + if (nbdkit_add_extent (cache_extents, ex.offset, ex.length, ex.type) == -1) { > + *err = errno; > + return -1; > + } > + } > + > + return 0; > +} > + > +static int > +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, > + void *handle, uint32_t count, uint64_t offset, uint32_t flags, > + struct nbdkit_extents *extents, > + int *err) > +{ > + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock...
2019 May 20
2
Re: [nbdkit PATCH v2] Introduce cacheextents filter
...disk (where there is no space for >> improvement) this does not add any noticeable overhead. >> >> Signed-off-by: Martin Kletzander <mkletzan@redhat.com> >> --- > >> +++ b/filters/cacheextents/cacheextents.c > > >> + >> +static int >> +cacheextents_extents (struct nbdkit_next_ops *next_ops, void *nxdata, >> + void *handle, uint32_t count, uint64_t offset, uint32_t flags, >> + struct nbdkit_extents *extents, >> + int *err) >> +{ >> + ACQUIRE_LOCK_FOR_CURR...