search for: a7c07fb

Displaying 6 results from an estimated 6 matches for "a7c07fb".

2018 Jul 28
3
[PATCH] file: Normalize errno value for ENODEV
...the caller is expecting ENOTSUPP to trigger fallback. - ENODEV should be ignored in file_trim. Tested only on Fedora 28. --- plugins/file/file.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/plugins/file/file.c b/plugins/file/file.c index a7c07fb..4210adb 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -50,6 +50,21 @@ static char *filename = NULL; +#if defined(FALLOC_FL_PUNCH_HOLE) || defined(FALLOC_FL_ZERO_RANGE) +static int +do_fallocate(int fd, int mode, off_t offset, off_t len) +{ + int r = -1; + r = fallocate (fd,...
2018 Jul 27
4
[PATCH] file: Fix zero/trim with block device
....) Treat this error as EOPNOSUPP. Tested only on Fedora 28; I don't know how to build nbdkit on RHEL, but the change is pretty trivial. --- plugins/file/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/file/file.c b/plugins/file/file.c index b6e33de..a7c07fb 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -243,7 +243,7 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) if (may_trim) { r = fallocate (h->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, count); - if (r == -1 && errno...
2018 Jul 28
1
Re: [PATCH] file: Fix zero/trim with block device
...on't know how to build nbdkit on RHEL, but > >the change is pretty trivial. > >--- > > plugins/file/file.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > >diff --git a/plugins/file/file.c b/plugins/file/file.c > >index b6e33de..a7c07fb 100644 > >--- a/plugins/file/file.c > >+++ b/plugins/file/file.c > >@@ -243,7 +243,7 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) > > if (may_trim) { > > r = fallocate (h->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, > &gt...
2018 Jul 30
3
[PATCH v2] file: Normalize errno value for ENODEV
...xpecting EOPNOTSUPP to trigger fallback. - ENODEV should be ignored in file_trim. Tested only on Fedora 28 and RHEL 7.5. --- plugins/file/file.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/plugins/file/file.c b/plugins/file/file.c index a7c07fb..a8a6253 100644 --- a/plugins/file/file.c +++ b/plugins/file/file.c @@ -50,6 +50,21 @@ static char *filename = NULL; +#if defined(FALLOC_FL_PUNCH_HOLE) || defined(FALLOC_FL_ZERO_RANGE) +static int +do_fallocate(int fd, int mode, off_t offset, off_t len) +{ + int r = -1; + r = fallocate (fd,...
2018 Jul 30
0
Re: [PATCH] file: Normalize errno value for ENODEV
...allback. > - ENODEV should be ignored in file_trim. > > Tested only on Fedora 28. > --- > plugins/file/file.c | 33 ++++++++++++++++++++++++--------- > 1 file changed, 24 insertions(+), 9 deletions(-) > > diff --git a/plugins/file/file.c b/plugins/file/file.c > index a7c07fb..4210adb 100644 > --- a/plugins/file/file.c > +++ b/plugins/file/file.c > @@ -50,6 +50,21 @@ > > static char *filename = NULL; > > +#if defined(FALLOC_FL_PUNCH_HOLE) || defined(FALLOC_FL_ZERO_RANGE) > +static int > +do_fallocate(int fd, int mode, off_t offset, off...
2018 Jul 27
0
Re: [PATCH] file: Fix zero/trim with block device
...ested only on Fedora 28; I don't know how to build nbdkit on RHEL, but > the change is pretty trivial. > --- > plugins/file/file.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/plugins/file/file.c b/plugins/file/file.c > index b6e33de..a7c07fb 100644 > --- a/plugins/file/file.c > +++ b/plugins/file/file.c > @@ -243,7 +243,7 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) > if (may_trim) { > r = fallocate (h->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, > offset, count);...