]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: synchronize write-buffer before switching to the next bud
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 15 May 2011 11:51:54 +0000 (14:51 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 16 May 2011 07:31:41 +0000 (10:31 +0300)
commit8b3fa22b20348ad4cef6355dcf736953acf0546a
tree9e1b7aa466e83c77628fa74af00049893db84c40
parent9189b0d04809ffb27dfad1d9b6374174f8a3e68b
UBIFS: synchronize write-buffer before switching to the next bud

Currently when UBIFS fills up the current bud (which is the last in the journal
head) and switches to the next bud, it first writes the log reference node for
the next bud and only after this synchronizes the write-buffer of the previous
bud. This is not a big deal, but an unclean power cut may lead to a situation
when we have corruption in a next-to-last bud, although it is much more logical
that we have to have corruption only in the last bud.

This patch also removes write-buffer synchronization from
'ubifs_wbuf_seek_nolock()' because this is not needed anymore (we synchronize
the write-buffer explicitly everywhere now) and also because this is just
prone to various errors.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/gc.c
fs/ubifs/io.c
fs/ubifs/journal.c