• Lai Siyao's avatar
    LU-12624 lod: alloc dir stripes by QoS · c1d0a355
    Lai Siyao authored
    
    
    Similar to file OST object allocation, introduce directory stripe
    allocation by space usage, but they don't share the same code because
    of the many differences between them: file has mirrors, PFL, object
    precreation; while for directory, the first stripe is always on the
    same MDT where its master object is on. The changes include:
    * add lod_mdt_alloc_qos() to allocate stripes by space/inode usage.
    * add lod_mdt_alloc_rr() to allocate stripes round-robin.
    * add lod_mdt_alloc_specific() to allocate stripes in the old way.
    * add sysfs support for lmv_desc field in LOD structure, and move
      those remain in procfs to sysfs.
    
    This patch also changes LMV QoS code:
    * mkdir by QoS if user mkdir by command 'lfs mkdir -i -1 ...', or the
      parent directory default LMV starting MDT index is -1.
    * with the above change, 'space' hash flag is useless, remove all
      related code.
    * previously 'lfs mkdir -i -1' QoS code is in lfs_setdirstripe(),
      but now it's done in LMV, remove the old code.
    
    Update sanity 413a 413b to support QoS mkdir of both plain and
    striped directories.
    
    Update lfs-setdirstripe man to reflect the changes.
    
    Signed-off-by: default avatarLai Siyao <lai.siyao@whamcloud.com>
    Change-Id: I8f5f8e46faae68ffd9a49a4ac1d450e951e979c5
    Reviewed-on: https://review.whamcloud.com/35825
    
    
    Tested-by: default avatarjenkins <devops@whamcloud.com>
    Tested-by: default avatarMaloo <maloo@whamcloud.com>
    Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
    Reviewed-by: default avatarHongchao Zhang <hongchao@whamcloud.com>
    Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
    c1d0a355