Whamcloud - gitweb
e2fsck: add Lustre lfsck tool
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 13 Apr 2012 08:32:19 +0000 (02:32 -0600)
committerAndreas Dilger <andreas.dilger@intel.com>
Fri, 21 Mar 2014 09:54:48 +0000 (03:54 -0600)
commit320fd5b4a9687afe877d594686c1418eea9dc848
tree74895668bd01ab2fe674577104c44534420da86b
parenta4a95e77f3a47875e58c1cbabc133cab9096d21c
e2fsck: add Lustre lfsck tool

The lfsck tool, in conjunction with e2fsck, build a DB4 database
of all the inodes and objects on the MDT and OST filesystems.

The lfsck tool combines the databases on the Lustre client,
and can verify that all of the objects referenced by inodes
exist, are not referenced by two inodes, and have a parent
inode.

  LU-266 e2fsck: regenerate LAST_ID file
    e2fsck should be able to regenerate the LAST_ID file if it gets
    corrupted.  This patch will create a new LAST_ID file if it was
    deleted, and removes the unnecessary lfsck_get_last_id function.
    The last_id is then set as before in e2fsck_pass6_ost to either
    the max objid on disk, or MDS' max ost id, whichever is larger.
Reported-by: Bernd Schubert <aakef@fastmail.fm>
Signed-off-by: Kit Westneat <kwestneat@ddn.com>
  Change-Id: Ic5396da000909b826b76da2fd5a0b5ce88b06944

  LU-2682 lfsck: fix access to ost_id structures
    Changes in upstream lov_mds_md use lmm_oi and l_ost_oi instead
    of direct _id and _seq access, in preparation for FID-on-OST
    changes.  Update lfsck code to handle new structures.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
  Change-Id: If18f5ed34744b8372687472843ccc09108500c1e
  Change-Id: I05b5da92efbedb7b92c6de736c05beef30500c1e

  LU-2677 lfsck: handle smaller lustre_mdt_attrs
    In 2.4 the lustre_mdt_attrs (LMA) structure was shrunk to move out
    the unused SOM fields into a separate structure.  The filter_fid
    structure was shrunk to allow both FF and LMA on 256-byte OST
    inodes. Allow reading both old and new LMA and FF structures,
    since we only care about the initial fields in both of them.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
  Change-Id: If6c75d5ee3192ef3761aa9f645175698ebe5ee36

  LU-3132 lfsck: fix the wrong data pointer
    The patch is to pass a correct data pointer of struct lu_fid or
    struct ll_recreate_obj to ioctl in lfsck_recreate_obj().
Signed-off-by: Liu Ying <emoly.liu@intel.com>
  Change-Id: I8301f311cc5aaf57ae51ceaeb74db25fe61b5cd6

  LU-3838 lfsck: various defects in lfsck
    - In lfsck_get_fid(), sizeof(buf) should be passed as buffer
      length, but not sizeof(*buf);
    - In lfsck_mds_dirs(), we should follow into directory if the
      directory doesn't contain self fid;
    - In ext2fs_attr_ibody_get(), returns EXT2_ET_EA_TOO_BIG only
      when the buffer isn't large enough;
    - In ext2fs_attr_ibody_get(), do type cast before operating on
      pointer!
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
  Change-Id: I8ba4139fcc51b23bfa33c82c71f9b69b2b033a37

  LU-3837 lfsck: Abort lfsck in DNE mode
    lfsck doesn't support DNE mode now, we'd abort lfsck once the
    objects in remote dir is detected, otherwise, those objects could
    probably be cleared by lfsck mistakenly.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
  Change-Id: If66f04e261522e6216f524a703d427fce2a5938a

  LU-4288 e2fsprogs: process EA information in e2fsck_lfsck_find_ea
    The function e2fsck_lfsck_find_ea is designed to save information
    about an EA in the correct tables. This patch addresses a bug that
    prevents any EA from looked at it.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
22 files changed:
.gitignore
MCONFIG.in
configure
configure.in
debugfs/Makefile.in
e2fsck/Makefile.in
e2fsck/e2fsck.8.in
e2fsck/e2fsck.c
e2fsck/e2fsck.h
e2fsck/lfsck.8.in [new file with mode: 0644]
e2fsck/lfsck.c [new file with mode: 0644]
e2fsck/lfsck_common.c [new file with mode: 0644]
e2fsck/pass1.c
e2fsck/pass6.c [new file with mode: 0644]
e2fsck/unix.c
e2fsprogs-RHEL-6.spec.in
e2fsprogs-SUSE_LINUX-11.spec.in
e2fsprogs.spec.in
lib/config.h.in
lib/ext2fs/ext_attr.c
lib/ext2fs/lfsck.h
util/subst.conf.in