Skip to content
  • Shuichi Ihara's avatar
    misc: add e2mmpstatus utility via dumpe2fs · 32b8802a
    Shuichi Ihara authored
    
    
    e2mmpstatus is a Multi-Mount Protection (MMP) helper utility to read
    an MMP block to see if it is being updated.  It can also output the
    latest update time, nodename, and device from the MMP block.
    
    This is useful for HA and other maintenance scripts to determine if
    the filesystem is in use on another node, and which node it is.
    
    Signed-off-by: default avatarShuichi Ihara <sihara@ddn.com>
    Signed-off-by: default avatarLi Xi <lixi@ddn.com>
    Signed-off-by: default avatarWang Shilong <wshilong@ddn.com>
    
    Moved e2mmpstatus checking/dumping code to be part of dumpe2fs rather
    than a standalone program, using the "-m" option to check MMP status,
    and "-i" to dump info.  If dumpe2fs is called as "e2mmpstatus" (and
    also "mmpstatus" for compatibility reasons), assume "-m" is specified.
    
    Re-use the existing MMP block handing routines (with some changes) to
    check and dump the MMP block, rather than adding duplicate versions.
    
    Modify dumpe2fs to exit with a non-zero error code if there is an
    error while reading the files...
    32b8802a