]> git.proxmox.com Git - mirror_zfs.git/commit - man/man5/zfs-module-parameters.5
Reintroduce zfs_remove() synchronous deletes
authorkernelOfTruth <kerneloftruth@gmail.com>
Fri, 21 Aug 2015 01:43:10 +0000 (03:43 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 Jan 2016 23:26:02 +0000 (15:26 -0800)
commita966c5640e432f723753e63354394406a7c3dcf8
tree85256b0cae2619ed097320ba16b51dcf97178642
parent460a021391d32b7f2e9eb05a9a01946714174e3b
Reintroduce zfs_remove() synchronous deletes

Reintroduce a slightly adapted version of the Illumos logic for
synchronous unlinks.  The basic idea here is that only files
smaller than zfs_delete_blocks (20480) blocks should be deleted
synchronously.  Unlinking larger files should be handled
asynchronously to minimize impact to the caller.

To accomplish this iput() which is responsible for calling
zfs_znode_delete() on Linux is only called in the delete_now
path.  Otherwise zfs_async_iput() is used which allows the
last reference to be dropped by a taskq thread effectively
making the removal asynchronous.

Porting notes:
- Add zfs_delete_blocks module option for performance analysis.
  The default value is DMU_MAX_DELETEBLKCNT which is the same
  as upstream.  Reducing this value means that smaller files
  will be unlinked asynchronously like large files.
- All occurrences of zfsvfs changes to zsb.

Ported-by: KernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
man/man5/zfs-module-parameters.5
module/zfs/zfs_vnops.c