search for: eopnotsupp

Displaying 20 results from an estimated 759 matches for "eopnotsupp".

2019 Aug 13
0
[nbdkit PATCH 2/2] plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
POSIX allows but does not require ENOTSUP and EOPNOTSUPP to map to the same errno value. This patch has no impact on Linux, but does affect other systems: we want to be permissive in what we accept (either spelling, since the two are commonly confused), while strict in what we generate (we documented EOPNOTSUPP as the trigger to fall back to .write, so...
2019 Aug 13
3
[nbdkit PATCH 0/2] errno cleanup patches
I ran into these while trying to prepare patches to add NBD_CMD_FLAG_FAST_ZERO, which will expose a new NBD_ENOTSUP wire value. Eric Blake (2): plugins: Don't lose original error when emulating FUA plugins: Permit ENOTSUP as synonym for EOPNOTSUPP docs/nbdkit-filter.pod | 11 ++++++----- docs/nbdkit-plugin.pod | 12 +++++++----- plugins/file/file.c | 16 +++++++++++----- plugins/perl/perl.c | 2 +- plugins/python/python.c | 2 +- plugins/ruby/ruby.c | 2 +- server/plugins.c | 11 ++++------- 7 files changed, 31 inse...
2019 Apr 03
4
[PATCH v4 5/5] xfs: disable map_sync for async flush
...> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > index 1f2e2845eb76..dced2eb8c91a 100644 > --- a/fs/xfs/xfs_file.c > +++ b/fs/xfs/xfs_file.c > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > return -EOPNOTSUPP; > > + /* We don't support synchronous mappings with DAX files if > + * dax_device is not synchronous. > + */ > + if (IS_DAX(file_inode(filp)) && !dax_synchronous( > + xfs_find_daxdev_for_inode(file_inode(filp))) && > + (vma->vm_flags & VM_SY...
2019 Apr 03
4
[PATCH v4 5/5] xfs: disable map_sync for async flush
...> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > index 1f2e2845eb76..dced2eb8c91a 100644 > --- a/fs/xfs/xfs_file.c > +++ b/fs/xfs/xfs_file.c > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > return -EOPNOTSUPP; > > + /* We don't support synchronous mappings with DAX files if > + * dax_device is not synchronous. > + */ > + if (IS_DAX(file_inode(filp)) && !dax_synchronous( > + xfs_find_daxdev_for_inode(file_inode(filp))) && > + (vma->vm_flags & VM_SY...
2018 Jul 30
3
[PATCH v2] file: Normalize errno value for ENODEV
Fix issues Eric found in the original patch: https://www.redhat.com/archives/libguestfs/2018-July/msg00072.html - When handling ENODEV, the caller is expecting 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 10...
2018 Jul 27
4
[PATCH] file: Fix zero/trim with block device
...644 --- 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 != EOPNOTSUPP) { + if (r == -1 && errno != EOPNOTSUPP && errno != ENODEV) { nbdkit_error ("zero: %m"); } /* PUNCH_HOLE is older; if it is not supported, it is likely that @@ -254,7 +254,7 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) #...
2019 Apr 04
2
[PATCH v4 5/5] xfs: disable map_sync for async flush
...eb76..dced2eb8c91a 100644 > > > > --- a/fs/xfs/xfs_file.c > > > > +++ b/fs/xfs/xfs_file.c > > > > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > > > > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > > > return -EOPNOTSUPP; > > > > > > > > + /* We don't support synchronous mappings with DAX files if > > > > + * dax_device is not synchronous. > > > > + */ > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous( > > > > + xfs_fi...
2019 Apr 04
2
[PATCH v4 5/5] xfs: disable map_sync for async flush
...eb76..dced2eb8c91a 100644 > > > > --- a/fs/xfs/xfs_file.c > > > > +++ b/fs/xfs/xfs_file.c > > > > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > > > > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > > > return -EOPNOTSUPP; > > > > > > > > + /* We don't support synchronous mappings with DAX files if > > > > + * dax_device is not synchronous. > > > > + */ > > > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous( > > > > + xfs_fi...
2023 Jan 10
3
[PATCH v7 2/6] ocfs2: Switch to security_inode_init_security()
...r (if it is > not the first to set it, its xattr will be discarded; if it is the first, > it does not have xattrs to calculate the HMAC on). > > Finally, modify the handling of the return value from > ocfs2_init_security_get(). As security_inode_init_security() does not > return -EOPNOTSUPP, remove this case and directly handle the error if the > return value is not zero. > > However, the previous case of receiving -EOPNOTSUPP should be still > taken into account, as security_inode_init_security() could return zero > without setting xattrs and ocfs2 would consider it a...
2018 Jul 28
3
[PATCH] file: Normalize errno value for ENODEV
...name = 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, mode, offset, len); + /* kernel 3.10 fails with ENODEV for block device. Kernel >= 4.9 fails + with EOPNOTSUPP in this case. Normlize errno to simplify callers. */ + if (r == -1 && errno == ENODEV) { + errno = EOPNOTSUPP; + } + return r; +} +#endif + static void file_unload (void) { @@ -241,9 +256,9 @@ file_zero (void *handle, uint32_t count, uint64_t offset, int may_trim) #ifdef FALLOC_...
2023 Feb 17
1
[Bridge] [PATCH net-next 5/5] net: dsa: mv88e6xxx: implementation of dynamic ATU entries
...of the following (completely untested!). I feel that it robustly covers > > all cases for fdb_flags. And as a bonus doesn't need to be modified > > if other (unsupported) flags are added in future. > > > > if (fdb_flags & ~(DSA_FDB_FLAG_DYNAMIC)) > > return -EOPNOTSUPP; > > > > is_dynamic = !!(fdb_flags & DSA_FDB_FLAG_DYNAMIC) > > if (is_dynamic) > > state = MV88E6XXX_G1_ATU_DATA_STATE_UC_AGE_7_NEWEST; > > > > > > And perhaps for other drivers: > > > > if (fdb_flags & ~(DSA_FDB_FLAG_DYNAMIC)) >...
2019 Apr 03
1
[PATCH v4 5/5] xfs: disable map_sync for async flush
...ile.c b/fs/xfs/xfs_file.c > > index 1f2e2845eb76..dced2eb8c91a 100644 > > --- a/fs/xfs/xfs_file.c > > +++ b/fs/xfs/xfs_file.c > > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > return -EOPNOTSUPP; > > > > + /* We don't support synchronous mappings with DAX files if > > + * dax_device is not synchronous. > > + */ > > + if (IS_DAX(file_inode(filp)) && !dax_synchronous( > > + xfs_find_daxdev_for_inode(file_inode(filp))) && > >...
2018 Jan 17
4
Re: [PATCH 9/9] filters: Move rdelay/wdelay from file plugin to new delay filter.
...+/* Zero data. */ > +static int > +delay_zero (struct nbdkit_next *next, void *nxdata, > + void *handle, uint32_t count, uint64_t offset, int may_trim) > +{ > + write_delay (); > + return next->zero (nxdata, count, offset, may_trim); If next->zero() fails with EOPNOTSUPP, that means we will delay once in trying the underlying command, and again for each iteration of the fallback loop as it calls delay_pwrite(). Is that okay, or do we want to reproduce some fallback logic here and directly call next->pwrite on EOPNOTSUPP so as to only have a single write delay i...
2018 Aug 03
0
[PATCH v2 1/4] file: Avoid unsupported fallocate() calls
When using file systems not supporting ZERO_RANGE (e.g. NFS 4.2) or block device on kernel < 4.9, we used to call fallocate() for every zero, fail with EOPNOTSUPP, and fallback to manual zeroing. When trimming, we used to try unsupported fallocate() on every call. Change file handle to remember if punching holes or zeroing range are supported, and avoid unsupported calls. - zero changed to: 1. If we can punch hole and may trim, try PUNCH_HOLE 2. If we...
2018 Aug 18
0
[PATCH v3 1/4] file: Avoid unsupported fallocate() calls
When using file systems not supporting ZERO_RANGE (e.g. NFS 4.2) or block device on kernel < 4.9, we used to call fallocate() for every zero, fail with EOPNOTSUPP, and fallback to manual zeroing. When trimming, we used to try unsupported fallocate() on every call. Change file handle to remember if punching holes or zeroing range are supported, and avoid unsupported calls. - zero changed to: 1. If we can punch hole and may trim, try PUNCH_HOLE 2. If we...
2018 Aug 19
0
[PATCH v4 1/4] file: Avoid unsupported fallocate() calls
When using file systems not supporting ZERO_RANGE (e.g. NFS 4.2) or block device on kernel < 4.9, we used to call fallocate() for every zero, fail with EOPNOTSUPP, and fallback to manual zeroing. When trimming, we used to try unsupported fallocate() on every call. Change file handle to remember if punching holes or zeroing range are supported, and avoid unsupported calls. - zero changed to: 1. If we can punch hole and may trim, try PUNCH_HOLE 2. If we...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...> --- a/fs/xfs/xfs_file.c > > > > > > +++ b/fs/xfs/xfs_file.c > > > > > > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > > > > > > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > > > > > return -EOPNOTSUPP; > > > > > > > > > > > > + /* We don't support synchronous mappings with DAX files if > > > > > > + * dax_device is not synchronous. > > > > > > + */ > > > > > > + if (IS_DAX(file_inode(filp)) &&am...
2019 Apr 04
2
[Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush
...> --- a/fs/xfs/xfs_file.c > > > > > > +++ b/fs/xfs/xfs_file.c > > > > > > @@ -1203,6 +1203,14 @@ xfs_file_mmap( > > > > > > if (!IS_DAX(file_inode(filp)) && (vma->vm_flags & VM_SYNC)) > > > > > > return -EOPNOTSUPP; > > > > > > > > > > > > + /* We don't support synchronous mappings with DAX files if > > > > > > + * dax_device is not synchronous. > > > > > > + */ > > > > > > + if (IS_DAX(file_inode(filp)) &&am...
2018 Jul 28
1
Re: [PATCH] file: Fix zero/trim with block device
.../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 != EOPNOTSUPP) { > >+ if (r == -1 && errno != EOPNOTSUPP && errno != ENODEV) { > > nbdkit_error ("zero: %m"); > > } > > /* PUNCH_HOLE is older; if it is not supported, it is likely that > > Given the recent thread on qemu about the diff...
2018 Aug 02
0
[PATCH 1/3] file: Avoid unsupported fallocate() calls
When using file systems not supporting ZERO_RANGE (e.g. NFS 4.2) or block device on kernel < 4.9, we used to call fallocate() for every zero, fail with EOPNOTSUPP, and fallback to manual zeroing. When trimming, we used to try unsupported fallocate() on every call. Change file handle to remember if punching holes or zeroing range are supported, and avoid unsupported calls. - can_trim changed to report the actual capability once we tried to punch a hole....