]> git.baikalelectronics.ru Git - kernel.git/commit
UBIFS: use EROFS when emulating failures
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 20 Apr 2011 14:06:17 +0000 (17:06 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 13 May 2011 16:23:54 +0000 (19:23 +0300)
commite3ff6f50a0fb7bb31c24527d5141b956c6fc7a3d
treeab0e9e7c327b20afbcbbc3ccf4063e8cd54a41a2
parented9cd3045705c9fa9149d1ab1f6748910a8ea133
UBIFS: use EROFS when emulating failures

When the debugging failure emulation is enabled and UBIFS decides to
emulate an I/O error, it uses EIO error code. In which case UBIFS
switches into R/O mode later on. The for the user-space is that when
a failure is emulated, the file-system sometimes returns EIO and
sometimes EROFS. This makes it more difficult to implement user-space
tests for the failure mode. Let's be consistent and return EROFS in
all the cases.

This patch is an improvement for the debugging code and does not affect
the functionality at all.

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