]> bbs.cooldavid.org Git - net-next-2.6.git/commit
UBIFS: fix no_chk_data_crc
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 27 Jan 2009 14:12:31 +0000 (16:12 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 27 Jan 2009 14:25:10 +0000 (16:25 +0200)
commit6f7ab6d458bbfc2f55d295fa3e6b9e69cdb1d517
tree7d07f5ff88d205a652998c2fd281e7123ba9a112
parent6ba87c9b920bea8c2703308d31eb7de925242c30
UBIFS: fix no_chk_data_crc

When data CRC checking is disabled, UBIFS returns incorrect return
code from the 'try_read_node()' function (0 instead of 1, which means
CRC error), which make the caller re-read the data node again, but using
a different code patch, so the second read is fine. Thus, we read the
same node twice. And the result of this is that UBIFS is slower
with no_chk_data_crc option than it is with chk_data_crc option.
This patches fixes the problem.

Reported-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/io.c
fs/ubifs/tnc.c
fs/ubifs/ubifs.h