Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Tue, 26 Jul 2005 07:48:15 +0000 (07:48 +0000)
committeradilger <adilger>
Tue, 26 Jul 2005 07:48:15 +0000 (07:48 +0000)
Quiet liblustre compiler warnings on x64_64.

lustre/liblustre/file.c
lustre/liblustre/llite_lib.h
lustre/liblustre/namei.c
lustre/liblustre/rw.c
lustre/liblustre/super.c

index 31627d3..a5c403d 100644 (file)
@@ -314,12 +314,13 @@ int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode)
                 //ll_queue_done_writing(inode);
                 rc = 0;
         } else if (rc) {
-                CERROR("inode %llu close failed: rc %d\n", st->st_ino, rc);
+                CERROR("inode %llu close failed: rc %d\n",
+                       (long long)st->st_ino, rc);
         } else {
                 rc = llu_objects_destroy(req, inode);
                 if (rc)
                         CERROR("inode %llu ll_objects destroy: rc = %d\n",
-                                st->st_ino, rc);
+                               (long long)st->st_ino, rc);
         }
 
         mdc_clear_open_replay_data(och);
@@ -339,8 +340,8 @@ int llu_file_release(struct inode *inode)
         int rc = 0, rc2;
 
         ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu\n", llu_i2stat(inode)->st_ino,
-               lli->lli_st_generation);
+        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu\n",
+               (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation);
 
         if (llu_is_root_inode(inode))
                 RETURN(0);
@@ -401,12 +402,13 @@ static void llu_truncate(struct inode *inode)
         struct obdo oa = {0};
         int rc;
         ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p) to %llu\n", st->st_ino,
-               lli->lli_st_generation, inode, st->st_size);
+        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p) to %llu\n",
+               (long long)st->st_ino, lli->lli_st_generation, inode,
+               (long long)st->st_size);
 
         if (!lsm) {
                 CDEBUG(D_INODE, "truncate on inode %llu with no objects\n",
-                       st->st_ino);
+                       (long long)st->st_ino);
                 EXIT;
                 return;
         }
@@ -419,13 +421,14 @@ static void llu_truncate(struct inode *inode)
         obd_adjust_kms(llu_i2obdexp(inode), lsm, st->st_size, 1);
 
         CDEBUG(D_INFO, "calling punch for "LPX64" (all bytes after %Lu)\n",
-               oa.o_id, st->st_size);
+               oa.o_id, (long long)st->st_size);
 
         /* truncate == punch from new size to absolute end of file */
         rc = obd_punch(llu_i2obdexp(inode), &oa, lsm, st->st_size,
                        OBD_OBJECT_EOF, NULL);
         if (rc)
-                CERROR("obd_truncate fails (%d) ino %llu\n", rc, st->st_ino);
+                CERROR("obd_truncate fails (%d) ino %llu\n",
+                       rc, (long long)st->st_ino);
         else
                 obdo_to_inode(inode, &oa, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
                                           OBD_MD_FLATIME | OBD_MD_FLMTIME |
index e254ea0..0f96e8d 100644 (file)
@@ -128,7 +128,7 @@ do {                                                                           \
         LASSERT(it);                                                           \
         llu_i2info(inode)->lli_it = NULL;                                      \
         CDEBUG(D_DENTRY, "dettach intent %p from inode %p(ino %llu)\n",        \
-                        it, inode, llu_i2stat(inode)->st_ino);                 \
+                        it, inode, (long long)llu_i2stat(inode)->st_ino);      \
 } while(0)
 
 /* interpet return codes from intent lookup */
index 9e69a9e..772ef7f 100644 (file)
@@ -110,7 +110,7 @@ void llu_lookup_finish_locks(struct lookup_intent *it, struct pnode *pnode)
         if (it && pnode->p_base->pb_ino != NULL) {
                 struct inode *inode = pnode->p_base->pb_ino;
                 CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%llu/%lu)\n",
