• S
    dm verity: add error handling modes for corrupted blocks · 65ff5b7d
    Sami Tolvanen 提交于
    Add device specific modes to dm-verity to specify how corrupted
    blocks should be handled.  The following modes are defined:
    
      - DM_VERITY_MODE_EIO is the default behavior, where reading a
        corrupted block results in -EIO.
    
      - DM_VERITY_MODE_LOGGING only logs corrupted blocks, but does
        not block the read.
    
      - DM_VERITY_MODE_RESTART calls kernel_restart when a corrupted
        block is discovered.
    
    In addition, each mode sends a uevent to notify userspace of
    corruption and to allow further recovery actions.
    
    The driver defaults to previous behavior (DM_VERITY_MODE_EIO)
    and other modes can be enabled with an additional parameter to
    the verity table.
    Signed-off-by: NSami Tolvanen <samitolvanen@google.com>
    Signed-off-by: NMike Snitzer <snitzer@redhat.com>
    65ff5b7d
dm.c 83.8 KB