Whamcloud - gitweb
- check for GNS mount even if upcall returned to error (to not miss them)
authoryury <yury>
Fri, 6 May 2005 18:56:26 +0000 (18:56 +0000)
committeryury <yury>
Fri, 6 May 2005 18:56:26 +0000 (18:56 +0000)
- added IT_GETATTR to check if mount should be performed (experimental)

lustre/llite/dcache.c
lustre/llite/llite_gns.c
lustre/llite/namei.c
lustre/tests/sanity-gns.sh

index 2f31473..0526985 100644 (file)
@@ -516,7 +516,7 @@ out:
          * --umka
          */
         if (((de->d_inode->i_mode & S_ISUID) && S_ISDIR(de->d_inode->i_mode)) ||
-            !(flags & LOOKUP_CONTINUE || (orig_it & (IT_CHDIR | IT_OPEN)))) {
+            !(flags & LOOKUP_CONTINUE || (orig_it & (IT_CHDIR | IT_OPEN | IT_GETATTR)))) {
                 
                 /* special "." and ".." has to be always revalidated */
                 if (rc && !ll_special_name(de) && nd != NULL && !(nd->flags & LOOKUP_LAST)) {
index d1836a0..0e37b51 100644 (file)
@@ -282,9 +282,8 @@ ll_gns_mount_object(struct dentry *dentry, struct vfsmount *mnt)
         /* do not wait for helper complete here. */
         rc = call_usermodehelper(argv[0], argv, NULL, 0);
         if (rc) {
-                CERROR("failed to call GNS upcall %s, err = %d\n",
-                       sbi->ll_gns_upcall, rc);
-                GOTO(cleanup, rc);
+                CWARN("failed to call GNS upcall %s, err = %d, "
+                      "checking for mount anyway\n", sbi->ll_gns_upcall, rc);
         }
 
         /*
index e91adbf..06afbe4 100644 (file)
@@ -402,7 +402,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
         if (nd &&
             dentry->d_inode != NULL && dentry->d_inode->i_mode & S_ISUID &&
             S_ISDIR(dentry->d_inode->i_mode) &&
-            ((flags & LOOKUP_CONTINUE) || (orig_it & (IT_CHDIR | IT_OPEN))))
+            ((flags & LOOKUP_CONTINUE) || (orig_it & (IT_CHDIR | IT_OPEN | IT_GETATTR))))
         {
                 rc = ll_gns_mount_object(dentry, nd->mnt);
                 if (rc == -ERESTARTSYS) {
index afd5597..009f1f3 100644 (file)
@@ -327,10 +327,12 @@ check_gns() {
     echo "$UPCALL_PATH" > /proc/fs/lustre/llite/fs0/gns_upcall || return $?
     echo "upcall:  $(cat /proc/fs/lustre/llite/fs0/gns_upcall)"
 
+#    local OLD_PWD=$(pwd)
     case "$MODE" in
        GENERIC)
            echo -n "mount on open $OBJECT1/test_file1 (generic): "
            echo -n "test data" > $OBJECT1/test_file1 >/dev/null 2>&1 || return $?
+#          cd $OBJECT1 || return $?
            ;;
        CONCUR1)
            local i=1
@@ -388,6 +390,8 @@ check_gns() {
            echo "invalid testing mode $MODE"
            return 1
     esac
+
+#    cd $OLD_PWD
     
     check_mnt $OBJECT1 || {
        echo "fail"