Whamcloud - gitweb
LU-14366 mdt: lfs mkdir should return -EEXIST if exists
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 23 Jan 2021 10:28:26 +0000 (18:28 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 5 May 2021 03:56:55 +0000 (03:56 +0000)
commit6214a9330254af64a06ffd48824f57a40037ca19
tree008d59f4b802a7fb89d725bb1d82a98b0accc44c
parent500cb1636578c30e1bb9f190bb951c3605abf881
LU-14366 mdt: lfs mkdir should return -EEXIST if exists

'lfs setdirstripe' will try restripe if target exists, however
it's confusing to get -ENOTSUPP or -EALREADY for 'lfs mkdir', while
the latter invokes the same function as 'lfs setdirstripe'.

Pack MDS_OPEN_CREAT flag in request for 'lfs mkdir', and MDT won't
try restripe if it's set.

Add sanity 230s.

Lustre-change: https://review.whamcloud.com/41329
Lustre-commit: 65e3e4050ec5bb371c1c343fca49a605286a086e

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I7b7ed04ee0b150253ff4d13bbdf1fe847d8f577c
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/43428
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/dir.c
lustre/mdc/mdc_lib.c
lustre/mdt/mdt_reint.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c