Whamcloud - gitweb
changes to protect directory splitting from concurrent modifies/lookups:
authoralex <alex>
Thu, 3 Jun 2004 11:23:51 +0000 (11:23 +0000)
committeralex <alex>
Thu, 3 Jun 2004 11:23:51 +0000 (11:23 +0000)
commitfb92b63f136df0176818a9515cc2f729fb4ebe9a
tree7d23aefac5e0c7401db6d80cbfa1c4844d1abda5
parentc95a014885978a091ebff8b31d07a06b54f02611
changes to protect directory splitting from concurrent modifies/lookups:

 - mds_fid2locked_dentry() takes UPDATE lock on the inode. depending on the
   given mode for LOOKUP lock new routine mds_lock_mode_for_dir() learns
   what mode to use for UPDATE lock. it could be:
   - LCK_CR - lookup case. it protects directory from concurrent splitting
     and don't invalidate client cache readdir()
   - LCK_CW - modify case. it protects directory from concurrent splitting
     and invalidate client cache for readdir()
   - LCK_EX - modify with possible splitting. protects from any parallel access

 - mds_getattr_name(), mds_open(), mds_reint_setattr(), mds_reint_create(),
   mds_get_parent_child_locked(), mds_reint_unlink(), mds_reint_rename() and
   mds_get_parents_children_lock() have been modified to play new game with
   directory locking

 - mds_splitting_expected() predicts splitting possibility
lustre/include/linux/lustre_mds.h
lustre/mds/handler.c
lustre/mds/mds_internal.h
lustre/mds/mds_lmv.c
lustre/mds/mds_open.c
lustre/mds/mds_reint.c