zfs/include/sys
Brian Behlendorf 6df43169b3
Fix ENOSPC when unlinking multiple files from full pool
When unlinking multiple files from a pool at 100% capacity, it was
possible for ENOSPC to be returned after the first unlink.  e.g.

    rm -f /mnt/fs/test1.0.0 /mnt/fs/test1.1.0 /mnt/fs/test1.2.0
    rm: cannot remove '/mnt/fs/test1.1.0': No space left on device
    rm: cannot remove '/mnt/fs/test1.2.0': No space left on device

After waiting for the pending deferred frees from the first unlink to
be processed the remaining files can then be unlinked.  This is caused
by the quota limit in dsl_dir_tempreserve_impl() being temporarily
decreased to the allocatable pool capacity less any deferred free
space.

This is resolved using the existing mechanism of returning ERESTART
when over quota as long as we know enough space will shortly be
available after processing the pending deferred frees.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13172
2022-03-08 09:16:35 -08:00
..
crypto module: icp: remove vestigia of crypto sessions 2022-02-15 16:25:56 -08:00
fm Upstream: Add snapshot and zvol events 2021-09-09 10:44:21 -07:00
fs Expose additional file level attributes 2022-03-07 17:52:03 -08:00
lua Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
sysevent
zstd Update `checkstyle` workflow env to ubuntu-20.04 2021-11-02 14:02:57 -06:00
Makefile.am Remove NOTE(CONSTCOND) and note.h 2021-07-26 12:07:53 -07:00
abd.h Avoid small buffer copying on write 2021-07-27 16:05:47 -07:00
abd_impl.h Avoid small buffer copying on write 2021-07-27 16:05:47 -07:00
aggsum.h More aggsum optimizations 2021-06-07 09:02:47 -07:00
arc.h include: sys/arc.h: shim out arc_referenced() 2021-12-23 09:36:26 -08:00
arc_impl.h Replace *CTASSERT() with _Static_assert() 2022-01-26 11:38:52 -08:00
avl.h lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden 2021-06-09 17:04:32 -07:00
avl_impl.h Remove avl_size field from struct avl_tree 2021-07-01 09:32:31 -06:00
bitops.h Remove NOTE(CONSTCOND) and note.h 2021-07-26 12:07:53 -07:00
blkptr.h
bplist.h
bpobj.h
bptree.h
bqueue.h
btree.h
dataset_kstats.h Introduce write-mostly sums 2021-05-27 14:27:29 -06:00
dbuf.h Introduce a tunable to exclude special class buffers from L2ARC 2021-11-11 12:52:16 -08:00
ddt.h Appease GCC sprintf warnings found on Fedora 32/GCC 10.0.1 2020-08-24 10:32:59 -07:00
dmu.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
dmu_impl.h Remove UIO_ZEROCOPY functions structures 2020-10-30 10:00:33 -07:00
dmu_objset.h Introduce a tunable to exclude special class buffers from L2ARC 2021-11-11 12:52:16 -08:00
dmu_recv.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
dmu_redact.h Suppress cppcheck invalidSyntax warninigs 2021-03-05 17:56:35 -08:00
dmu_send.h Removed duplicated includes 2021-03-22 12:34:58 -07:00
dmu_traverse.h
dmu_tx.h Add Module Parameter Regarding Log Size Limit 2021-07-20 09:40:24 -06:00
dmu_zfetch.h Split dmu_zfetch() speculation and execution parts 2021-03-19 22:56:11 -07:00
dnode.h Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency 2021-11-07 14:27:44 -07:00
dsl_bookmark.h Rename refcount.h to zfs_refcount.h 2020-07-29 16:35:33 -07:00
dsl_crypt.h
dsl_dataset.h Simplify resume token generation 2022-02-01 17:04:08 -08:00
dsl_deadlist.h
dsl_deleg.h
dsl_destroy.h
dsl_dir.h Remove NOTE(CONSTCOND) and note.h 2021-07-26 12:07:53 -07:00
dsl_pool.h Fix ENOSPC when unlinking multiple files from full pool 2022-03-08 09:16:35 -08:00
dsl_prop.h
dsl_scan.h Use dsl_scan_setup_check() to setup a scrub 2021-04-08 14:33:15 -07:00
dsl_synctask.h Add upper bound for slop space calculation 2021-02-24 09:52:43 -08:00
dsl_userhold.h
edonr.h
efi_partition.h libefi: remove efi_type() 2022-01-18 14:40:43 -08:00
frame.h Linux 5.10 compat: frame.h renamed objtool.h 2020-11-02 22:01:10 +00:00
hkdf.h
metaslab.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
metaslab_impl.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
mmp.h
mntent.h
mod.h Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
multilist.h Re-embed multilist_t storage 2021-06-10 10:42:31 -06:00
nvpair.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
nvpair_impl.h Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
objlist.h
pathname.h Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
qat.h include: qat.h: mark unused macro arguments as used 2021-12-23 09:36:21 -08:00
range_tree.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
rrwlock.h Rename refcount.h to zfs_refcount.h 2020-07-29 16:35:33 -07:00
sa.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
sa_impl.h Rename refcount.h to zfs_refcount.h 2020-07-29 16:35:33 -07:00
skein.h
spa.h Add spa _os() hooks 2022-02-15 15:54:25 -08:00
spa_boot.h
spa_checkpoint.h
spa_checksum.h
spa_impl.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
spa_log_spacemap.h
space_map.h Extend zdb to print inconsistencies in livelists and metaslabs 2020-07-14 17:51:05 -07:00
space_reftree.h
sysevent.h
txg.h Optimize txg_kick() process (#12274) 2021-07-01 09:20:27 -06:00
txg_impl.h
u8_textprep.h Throw const on some strings 2020-10-02 17:44:10 -07:00
u8_textprep_data.h
uberblock.h
uberblock_impl.h
uio_impl.h Cleaning up uio headers 2021-02-20 20:16:50 -08:00
unique.h
uuid.h
vdev.h Vdev Properties Feature 2021-11-30 07:46:25 -07:00
vdev_disk.h
vdev_draid.h Verify dRAID empty sectors 2022-01-04 16:46:32 -08:00
vdev_file.h
vdev_impl.h Replace *CTASSERT() with _Static_assert() 2022-01-26 11:38:52 -08:00
vdev_indirect_births.h
vdev_indirect_mapping.h
vdev_initialize.h
vdev_raidz.h Verify dRAID empty sectors 2022-01-04 16:46:32 -08:00
vdev_raidz_impl.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
vdev_rebuild.h Fix various typos 2021-04-02 18:52:15 -07:00
vdev_removal.h
vdev_trim.h
xvattr.h
zap.h
zap_impl.h
zap_leaf.h
zcp.h
zcp_global.h
zcp_iter.h
zcp_prop.h
zcp_set.h
zfeature.h
zfs_acl.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_bootenv.h zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
zfs_context.h Use _Noreturn (C11; GNU89) properly 2022-03-04 16:25:22 -08:00
zfs_debug.h Annotated dprintf as printf-like 2021-06-22 21:53:45 -07:00
zfs_delay.h
zfs_file.h file reference counts can get corrupted 2021-07-10 19:00:37 -06:00
zfs_fuid.h
zfs_ioctl.h file reference counts can get corrupted 2021-07-10 19:00:37 -06:00
zfs_ioctl_impl.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_onexit.h file reference counts can get corrupted 2021-07-10 19:00:37 -06:00
zfs_project.h
zfs_quota.h
zfs_racct.h Restore FreeBSD resource usage accounting 2021-02-19 22:34:33 -08:00
zfs_ratelimit.h
zfs_refcount.h Correct refcount_add in dmu_zfetch 2021-10-08 11:10:34 -07:00
zfs_rlock.h
zfs_sa.h log xattr=sa create/remove/update to ZIL 2022-02-22 13:06:43 -08:00
zfs_stat.h
zfs_sysfs.h zcommon: pre-iterate over sysfs instead of statting every feature 2021-12-16 16:43:10 -08:00
zfs_vfsops.h Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
zfs_vnops.h Extending FreeBSD UIO Struct 2021-01-20 21:27:30 -08:00
zfs_znode.h Expose additional file level attributes 2022-03-07 17:52:03 -08:00
zil.h log xattr=sa create/remove/update to ZIL 2022-02-22 13:06:43 -08:00
zil_impl.h
zio.h Default to ON for compression 2022-03-03 10:43:38 -08:00
zio_checksum.h libzfs: convert to -fvisibility=hidden 2021-06-03 13:17:55 -07:00
zio_compress.h Add zstd support to zfs 2020-08-20 10:30:06 -07:00
zio_crypt.h module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zio_impl.h Add zstd support to zfs 2020-08-20 10:30:06 -07:00
zio_priority.h
zrlock.h
zthr.h Avoid memory allocations in the ARC eviction thread 2022-01-21 10:28:13 -08:00
zvol.h Remove unused function zvol_set_volblocksize() 2021-10-26 17:07:53 -07:00
zvol_impl.h zvol: make calls to platform ops static 2022-02-07 10:24:38 -08:00