patch [4/4] reiser4progs: suppress reports about wrong bytes for cryptcompress objects
Don't report about wrong bytes for ccreg40 objects, as in most cases it is because kernel doesn't support i_blocks and i_bytes for such objects because of performance issues.
Signed-off-by Edward Shishkin<[email protected]>
--- reiser4progs-1.0.6-orig/doc/fsck.reiser4.8 | 3 reiser4progs-1.0.6-orig/plugin/object/ccreg40/ccreg40_repair.c | 8 + reiser4progs-1.0.6-orig/plugin/object/obj40/obj40_repair.c | 46 ++++++++-- reiser4progs-1.0.6-orig/plugin/object/obj40/obj40_repair.h | 16 +++ 4 files changed, 66 insertions(+), 7 deletions(-)
doc/fsck.reiser4.8 renamed from doc/fsck.reiser4.8.orig +2 -1
@@ -30,7 +30,8 @@ the default action checks the consistenc This option may be used on a read-only file system mount. .TP .B --fix -fixes minor corruptions that do not require rebuilding. +fixes minor corruptions that do not require rebuilding; +sets up correct values of bytes unsupported by kernel in the case of transparent compression. .TP .B --build-sb fixes all severe corruptions in super blocks, rebuilds super blocks from scratch if needed.
plugin/object/ccreg40/ccreg40_repair.c renamed from plugin/object/ccreg40/ccreg40_repair.c.orig +8 -0
@@ -300,6 +300,14 @@ errno_t ccreg40_check_struct(reiser4_obj ops.check_size = ccreg40_check_size; ops.check_nlink = mode ==RM_BUILD ?0 :SKIP_METHOD ; +/** +* don't report about wrong bytes for ccreg40 +* objects, as in most cases it is because kernel +* doesn't support i_blocks and i_bytes for such +* objects because of performance issues. +*/ + ops.check_bytes = mode ==RM_CHECK ?SKIP_METHOD :0 ; + ops.check_bytes_report =SKIP_METHOD ; hint.stat.mode =S_IFREG ; hint.stat.size =objcall (&cc->position, get_offset);
plugin/object/obj40/obj40_repair.c renamed from plugin/object/obj40/obj40_repair.c.orig +40 -6
61 lines not on this page · raw message
plugin/object/obj40/obj40_repair.h renamed from plugin/object/obj40/obj40_repair.h.orig +16 -0
@@ -18,6 +18,11 @@ typedef struct obj40_stat_ops {int (*check_nlink) (reiser4_object_t *obj,uint32_t *,uint32_t );int (*check_size) (reiser4_object_t *obj,uint64_t *,uint64_t );int (*check_bytes) (reiser4_object_t *obj,uint64_t *,uint64_t ); +int (*check_bytes_report) (reiser4_place_t *start, +reiser4_core_t *core, +uint64_t found_bytes, +uint8_t mode, +uint64_t correct_bytes); } obj40_stat_ops_t; typedef struct obj40_stat_hint {
@@ -46,3 +51,14 @@ extern lookup_t obj40_check_item(reiser4 void *data);#endif + +/* +Local variables: +c-indentation-style: "K&R" +mode-name: "LC" +c-basic-offset: 8 +tab-width: 8 +fill-column: 80 +scroll-step: 1 +End: +*/