ocfs2: block read meta ecc.
Add block check calls to the read_block validate functions. This is the almost all of the read-side checking of metaecc. xattr buckets are not checked yet. Writes are also unchecked, and so a read-write mount will quickly fail. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Este cometimento está contido em:

cometido por
Mark Fasheh

ascendente
684ef27837
cometimento
d6b32bbb3e
@@ -24,6 +24,8 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include <cluster/masklog.h>
|
||||
|
||||
#include "ocfs2.h"
|
||||
|
||||
#include "blockcheck.h"
|
||||
@@ -292,6 +294,10 @@ int ocfs2_block_check_validate(void *data, size_t blocksize,
|
||||
if (crc == check.bc_crc32e)
|
||||
goto out;
|
||||
|
||||
mlog(ML_ERROR,
|
||||
"CRC32 failed: stored: %u, computed %u. Applying ECC.\n",
|
||||
(unsigned int)check.bc_crc32e, (unsigned int)crc);
|
||||
|
||||
/* Ok, try ECC fixups */
|
||||
ecc = ocfs2_hamming_encode_block(data, blocksize);
|
||||
ocfs2_hamming_fix_block(data, blocksize, ecc ^ check.bc_ecc);
|
||||
@@ -301,6 +307,9 @@ int ocfs2_block_check_validate(void *data, size_t blocksize,
|
||||
if (crc == check.bc_crc32e)
|
||||
goto out;
|
||||
|
||||
mlog(ML_ERROR, "Fixed CRC32 failed: stored: %u, computed %u\n",
|
||||
(unsigned int)check.bc_crc32e, (unsigned int)crc);
|
||||
|
||||
rc = -EIO;
|
||||
|
||||
out:
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador