Please sign in to comment.
WIP - fix asynchronous delete
Problem The zfs_delete_blocks parameter, which is supposed to act as a size threshold over which files will be deleted asynchronously, does not work as intended. It's implemented in zfs_remove(), which in ZoL, is used both as a VFS function and also internally to remove the components of directory-based xattrs. When called from the VFS reference count on the inode following zfs_dirent_lock() will always be at least 2, 1 for the initial allocation and 1 for the reference taken in zfs_zget(). This causes "toobig" to always be false. Potential solution Since the removal of normal files actually takes place over the evict() path, add async removal handling to zfs_zinactive() which will always be called vi iput_final() with a zero reference count. NOTE: If this scheme works properly, all the zfs_delete_blocks/async handling should be able to be removed from zfs_remove().
- Loading branch information...