-                       inode, llu_i2stat(inode)->st_ino,
+                       inode, (long long)llu_i2stat(inode)->st_ino,
                        llu_i2info(inode)->lli_st_generation);
                 mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
         }
@@ -159,13 +159,13 @@ int llu_mdc_blocking_ast(struct ldlm_lock *lock,
                 clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags);
 
                 if (lock->l_resource->lr_name.name[0] != st->st_ino ||
-                    lock->l_resource->lr_name.name[1] != lli->lli_st_generation) {
+                    lock->l_resource->lr_name.name[1] !=lli->lli_st_generation){
                         LDLM_ERROR(lock, "data mismatch with ino %llu/%lu",
-                                   st->st_ino, lli->lli_st_generation);
+                                  (long long)st->st_ino,lli->lli_st_generation);
                 }
                 if (S_ISDIR(st->st_mode)) {
                         CDEBUG(D_INODE, "invalidating inode %llu\n",
-                               st->st_ino);
+                               (long long)st->st_ino);
 
                         llu_invalidate_inode_pages(inode);
                 }
@@ -244,7 +244,7 @@ int llu_pb_revalidate(struct pnode *pnode, int flags, struct lookup_intent *it)
                 if (lli->lli_it) {
                         CDEBUG(D_INODE, "inode %llu still have intent "
                                         "%p(opc 0x%x), release it\n",
-                                        st->st_ino, lli->lli_it,
+                                        (long long) st->st_ino, lli->lli_it,
                                         lli->lli_it->it_op);
                         ll_intent_release(lli->lli_it);
                         OBD_FREE(lli->lli_it, sizeof(*lli->lli_it));
index d56578a..4e38460 100644 (file)
@@ -244,7 +244,7 @@ int llu_glimpse_size(struct inode *inode)
         st->st_mtime = lov_merge_mtime(lli->lli_smd, st->st_mtime);
 
         CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %llu\n",
-               (long long)st->st_size, st->st_blocks);
+               (long long)st->st_size, (long long)st->st_blocks);
 
         obd_cancel(sbi->ll_osc_exp, lli->lli_smd, LCK_PR, &lockh);
 
index 3dcafa3..212d45d 100644 (file)
@@ -140,7 +140,7 @@ void llu_update_inode(struct inode *inode, struct mds_body *body,
                 } else {
                         if (memcmp(lli->lli_smd, lsm, sizeof(*lsm))) {
                                 CERROR("lsm mismatch for inode %lld\n",
-                                       st->st_ino);
+                                       (long long)st->st_ino);
                                 LBUG();
                         }
                 }
@@ -441,7 +441,8 @@ static int llu_inode_revalidate(struct inode *inode)
                 ll_inode2fid(&fid, inode);
                 rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req);
                 if (rc) {
-                        CERROR("failure %d inode %llu\n", rc, llu_i2stat(inode)->st_ino);
+                        CERROR("failure %d inode %llu\n", rc,
+                               (long long)llu_i2stat(inode)->st_ino);
                         RETURN(-abs(rc));
                 }
                 rc = mdc_req2lustre_md(req, 0, sbi->ll_osc_exp, &md);
@@ -534,7 +535,8 @@ void llu_clear_inode(struct inode *inode)
         ENTRY;
 
         CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p)\n",
-               llu_i2stat(inode)->st_ino, lli->lli_st_generation, inode);
+               (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation,
+               inode);
 
         ll_inode2fid(&fid, inode);
         clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(lli->lli_flags));
@@ -626,12 +628,13 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
         int rc = 0;
         ENTRY;
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", st->st_ino);
+        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", (long long)st->st_ino);
 
         if (ia_valid & ATTR_SIZE) {
                 if (attr->ia_size > ll_file_maxbytes(inode)) {
                         CDEBUG(D_INODE, "file too large %llu > "LPU64"\n",
-                               attr->ia_size, ll_file_maxbytes(inode));
+                               (long long)attr->ia_size,
+                               ll_file_maxbytes(inode));
                         RETURN(-EFBIG);
                 }
 
