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, 29 Nov 2007 15:13:43 +1100
In-reply-to: <op.tyx0grm93jf8g2@pc-bnaujok.melbourne.sgi.com>
Organization: SGI
References: <op.tyx0grm93jf8g2@pc-bnaujok.melbourne.sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
Ping?

------- Forwarded message -------
From: "Barry Naujok" <bnaujok@xxxxxxx>
To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>
Cc:
Subject: REVIEW: Improve "." and ".." problem detection and handling in xfs_repair
Date: Thu, 20 Sep 2007 17:59:05 +1000


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: Text Data

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