Hi Nathan,
I found a another problem related to the directory rebuilded
by xfs_repair.
The directory rebuilded by xfs_repair could not be removed.
# rm -fr /mnt/xfs/dir1
rm: cannot remove directory `/mnt/xfs/dir1': Directory not empty
I used Kernel 2.6.15-rc5(linux-2.6-xfs CVS) and xfsprogs-2.7.10-1.
I investigated this problem using xfs_db etc.
Rebuliding the damaged directory, xfs_repair make the count of
valid entries (hdr.nvalid) in the intermediate freespace block
2040 (XFS_DIR2_MAX_FREE_BESTS(mp)). The bests[hdr.nvalid-1] may
be unused entry, i.e. NULLDATAOFF.
In this case, Kernel space function xfs_dir2_leafn_remove() can not
take an opportunity that decrease hdr.nvalid.
Accordingly kernel space function xfs_dir2_node_to_leaf() can not
convert the node form directory down to a single-leaf directory...
(the leafn and free data do not fit in a leaf1)
I made a kernel patch to solve this problem.
rmdir -fr was successful in the kernel added the patch.
Could you please comment the attached patch.
attached files
T002_xfs.sh : reproducible script
note: the script includes mkfs.xfs and xfs_db -x
dir2_node_to_leaf.patch : kernel patch
Regards,
---
Masanori Tsuda
dir2_node_to_leaf.patch
Description: Binary data
T002_xfs.sh
Description: Binary data
|