LWN.net Logo

EXT4-ish "fixes" in UBIFS

From:  Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To:  Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject:  EXT4-ish "fixes" in UBIFS
Date:  Fri, 27 Mar 2009 14:48:10 +0200
Message-ID:  <49CCCB0A.6070701@nokia.com>
Archive-link:  Article, Thread

UBIFS has exactly the same properties like ext4 - in case
of power cuts:

1. truncate/write/close leads to empty files
2. create/write/rename leads to empty files

UBIFS is used in hand-held and and power-cuts are very
often there, because users just remove battery often.

I realize the "reality is different" argument, and already
concluded that we need a similar changes as Theo has done
for ext4:
http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;...
http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;...
http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;...

We have a problem that user-space people do not want to
use 'fsync()', even when they are pointed to their code
which is doing create/write/rename/close without fsync().

They just say - this is file-system bug, it is fixed in
ext4 now, just fix the bug in UBIFS.

I tell them, that is not a fix, that is band-aid, because
ext4 issues asynchronous write, and a power cut can lead
to corruptions anyway.

I tell them, we can make this in UBIFS, but please, anyway
add fsync() to your application. They say - now, we will
will not - you fix your UBIFS.

And because there is so much flood and about this, it is
so difficult to have reasonable arguments. I want to say
people - please, still use fsync(), if this is about the
performance/reliability trade-off - make it optional.
But they instead say - respected people are on our side,
go away. And point me this:
http://www.advogato.org/person/mjg59/diary/195.html
http://thread.gmane.org/gmane.linux.kernel/811167/focus=8...
http://article.gmane.org/gmane.comp.lang.perl.perl5.porte...

And they say that BTRFS and XFS are going to fix userspace
as well, and point me at this:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/3177...

This all became so messy and controversial. What should I do
to persuade userspace to use 'fsync()' even if we hack UBIFS
similarly to ext4? Suggestions?

-- 
Best Regards,
Artem Bityutskiy (????? ????????)

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds