Whamcloud - gitweb
- added assert in qos_calc_rr();
authoryury <yury>
Mon, 2 Oct 2006 08:21:04 +0000 (08:21 +0000)
committeryury <yury>
Mon, 2 Oct 2006 08:21:04 +0000 (08:21 +0000)
- fixed using mdt_join_rec in mdc;
- fixes about umount in mgs and mds (from 1_5);

lustre/llite/namei.c
lustre/lov/lov_qos.c
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mds/handler.c
lustre/mgs/mgs_handler.c

index c597012..5af6af8 100644 (file)
@@ -1108,7 +1108,7 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
         return rc;
 }
 
-static int ll_unlink_generic(struct inode * dir, struct qstr *name)
+static int ll_unlink_generic(struct inode *dir, struct qstr *name)
 {
         struct ptlrpc_request *request = NULL;
         struct md_op_data *op_data;
index a5e2229..5d8a13b 100644 (file)
@@ -358,6 +358,7 @@ static int qos_calc_rr(struct lov_obd *lov)
                       if (lov->lov_tgts[i]->ltd_qos.ltq_oss == oss) {
                               /* Evenly space these OSTs across arrayspace */
                               int next = j * ost_count / oss->lqo_ost_count;
+                              LASSERT(next < ost_count);
                               while (lov->lov_qos.lq_rr_array[next] !=
                                      LOV_QOS_EMPTY)
                                       next = (next + 1) % ost_count;
index 06e58f9..baea7ba 100644 (file)
@@ -51,13 +51,13 @@ void mdc_pack_capa(struct ptlrpc_request *req, int offset, struct obd_capa *oc)
 {
         struct lustre_capa *c;
 
-        if (!oc) {
+        if (oc == NULL) {
                 LASSERT(lustre_msg_buflen(req->rq_reqmsg, offset) == 0);
                 return;
         }
 
         c = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*c));
-        LASSERT(c);
+        LASSERT(c != NULL);
         capa_cpy(c, oc);
         DEBUG_CAPA(D_SEC, c, "pack");
 }
@@ -307,7 +307,7 @@ void mdc_unlink_pack(struct ptlrpc_request *req, int offset,
         mdc_pack_capa(req, offset + 1, op_data->mod_capa1);
 
         tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, op_data->namelen + 1);
-        LASSERT (tmp != NULL);
+        LASSERT(tmp != NULL);
         LOGL0(op_data->name, op_data->namelen, tmp);
 }
 
index ed129bd..b44aba5 100644 (file)
@@ -330,7 +330,7 @@ int mdc_enqueue(struct obd_export *exp,
                                    obddev->u.cli.cl_default_mds_easize);
                 if (do_join)
                         size[DLM_INTENT_REC_OFF + 5] =
-                                                sizeof(struct mds_rec_join);
+                                                sizeof(struct mdt_rec_join);
                 rc = lustre_msg_size(class_exp2cliimp(exp)->imp_msg_magic,
                                      8 + do_join, size);
                 if (rc & (rc - 1))
index fba849d..35efb7b 100644 (file)
@@ -2051,11 +2051,11 @@ err_ops:
         fsfilt_put_ops(obd->obd_fsops);
 err_put:
         if (lmi) {
-                server_put_mount(obd->obd_name, mds->mds_vfsmnt);
+                server_put_mount(obd->obd_name, mnt);
         } else {
                 /* old method */
                 unlock_kernel();
-                mntput(mds->mds_vfsmnt);
+                mntput(mnt);
                 lock_kernel();
         }
         obd->u.obt.obt_sb = NULL;
index cf1f9f5..d5ffb2e 100644 (file)
@@ -214,7 +214,7 @@ err_ns:
 err_ops:
         fsfilt_put_ops(obd->obd_fsops);
 err_put:
-        server_put_mount(obd->obd_name, mgs->mgs_vfsmnt);
+        server_put_mount(obd->obd_name, mnt);
         mgs->mgs_sb = 0;
         return rc;
 }