search for: 1391f62

Displaying 4 results from an estimated 4 matches for "1391f62".

Did you mean: 139162
2018 Sep 17
4
[PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...urn !(size & (align - 1)); -} +#define IS_ALIGNED(size, align) ({ \ + assert (is_power_of_2 ((align))); \ + !((size) & ((align) - 1)); \ +}) #endif /* NBDKIT_ISALIGNED_H */ diff --git a/plugins/file/file.c b/plugins/file/file.c index 9d03f18..1391f62 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -397,13 +397,13 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) #ifdef BLKZEROOUT /* For aligned range and block device, we can use BLKZEROOUT. */ - if (h->can_zeroout && is_aligned (offset |...
2018 Sep 17
0
[PATCH nbdkit v3 1/3] common: isaligned: Use a macro instead of relying on implicit truncation.
...urn !(size & (align - 1)); -} +#define IS_ALIGNED(size, align) ({ \ + assert (is_power_of_2 ((align))); \ + !((size) & ((align) - 1)); \ +}) #endif /* NBDKIT_ISALIGNED_H */ diff --git a/plugins/file/file.c b/plugins/file/file.c index 9d03f18..1391f62 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -397,13 +397,13 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) #ifdef BLKZEROOUT /* For aligned range and block device, we can use BLKZEROOUT. */ - if (h->can_zeroout && is_aligned (offset |...
2018 Sep 17
0
Re: [PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
...EL_MASK((x), (mask)) 61 #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) 62 #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) > > #endif /* NBDKIT_ISALIGNED_H */ > diff --git a/plugins/file/file.c b/plugins/file/file.c > index 9d03f18..1391f62 100644 > --- a/plugins/file/file.c > +++ b/plugins/file/file.c > @@ -397,13 +397,13 @@ file_zero (void *handle, uint32_t count, uint64_t > offset, int may_trim) > > #ifdef BLKZEROOUT > /* For aligned range and block device, we can use BLKZEROOUT. */ > - if (h->can_ze...
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing). However I have changed the first two patches based on feedback received. In particular this fixes a very serious bug found by Eric Blake in the current truncate filter. Rich.