xfs
[Top] [All Lists]

REVIEW: Improve "." and ".." problem detection and handling in xfs_repai

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>
Subject: REVIEW: Improve "." and ".." problem detection and handling in xfs_repair
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Thu, 20 Sep 2007 17:59:05 +1000
Organization: SGI
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.10 (Win32)
In a non-shortform directory (ie. the directory contents is
stored within the inode on-disk), if "." or ".." are placed
in different blocks, the directory cannot be made shortform
when everything else in the directory is deleted as two
blocks still remain. This prevents the kernel from deleting
this directory saying it's "not empty" (see
http://oss.sgi.com/archives/xfs/2007-09/msg00142.html ).

The attached patch detects "." or ".." not being in the
first block and rebuilds it in repair so it may be
deleted when required.

Also, testing this patch, I found if ".." didn't exist in
a directory, yet another directory had an entry for it,
it was put in lost+found. The patch now puts ".." back in
for the directory referencing it.

I also improved the lookup of the parent when rebuilding
a directory (it did a hash lookup of ".." instead of the
already existing get_inode_parent() call).

Attachment: improve_dot_and_dotdot_handling.patch
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • REVIEW: Improve "." and ".." problem detection and handling in xfs_repair, Barry Naujok <=