Whamcloud - gitweb
- fix issues with wire structures and swabbing
authortappro <tappro>
Wed, 27 Sep 2006 20:48:51 +0000 (20:48 +0000)
committertappro <tappro>
Wed, 27 Sep 2006 20:48:51 +0000 (20:48 +0000)
- initialize some values that can be uninitialized

lustre/include/lustre/lustre_idl.h
lustre/osd/osd_handler.c
lustre/ost/ost_handler.c
lustre/ptlrpc/pack_generic.c

index 98883d0..156d076 100644 (file)
@@ -477,12 +477,12 @@ struct obd_connect_data {
         __u32 ocd_version;              /* lustre release version number */
         __u32 ocd_grant;                /* initial cache grant amount (bytes) */
         __u32 ocd_index;                /* LOV index to connect to */
-        __u32 ocd_group;                /* MDS group on OST */
         __u32 ocd_brw_size;             /* Maximum BRW size in bytes */
         __u64 ocd_ibits_known;          /* inode bits this client understands */
         __u32 ocd_nllu;                 /* non-local-lustre-user */
         __u32 ocd_nllg;                 /* non-local-lustre-group */
-        __u64 padding1;                 /* also fix lustre_swab_connect */
+        __u32 ocd_group;                /* MDS group on OST */
+        __u32 padding1;                 /* also fix lustre_swab_connect */
         __u64 padding2;                 /* also fix lustre_swab_connect */
         __u64 padding3;                 /* also fix lustre_swab_connect */
         __u64 padding4;                 /* also fix lustre_swab_connect */
@@ -1026,7 +1026,7 @@ struct mdt_epoch {
         __u32  flags;
 };
 
-extern void lustre_swab_mdt_epoch (struct mdt_body *b);
+extern void lustre_swab_mdt_epoch (struct mdt_epoch *b);
 
 struct lustre_md {
         struct mdt_body         *body;
index d7125c8..7b95d45 100644 (file)
@@ -2310,7 +2310,7 @@ static int capa_is_sane(const struct lu_context *ctx,
 {
         struct obd_capa *c;
         struct osd_thread_info *oti = lu_context_key_get(ctx, &osd_key);
-        int i, rc;
+        int i, rc = 0;
         ENTRY;
 
         c = capa_lookup(capa);
index 00d3cbf..e73fbc9 100644 (file)
@@ -80,7 +80,7 @@ static int ost_destroy(struct obd_export *exp, struct ptlrpc_request *req,
                        struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        struct lustre_capa *capa;
+        struct lustre_capa *capa = NULL;
         int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         ENTRY;
 
index 33829dd..9177ae1 100644 (file)
@@ -1508,6 +1508,7 @@ void lustre_swab_connect(struct obd_connect_data *ocd)
         __swab64s(&ocd->ocd_ibits_known);
         __swab32s(&ocd->ocd_nllu);
         __swab32s(&ocd->ocd_nllg);
+        __swab32s(&ocd->ocd_group);
         CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
         CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
         CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
@@ -1661,7 +1662,7 @@ void lustre_swab_mdt_body (struct mdt_body *b)
         __swab32s (&b->max_cookiesize);
 }
 
-void lustre_swab_mdt_epoch (struct mdt_body *b)
+void lustre_swab_mdt_epoch (struct mdt_epoch *b)
 {
         /* handle is opaque */
          __swab64s (&b->ioepoch);