mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-08 13:01:23 +00:00
Use get-allocated-inos in orphan-inodes test
The orphan inodes test needs to test if inode items exist as it manipulates inodes. It used to open the inode by a handle but we're fixing that to not allow opening unlinked files. The get-allocated-inos ioctl tests for the presence of items owned by the inode regardless of any other vfs state so we can use it to verify what scoutfs is doing as we work with the vfs inodes. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -26,7 +26,8 @@ inode_exists()
|
||||
{
|
||||
local ino="$1"
|
||||
|
||||
handle_cat "$T_M0" "$ino" > "$T_TMP.handle_cat.log" 2>&1
|
||||
scoutfs get-allocated-inos -i "$ino" -s -p "$T_M0" > $T_TMP.inos.log 2>&1
|
||||
test "$?" == 0 -a "$(head -1 $T_TMP.inos.log)" == "$ino"
|
||||
}
|
||||
|
||||
echo "== test our inode existance function"
|
||||
|
||||
Reference in New Issue
Block a user