Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illumos zfs_remove() patches #4259

Closed
wants to merge 2 commits into from

Conversation

behlendorf
Copy link
Contributor

Illumos 6334 - Cannot unlink files when over quota
Reintroduce zfs_remove() synchronous deletes

kernelOfTruth and others added 2 commits January 22, 2016 15:56
Reintroduce a slightly adapted version of the Illumos logic for
synchronous unlinks.  The basic idea here is that only files
smaller than a ~1000 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_ipt() is used which allows the
last reference to be dropped by a taskq thread effectively
making the removing asynchronous.

Porting notes:
- The threshold defining a large file was reduced from the
  upstream DMU_MAX_DELETEBLKCNT (20480) blocks to a smaller
  much smaller 1024 blocks.  This was done because for Linux
  we need to add the object to the unlinked set regardless
  so there's a reduced benefit to handling it synchronously.
- All occurrences of zfsvfs changes to zsb.

Ported-by: KernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
6334 Cannot unlink files when over quota
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>

References:
  https://www.illumos.org/issues/6334
  illumos/illumos-gate@6575bca

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf
Copy link
Contributor Author

Merged as:

1a04bab llumos 6334 - Cannot unlink files when over quota
a966c56 Reintroduce zfs_remove() synchronous deletes

@behlendorf behlendorf closed this Jan 26, 2016
@behlendorf behlendorf deleted the illumos-remove branch May 18, 2018 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants