Re: replace() system call needed (was Re: EXT4-ish "fixes" in UBIFS)

From: Bodo Eggert
Date: Tue Mar 31 2009 - 17:27:55 EST


Pavel Machek <pavel@xxxxxx> wrote:

> My proposal is
>
> rename() stays.
>
> replace(src, bar) is rename that ensures that bar will contain valid
> data after powerfail.

This can be done using implicit logic:

->E.g. on close(), mark inodes without being sync()ed as poisoned.
(I can think of more sophisticated logic, but ...)
->On completing the inode with the delayed allocations, unpoison it.
->Don't commit rename()s if the corresponding inode is poisoned.

Et Voila, everything replace is supposed to guarantee is guaranteed.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/