Messages in this thread |  | | Date | Sat, 2 Dec 2000 18:30:21 +1300 | From | Chris Wedgwood <> | Subject | Re: ext2 directory size bug (?) |
| |
On Sat, Dec 02, 2000 at 12:14:34AM -0500, Alexander Viro wrote:
Not really. Anything that modifies directories holds both ->i_sem and ->i_zombie, lookups hold ->i_sem and emptiness checks (i.e. victim in rmdir and overwriting rename) hold ->i_zombie, readdir holds both.
what performance issues does this raise in the cast of a directory with _many_ files in it -- when we are renaming often involving that directory?
I ask this because certain MTAs do just that; and when you have 10,000 to 100,000 messages queued I immagine you might spend much of your time waiting for ->i_sem locks?
Truncating is a piece of cake. Repacking is not a good idea, though, since you are risking massive corruption in case of dirty shutdown in the wrong moment.
ext2 directories seem somewhat susepctable to corruption on badly timed shutdowns anyhow; and I don't think there is any way to do atomic writes to them with most disk hardware is there?
--cw - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |