Whamcloud - gitweb
Fix some simple errors and warnings
authorbraam <braam>
Thu, 25 Jul 2002 21:35:24 +0000 (21:35 +0000)
committerbraam <braam>
Thu, 25 Jul 2002 21:35:24 +0000 (21:35 +0000)
 -  LOV's mount again.
 -  set some unitialized variables to 0

12 files changed:
lustre/archdep.m4
lustre/llite/namei.c
lustre/lov/lov_obd.c
lustre/mds/handler.c
lustre/mds/mds_lov.c
lustre/obdclass/class_obd.c
lustre/obdfilter/filter.c
lustre/utils/Makefile.am
lustre/utils/device.c
lustre/utils/lconf
lustre/utils/lctl.c
lustre/utils/obdctl.c

index ab02cd9..9f7198d 100644 (file)
@@ -15,7 +15,7 @@ AC_MSG_CHECKING(setting make flags system architecture: )
 case ${host_cpu} in
        um )
        AC_MSG_RESULT($host_cpu)
-       KCFLAGS='-g -Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common '
+       KCFLAGS='-g  -Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common '
        KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE  -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include '
         MOD_LINK=elf_i386
 ;;
index 640abf6..1ed4375 100644 (file)
@@ -138,7 +138,7 @@ static struct dentry *ll_lookup2(struct inode * dir, struct dentry *dentry,
         struct lustre_handle lockh;
         int err, type, offset;
         struct lookup_intent lookup_it = { IT_LOOKUP };
-        obd_id ino;
+        obd_id ino = 0;
 
         ENTRY;
 
@@ -380,7 +380,7 @@ static int ll_create(struct inode * dir, struct dentry * dentry, int mode)
         }
 
         if (dentry->d_it->it_disposition) {
-                struct ll_inode_info *ii = ll_i2info(inode);
+                ii = ll_i2info(inode);
                 ii->lli_flags |= OBD_FL_CREATEONOPEN;
                 memcpy(&ii->lli_intent_lock_handle,
                        dentry->d_it->it_lock_handle,
index b863425..75b225d 100644 (file)
@@ -192,7 +192,7 @@ static inline int lov_stripe_md_size(struct obd_device *obd)
 
 static int lov_create(struct lustre_handle *conn, struct obdo *oa, struct lov_stripe_md **ea)
 {
-        int rc, i;
+        int rc = 0, i;
         struct obdo tmp;
         struct obd_export *export = class_conn2export(conn);
         struct lov_obd *lov;
@@ -253,7 +253,7 @@ static int lov_create(struct lustre_handle *conn, struct obdo *oa, struct lov_st
 static int lov_destroy(struct lustre_handle *conn, struct obdo *oa, 
 struct lov_stripe_md *ea)
 {
-        int rc, i;
+        int rc = 0, i;
         struct obdo tmp;
         struct obd_export *export = class_conn2export(conn);
         struct lov_obd *lov;
index 5e205ee..c09a618 100644 (file)
@@ -345,7 +345,7 @@ static int mds_getlovinfo(struct ptlrpc_request *req)
         rc = mds_get_lovtgts(req->rq_obd, tgt_count,
                              lustre_msg_buf(req->rq_repmsg, 1));
         if (rc) {
-                CERROR("get_lovtgts error %d", rc);
+                CERROR("get_lovtgts error %d\n", rc);
                 req->rq_status = rc;
                 RETURN(0);
         }
index 1be342a..54b2006 100644 (file)
@@ -112,7 +112,6 @@ int mds_get_lovtgts(struct obd_device *obd, int tgt_count, uuid_t *uuidarray)
         struct file *f;
         int rc;
         int rc2;
-        int count;
 
         push_ctxt(&saved, &mds->mds_ctxt);
         f = filp_open("LOVTGTS", O_RDONLY, 0644);
@@ -127,12 +126,13 @@ int mds_get_lovtgts(struct obd_device *obd, int tgt_count, uuid_t *uuidarray)
         if (rc2)
                 CERROR("Error closing LOVTGTS file: rc = %d\n", rc2);
 
-        if (rc != count * sizeof(uuid_t)) {
+        if (rc != tgt_count * sizeof(uuid_t)) {
                 CERROR("Error reading LOVTGTS file: rc = %d\n", rc);
                 if (rc >= 0)
                         rc = -EIO;
                 GOTO(out, rc);
-        }
+        } else 
+                rc = 0;
         EXIT;
 out:
         pop_ctxt(&saved);
index 73251d2..73eb518 100644 (file)
@@ -459,10 +459,10 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp,
         }
 
         case OBD_IOC_DESTROY: {
-                void *ea;
+                //void *ea;
                 obd_data2conn(&conn, data);
 
-                err = obd_destroy(&conn, &data->ioc_obdo1, ea);
+                err = obd_destroy(&conn, &data->ioc_obdo1, NULL);
                 if (err)
                         GOTO(out, err);
 
index f708884..95d0f9b 100644 (file)
@@ -717,7 +717,6 @@ static int filter_pgcache_brw(int cmd, struct lustre_handle *conn,
 {
         struct obd_run_ctxt      saved;
         struct super_block      *sb;
-        int                      onum;          /* index to oas */
         int                      pnum;          /* index to pages (bufs) */
         unsigned long            retval;
         int                      error;
@@ -741,9 +740,9 @@ static int filter_pgcache_brw(int cmd, struct lustre_handle *conn,
 
         /* count doubles as retval */
         for (pg = 0; pg < oa_bufs; pg++) {
-                CDEBUG(D_INODE, "OP %d obdo no/pno: (%d,%d) (%ld,%ld) "
+                CDEBUG(D_INODE, "OP %d obdo pgno: (%d) (%ld,%ld) "
                        "off count (%Ld,%Ld)\n",
-                       cmd, onum, pnum, file->f_dentry->d_inode->i_ino,
+                       cmd, pnum, file->f_dentry->d_inode->i_ino,
                        (unsigned long)offset[pnum] >> PAGE_CACHE_SHIFT,
                        (unsigned long long)offset[pnum],
                        (unsigned long long)count[pnum]);
index 3ec0fbc..96ad15a 100644 (file)
@@ -1,6 +1,6 @@
 DEFS=
 
-CFLAGS:=-g -I. -I/usr/include/libxml2 -I/usr/include/glib-1.2 -I$(PORTALS)/include \
+CFLAGS:=-g -O2 -I. -I/usr/include/libxml2 -I/usr/include/glib-1.2 -I$(PORTALS)/include \
 -I/usr/lib/glib/include -I$(srcdir)/../include -Wall
 KFLAGS:=
 CPPFLAGS =
index 0061425..d5e61ba 100644 (file)
@@ -506,7 +506,7 @@ int jt_dev_lov_config(int argc, char **argv)
 
         if (strlen(argv[1]) > sizeof(uuid_t) - 1) { 
                 fprintf(stderr, "lov_config: no %dB memory for uuid's\n", 
-                        size);
+                        strlen(argv[1]));
                 return -ENOMEM;
         }
             
@@ -666,7 +666,7 @@ int jt_dev_getattr(int argc, char **argv)
 
 int jt_dev_test_getattr(int argc, char **argv) 
 {
-        int rc;
+        int rc = 0;
         struct obd_ioctl_data data;
         struct timeval start, next_time;
         int i, count, next_count;
@@ -721,7 +721,7 @@ int jt_dev_test_getattr(int argc, char **argv)
 
 int jt_dev_test_brw(int argc, char **argv) 
 {
-        int rc;
+        int rc = 0;
         struct obd_ioctl_data data;
         struct timeval start, next_time;
         char *bulk, *b;
index 9a9a077..86dae59 100755 (executable)
@@ -375,7 +375,7 @@ def prepare_mdc(node):
 def prepare_mountpoint(node):
     name, uuid, oscuuid, mdcuuid, mtpt = getMTPTInfo(node)
     print 'MTPT:', name, uuid, oscuuid, mdcuuid, mtpt
-    cmd = "mount -t lustre_lite -o ost=%s,mds=%s none %s" % \
+    cmd = "echo mount -t lustre_lite -o ost=%s,mds=%s none %s" % \
           (oscuuid, mdcuuid, mtpt)
     run("mkdir", mtpt)
     run(cmd)
index 1f8772d..5b59cce 100644 (file)
@@ -270,7 +270,7 @@ int jt_opt_threads(int argc, char **argv)
         int threads, next_thread;
         int verbose;
         int i, j;
-        int rc;
+        int rc = 0;
 
         if (argc < 5) {
                 fprintf(stderr,
index 143f88e..f347c79 100644 (file)
@@ -1437,7 +1437,7 @@ static int jt_lov_config(int argc, char **argv)
 
         if (strlen(argv[1]) > sizeof(uuid_t) - 1) { 
                 fprintf(stderr, "lov_config: no %dB memory for uuid's\n", 
-                        size);
+                        strlen(argv[1]));
                 return -ENOMEM;
         }