Skip to content
  • Bruno Faccini's avatar
    LU-11376 lmv: new foreign LMV format · fdad3878
    Bruno Faccini authored
    
    
    This patch introduces a new striping/LMV format in order to
    allow to specify an arbitrary external reference for a dir
    in Lustre namespace.
    The new LMV format is made of {newmagic, length, type, flags,
    string[length]} to be as flexible as possible.
    Foreign dir can be created by using the ioctl(LL_IOC_LMV_SETDIRSTRIPE)
    operation and it can only be and remain an empty dir until removed.
    A new API method llapi_dir_create_foreign() has been introduced
    and "lfs {get,set}dirstripe" and "lfs find" modified to understand
    new format.
    The idea behind this is to provide Lustre namespace support and
    striping prefetch/caching under lock protection, for user/external
    usage.
    
    This patch is the LMV/dirs complement of LOV/files previous change
    (Change-Id: I5d9c0642fe8e7009c30918bfa946cac7c00c9af8) and has
    been rebased on top of the latter along with some with obvious
    mutualizations and simplifications.
    
    Code has been added for lfsck to handle foreign dirs, and
    a new sub-test has been added in sanity-lfsck in order to verify
    if does not break foreign dir and that reverse is also true.
    
    Also fixes a bug causing SEGVs during
    "lfs find [--mdt-count=[+,-]<count>, --mdt-hash=<hashtype>]" when
    handling a file (ie, "DIR *dir" is NULLL) in cb_find_init().
    
    Signed-off-by: default avatarBruno Faccini <bruno.faccini@intel.com>
    Change-Id: I3721b8f14578bf926a92da76375dae92dc8d764d
    Reviewed-on: https://review.whamcloud.com/34087
    
    
    Tested-by: Jenkins
    Tested-by: default avatarMaloo <maloo@whamcloud.com>
    Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
    Reviewed-by: default avatarPatrick Farrell <pfarrell@whamcloud.com>
    Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
    fdad3878