Re: Linux-2.4.10 + ext3

Jan Kara (jack@suse.cz)
Thu, 27 Sep 2001 14:12:44 +0200


Hello,

<snip>

> ext3 needs to remain transactional even when making recursive calls
> into the filesystem, and ext3 implements quotas, which are quite
> capable of recursing into the fs if we end up hitting the VM at the
> wrong moment. Such recursions have to be handled very, very
> carefully: a legal recursion within one filesystem is valid, but
> recursions between filesystems absolutely must be avoided, as this can
> lead to deadlock.
>
> And there are recursions we just can't get rid of --- an inode delete
> ends up deallocating the inode on disk and updating the dquot (which
> does a dqput, which writes the quota entry using the normal VFS API),
> and we _have_ to make that quota-file write a nested transaction if we
> want quotas to be atomic with respect to journal recovery. Short of
> adding a new context parameter to be passed all the way through the
> quota and VM layers wherever this sort of recursion is possible, we
> need to attach that context to the task. (Without a task struct
> field, though, we can still hash outstanding transaction handles by
> pid for fast lookup.)
Actually Alan should now have patch in his queue which makes
quota guarantee no recursion on DQUOT_ALLOC/FREE operations (apart from
mark_inode_dirty()). Recursion is possible only in DQUOT_DROP,
DQUOT_INIT and DQUOT_TRANSFER. So this patch might help ext3 a bit.

Honza

--
Jan Kara <jack@suse.cz>
SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/