[DragonFlyBSD - Bug #3352] (New) HAMMER2 ioctl(HAMMER2IOC_DESTROY) is broken
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Wed Jun 21 01:29:16 PDT 2023
Issue #3352 has been reported by tkusumi.
----------------------------------------
Bug #3352: HAMMER2 ioctl(HAMMER2IOC_DESTROY) is broken
http://bugs.dragonflybsd.org/issues/3352
* Author: tkusumi
* Status: New
* Priority: Normal
* Target version: 6.6
* Start date: 2023-06-21
----------------------------------------
1. hammer2(8) destroy directive - This succeeds with "ok" message, but after unmount + mount, the same file is still there.
The reason is because it currently just unlinks dirent chain from parent directory (ip) chain,
and returns without modifying parent directory which can cause flusher to flush.
Both VOP_NREMOVE and VOP_NRMDIR modify dip, but this one does not.
<pre><code class="shell">
# mount_hammer2 /dev/vn0 /mnt
# hammer2 destroy /mnt/src/Makefile
/mnt/src/Makefile ok
# hammer2 destroy /mnt/src/Makefile
/mnt/src/Makefile No such file or directory
# umount /mnt
# mount_hammer2 /dev/vn0 /mnt
# hammer2 destroy /mnt/src/Makefile
/mnt/src/Makefile ok
# hammer2 destroy /mnt/src/Makefile
/mnt/src/Makefile No such file or directory
</code></pre>
2. hammer2(8) destroy-inum directive - This simply fails. It seems hammer2_chain_lookup() can't find the chain via inode number.
<pre><code class="shell">
# mount_hammer2 /dev/vn0 /mnt
# ls -li /mnt/src/README
1104 -rw-r--r-- 1 root wheel 10989 Jun 21 00:58 /mnt/src/README
# hammer2 -s /mnt destroy-inum 1104
deleting inodes on /mnt
1104 No such file or directory
# hammer2 -s /mnt destroy-inum 0x450
deleting inodes on /mnt
1104 No such file or directory
</code></pre>
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list