Whamcloud - gitweb
LU-13577 wbc: reimplement mkdir() by using intent lock
This patch reworks mkdir() by using intent lock.
Instead of reint mkdir implementation without any lock returned,
a ibits lock (current PR LOOKUP|PERM) is granted to the client and
cached on the client-side lock namespaces by the mkdir() intent
lock request.
This is also a basic requirement for the coming WBC feature, i.e,
create a new directory and an EX WBC lock is returned from MDT in
intent lock request, then this root WBC directory can be safely
cached on the client under the protection of the root WBC EX lock.
This patch also adds a tuning parameter "llite.*.intent_mkdir" to
enable or disable mkdir() by using intent lock. It is set with 0
by default to disable intent mkdir().
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I94e4c2f8262d7ffb27d85b5569070049a47354d7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38647
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 files changed: