Whamcloud - gitweb
fix handle ost additional correctly
authorshadow <shadow>
Wed, 19 Nov 2008 06:02:20 +0000 (06:02 +0000)
committershadow <shadow>
Wed, 19 Nov 2008 06:02:20 +0000 (06:02 +0000)
Branch b1_6
b=16492
i=umka
i=tappro

lustre/ChangeLog
lustre/include/lustre_lite.h
lustre/liblustre/super.c
lustre/llite/llite_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c
lustre/tests/conf-sanity.sh

index d0d723d..ad77f4a 100644 (file)
@@ -42,6 +42,15 @@ tbd Sun Microsystems, Inc.
        * A new Lustre ADIO driver is available for:
          MPICH2-1.0.7
 
+Severity   : normal
+Frequency  : rare, need acls on inode.
+Bugzilla   : 16492
+Description: client can't handle ost additional correctly
+Details    : if ost was added after client connected to mds client can have 
+             hit lnet_try_match_md ... to big messages to wide striped files.
+             in this case need teach client to handle config events about add
+             lov target and update client max ea size at that event.
+
 Severity   : enhancement
 Bugzilla   : 17374
 Description: Update to sles9 kernel-2.6.5-7.314.
index d83c9b7..6543cba 100644 (file)
@@ -130,6 +130,8 @@ struct lustre_client_ocd {
          */
         __u64      lco_flags;
         spinlock_t lco_lock;
+        struct obd_export *lco_mdc_exp;
+        struct obd_export *lco_osc_exp;
 };
 
 /*
@@ -158,7 +160,11 @@ static inline int ll_ocd_update(struct obd_device *host,
                        lco->lco_flags, flags);
                 spin_lock(&lco->lco_lock);
                 lco->lco_flags &= flags;
+                /* for each osc event update ea size */
+                if (lco->lco_osc_exp)
+                        mdc_init_ea_size(lco->lco_mdc_exp, lco->lco_osc_exp);
                 spin_unlock(&lco->lco_lock);
+
                 result = 0;
         } else {
                 CERROR("unexpected notification from %s %s!\n",
index a70faec..5165d49 100644 (file)
@@ -1999,6 +1999,9 @@ llu_fsswop_mount(const char *source,
         }
         sbi->ll_osc_exp = class_conn2export(&osc_conn);
         sbi->ll_lco.lco_flags = ocd.ocd_connect_flags;
+        sbi->ll_lco.lco_mdc_exp = sbi->ll_mdc_exp;
+        sbi->ll_lco.lco_osc_exp = sbi->ll_osc_exp;
+
 
         err = obd_register_lock_cancel_cb(sbi->ll_osc_exp,
                                           llu_extent_lock_cancel_cb);
@@ -2007,8 +2010,6 @@ llu_fsswop_mount(const char *source,
                 GOTO(out_osc, err);
         }
 
-        mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp);
-
         err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid);
         if (err) {
                 CERROR("cannot mds_connect: rc = %d\n", err);
index d96f383..2cd8ddf 100644 (file)
@@ -338,6 +338,8 @@ static int client_common_fill_super(struct super_block *sb,
         sbi->ll_osc_exp = class_conn2export(&osc_conn);
         spin_lock(&sbi->ll_lco.lco_lock);
         sbi->ll_lco.lco_flags = data->ocd_connect_flags;
+        sbi->ll_lco.lco_mdc_exp = sbi->ll_mdc_exp;
+        sbi->ll_lco.lco_osc_exp = sbi->ll_osc_exp;
         spin_unlock(&sbi->ll_lco.lco_lock);
 
         err = obd_register_page_removal_cb(sbi->ll_osc_exp,
@@ -354,12 +356,6 @@ static int client_common_fill_super(struct super_block *sb,
                 GOTO(out_page_rm_cb, err);
         }
 
-        err = mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp);
-        if (err) {
-                CERROR("cannot set max EA and cookie sizes: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-
         err = obd_prep_async_page(sbi->ll_osc_exp, NULL, NULL, NULL,
                                   0, NULL, NULL, NULL, 0, NULL);
         if (err < 0) {
index 0b54a3f..c44fbfe 100644 (file)
@@ -505,24 +505,6 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                                 CERROR ("Missing/short eadata\n");
                                 RETURN (-EPROTO);
                         }
-                        if (body->valid & OBD_MD_FLMODEASIZE) {
-                                struct obd_device *obddev = class_exp2obd(exp);
-
-                                if (obddev->u.cli.cl_max_mds_easize < 
-                                                        body->max_mdsize) {
-                                        obddev->u.cli.cl_max_mds_easize = 
-                                                body->max_mdsize;
-                                        CDEBUG(D_INFO, "maxeasize become %d\n",
-                                               body->max_mdsize);
-                                }
-                                if (obddev->u.cli.cl_max_mds_cookiesize <
-                                                        body->max_cookiesize) {
-                                        obddev->u.cli.cl_max_mds_cookiesize =
-                                                body->max_cookiesize;
-                                        CDEBUG(D_INFO, "cookiesize become %d\n",
-                                               body->max_cookiesize);
-                                }
-                        }
                         /* We save the reply LOV EA in case we have to replay
                          * a create for recovery.  If we didn't allocate a
                          * large enough request buffer above we need to
index 5702dd7..2a202b8 100644 (file)
@@ -168,16 +168,6 @@ int mdc_getattr_common(struct obd_export *exp, unsigned int ea_size,
                 }
         }
 
-        if (body->valid & OBD_MD_FLMODEASIZE) {
-                if (exp->exp_obd->u.cli.cl_max_mds_easize < body->max_mdsize)
-                        exp->exp_obd->u.cli.cl_max_mds_easize =
-                                                body->max_mdsize;
-                if (exp->exp_obd->u.cli.cl_max_mds_cookiesize <
-                                                body->max_cookiesize)
-                        exp->exp_obd->u.cli.cl_max_mds_cookiesize =
-                                                body->max_cookiesize;
-        }
-
         RETURN (0);
 }
 
index 4ad581a..cc64ae2 100644 (file)
@@ -1485,6 +1485,47 @@ test_45() { #17310
 }
 run_test 45 "long unlink handling in ptlrpcd"
 
+test_46a() {
+       OSTCOUNT=6
+       reformat
+       start_mds || return 1
+       #first client should see only one ost
+       start_ost || return 2
+       #start_client
+       mount_client $MOUNT || return 3
+       
+       start_ost2 || return 4
+       start ost3 `ostdevname 3` $OST_MOUNT_OPTS || return 5
+       start ost4 `ostdevname 4` $OST_MOUNT_OPTS || return 6
+       start ost5 `ostdevname 5` $OST_MOUNT_OPTS || return 7
+       # wait until ost2-5 is sync
+       sleep 5
+       #second client see both ost's
+
+       mount_client $MOUNT2 || return 8
+       $LFS setstripe $MOUNT2 -c -1 || return 9
+       $LFS getstripe $MOUNT2 || return 10
+
+       echo "ok" > $MOUNT2/widestripe
+       $LFS getstripe $MOUNT2/widestripe || return 11
+       # fill acl buffer for avoid expand lsm to them
+       awk -F : '{if (FNR < 25) { print "u:"$1":rwx" }}' /etc/passwd | while read acl; do  
+           setfacl -m $acl $MOUNT2/widestripe
+       done
+
+       # will be deadlock
+       stat $MOUNT/widestripe || return 12
+
+       umount_client $MOUNT2 || return 13
+       umount_client $MOUNT || return 14
+       stop ost5 -f || return 20
+       stop ost4 -f || return 21
+       stop ost3 -f || return 22
+       stop_ost2 || return 23
+       stop_ost || return 24
+       stop_mds || return 25
+}
+run_test 46a "handle ost additional - wide striped file"
 
 equals_msg `basename $0`: test complete
 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true