@@ -752,7 +755,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                 struct obdo oa;
 
                 CDEBUG(D_INODE, "set mtime on OST inode %llu to %lu\n",
-                       st->st_ino, LTIME_S(attr->ia_mtime));
+                       (long long)st->st_ino, LTIME_S(attr->ia_mtime));
                 oa.o_id = lsm->lsm_object_id;
                 oa.o_valid = OBD_MD_FLID;
                 obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
@@ -862,7 +865,7 @@ static int llu_readlink_internal(struct inode *inode,
         rc = mdc_getattr(sbi->ll_mdc_exp, &fid,
                          OBD_MD_LINKNAME, symlen, request);
         if (rc) {
-                CERROR("inode %llu: rc = %d\n", st->st_ino, rc);
+                CERROR("inode %llu: rc = %d\n", (long long)st->st_ino, rc);
                 RETURN(rc);
         }
 
@@ -874,21 +877,21 @@ static int llu_readlink_internal(struct inode *inode,
                 CERROR ("OBD_MD_LINKNAME not set on reply\n");
                 GOTO (failed, rc = -EPROTO);
         }
-        
-        LASSERT (symlen != 0);
+
+        LASSERT(symlen != 0);
         if (body->eadatasize != symlen) {
-                CERROR ("inode %llu: symlink length %d not expected %d\n",
-                        st->st_ino, body->eadatasize - 1, symlen - 1);
-                GOTO (failed, rc = -EPROTO);
+                CERROR("inode %llu: symlink length %d not expected %d\n",
+                       (long long)st->st_ino, body->eadatasize - 1, symlen - 1);
+                GOTO(failed, rc = -EPROTO);
         }
 
         *symname = lustre_msg_buf ((*request)->rq_repmsg, 1, symlen);
         if (*symname == NULL ||
-            strnlen (*symname, symlen) != symlen - 1) {
+            strnlen(*symname, symlen) != symlen - 1) {
                 /* not full/NULL terminated */
-                CERROR ("inode %llu: symlink not NULL terminated string"
-                        "of length %d\n", st->st_ino, symlen - 1);
-                GOTO (failed, rc = -EPROTO);
+                CERROR("inode %llu: symlink not NULL terminated string"
+                       "of length %d\n", (long long)st->st_ino, symlen - 1);
+                GOTO(failed, rc = -EPROTO);
         }
 
         OBD_ALLOC(lli->lli_symlink_name, symlen);
@@ -937,7 +940,7 @@ static int llu_iop_mknod_raw(struct pnode *pno,
 
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu\n",
                (int)pno->p_base->pb_name.len, pno->p_base->pb_name.name,
-               llu_i2stat(dir)->st_ino);
+               (long long)llu_i2stat(dir)->st_ino);
 
         if (llu_i2stat(dir)->st_nlink >= EXT2_LINK_MAX)
                 RETURN(err);
@@ -1170,8 +1173,9 @@ static int llu_iop_mkdir_raw(struct pnode *pno, mode_t mode)
         struct mdc_op_data op_data;
         int err = -EMLINK;
         ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n",
-               len, name, st->st_ino, llu_i2info(dir)->lli_st_generation, dir);
+
+        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name,
+               (long long)st->st_ino, llu_i2info(dir)->lli_st_generation, dir);
 
         if (st->st_nlink >= EXT2_LINK_MAX)
                 RETURN(err);
@@ -1194,7 +1198,8 @@ static int llu_iop_rmdir_raw(struct pnode *pno)
         int rc;
         ENTRY;
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name,
-               llu_i2stat(dir)->st_ino, llu_i2info(dir)->lli_st_generation,dir);
+               (long long)llu_i2stat(dir)->st_ino,
+               llu_i2info(dir)->lli_st_generation, dir);
 
         llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, S_IFDIR);
         rc = mdc_unlink(llu_i2sbi(dir)->ll_mdc_exp, &op_data, &request);