Whamcloud - gitweb
- many gcc4 compilation fixes (warnings)
authoryury <yury>
Sun, 29 May 2005 16:17:17 +0000 (16:17 +0000)
committeryury <yury>
Sun, 29 May 2005 16:17:17 +0000 (16:17 +0000)
46 files changed:
lustre/cmobd/cm_obd.c
lustre/cmobd/cm_oss_reint.c
lustre/cmobd/cm_reint.c
lustre/include/linux/lustre_smfs.h
lustre/include/linux/lvfs.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/llite/dcache.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/lmv/lmv_obd.c
lustre/lov/lov_obd.c
lustre/lvfs/llog_lvfs.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/mds/mds_fs.c
lustre/mds/mds_lmv.c
lustre/mds/mds_lov.c
lustre/mds/mds_reint.c
lustre/obdclass/obd_config.c
lustre/obdclass/uuid.c
lustre/obdfilter/filter.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c
lustre/ptlrpc/client.c
lustre/ptlrpc/connection.c
lustre/ptlrpc/events.c
lustre/ptlrpc/import.c
lustre/ptlrpc/llog_server.c
lustre/ptlrpc/recover.c
lustre/sec/gss/gss_krb5_crypto.c
lustre/sec/gss/gss_krb5_mech.c
lustre/sec/gss/gss_krb5_seal.c
lustre/sec/gss/gss_krb5_unseal.c
lustre/sec/gss/gss_krb5_wrap.c
lustre/sec/gss/sec_gss.c
lustre/sec/gss/svcsec_gss.c
lustre/smfs/cache_space.c
lustre/smfs/fsfilt.c
lustre/smfs/kml.c
lustre/smfs/mds_kml.c
lustre/tests/mmap_sanity.c
lustre/utils/liblustreapi.c
lustre/utils/lsd_upcall.c

index d46d919..43fa1e3 100644 (file)
@@ -117,7 +117,8 @@ static int cmobd_setup(struct obd_device *obd, obd_count len, void *buf)
         struct cm_obd *cmobd = &obd->u.cm;
         struct lustre_cfg* lcfg = buf;
         struct lustre_id mid, lid;
         struct cm_obd *cmobd = &obd->u.cm;
         struct lustre_cfg* lcfg = buf;
         struct lustre_id mid, lid;
-        int valsize, rc;
+        __u32 valsize;
+        int rc;
         ENTRY;
 
         if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
         ENTRY;
 
         if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
index cb2fcb3..eff4777 100644 (file)
@@ -288,22 +288,24 @@ out_lock:
 static int cmobd_write_reint(struct obd_device *obd, void *rec)
 {
         struct cm_obd *cmobd = &obd->u.cm;
 static int cmobd_write_reint(struct obd_device *obd, void *rec)
 {
         struct cm_obd *cmobd = &obd->u.cm;
-        struct obd_device *cache = cmobd->cache_exp->exp_obd;
         struct obdo *oa = (struct obdo *)rec;
         struct ldlm_extent *extent = NULL; 
         struct obdo *oa = (struct obdo *)rec;
         struct ldlm_extent *extent = NULL; 
+        char *extents_buf = NULL;
+        struct obd_device *cache;
+        int rc = 0, ext_num = 0;
         unsigned long csb, ino;
         unsigned long csb, ino;
-        char   *extents_buf = NULL;
-        int    size = 0, rc = 0, ext_num = 0; 
+        __u32 size = 0;
         ENTRY;
 
         size = sizeof(csb);
         ENTRY;
 
         size = sizeof(csb);
-
         obd_get_info(cmobd->cache_exp, strlen("cache_sb") + 1,
                      "cache_sb", &size, &csb); 
  
         ino = *(int*)(&oa->o_inline[0]);
         obd_get_info(cmobd->cache_exp, strlen("cache_sb") + 1,
                      "cache_sb", &size, &csb); 
  
         ino = *(int*)(&oa->o_inline[0]);
-        rc = fsfilt_get_ino_write_extents(cache, (struct super_block *)csb, ino,
-                                          &extents_buf, &ext_num);
+        
+        cache = cmobd->cache_exp->exp_obd;
+        rc = fsfilt_get_ino_write_extents(cache, (struct super_block *)csb,
+                                          ino, &extents_buf, &ext_num);
         if (rc)
                 GOTO(out, rc);   
         extent = (struct ldlm_extent *)extents_buf;
         if (rc)
                 GOTO(out, rc);   
         extent = (struct ldlm_extent *)extents_buf;
index 230f6f1..a06c533 100644 (file)
@@ -98,7 +98,8 @@ int cmobd_reintegrate(struct obd_device *obd)
         struct cm_obd *cmobd = &obd->u.cm;
         struct llog_ctxt *ctxt = NULL;
         struct llog_handle *llh;
         struct cm_obd *cmobd = &obd->u.cm;
         struct llog_ctxt *ctxt = NULL;
         struct llog_handle *llh;
-        int val_size, rc = 0;
+        __u32 val_size;
+        int rc = 0;
         ENTRY;
 
         /* XXX just fetch the reintegration log context from
         ENTRY;
 
         /* XXX just fetch the reintegration log context from
index 1507af6..63cf931 100644 (file)
@@ -373,7 +373,7 @@ static inline void duplicate_sb(struct super_block *dst_sb,
 }
 
 static inline int smfs_get_dentry_name_index(struct dentry *dentry,
 }
 
 static inline int smfs_get_dentry_name_index(struct dentry *dentry,
-                                             struct qstr  *str,
+                                             struct qstr *str,
                                              int *index)
 {
         char *name = (char *)dentry->d_name.name;
                                              int *index)
 {
         char *name = (char *)dentry->d_name.name;
@@ -396,11 +396,9 @@ static inline int smfs_get_dentry_name_index(struct dentry *dentry,
         str->hash = end_name_hash(hash);
         OBD_ALLOC(str_name, len + 1);
         memcpy(str_name, dentry->d_name.name, len);
         str->hash = end_name_hash(hash);
         OBD_ALLOC(str_name, len + 1);
         memcpy(str_name, dentry->d_name.name, len);
-        str->len = len; 
-        str->name = str_name;
-        if (index && c == ':') {
+        qstr_assign(str, str_name, len);
+        if (index && c == ':')
                 *index = simple_strtoul(name, 0, 0);         
                 *index = simple_strtoul(name, 0, 0);         
-        }
         return 0;
 }
 
         return 0;
 }
 
index bdf94ff..8f2189b 100644 (file)
@@ -128,6 +128,19 @@ void *lock_dir(struct inode *dir, struct qstr *name);
 void unlock_dir(struct inode *dir, void *lock);
 #endif
 
 void unlock_dir(struct inode *dir, void *lock);
 #endif
 
+/*
+ * typeof here is to suppress gcc warnings (gcc4, maybe others too) about wrong
+ * type in assignment. As kernel type may be chnaged we doing it this way.
+ * --umka
+ */
+#define qstr_assign(qstr, n, l)                 \
+do {                                            \
+    typeof(l) _len = (l);                       \
+    typeof(n) _name = (n);                      \
+    (qstr)->name = (typeof((qstr)->name))_name; \
+    (qstr)->len = (typeof((qstr)->len))_len;    \
+} while (0)
+
 /* We need to hold the inode semaphore over the dcache lookup itself, or we run
  * the risk of entering the filesystem lookup path concurrently on SMP systems,
  * and instantiating two inodes for the same entry.  We still protect against
 /* We need to hold the inode semaphore over the dcache lookup itself, or we run
  * the risk of entering the filesystem lookup path concurrently on SMP systems,
  * and instantiating two inodes for the same entry.  We still protect against
@@ -136,11 +149,12 @@ static inline struct dentry *
 ll_lookup_one_len(const char *name, struct dentry *dparent, int namelen)
 {
         struct dentry *dchild;
 ll_lookup_one_len(const char *name, struct dentry *dparent, int namelen)
 {
         struct dentry *dchild;
+        
 #ifdef S_PDIROPS
         struct qstr qstr;
         void *lock;
 #ifdef S_PDIROPS
         struct qstr qstr;
         void *lock;
-        qstr.name = name;
-        qstr.len = namelen;
+
+        qstr_assign(&qstr, name, namelen);
         lock = lock_dir(dparent->d_inode, &qstr);
 #else
         down(&dparent->d_inode->i_sem);
         lock = lock_dir(dparent->d_inode, &qstr);
 #else
         down(&dparent->d_inode->i_sem);
index 38d9feb..d8028ea 100644 (file)
@@ -591,18 +591,18 @@ int target_handle_connect(struct ptlrpc_request *req)
         switch (sizeof(ptl_nid_t)) {
                 /* NB the casts only avoid compiler warnings */
         case 8:
         switch (sizeof(ptl_nid_t)) {
                 /* NB the casts only avoid compiler warnings */
         case 8:
-                snprintf(remote_uuid.uuid, sizeof remote_uuid,
+                snprintf((char *)remote_uuid.uuid, sizeof(remote_uuid),
                          "NET_"LPX64"_UUID", (__u64)req->rq_peer.peer_id.nid);
                 break;
         case 4:
                          "NET_"LPX64"_UUID", (__u64)req->rq_peer.peer_id.nid);
                 break;
         case 4:
-                snprintf(remote_uuid.uuid, sizeof remote_uuid,
+                snprintf((char *)remote_uuid.uuid, sizeof(remote_uuid),
                          "NET_%x_UUID", (__u32)req->rq_peer.peer_id.nid);
                 break;
         default:
                 LBUG();
         }
 
                          "NET_%x_UUID", (__u32)req->rq_peer.peer_id.nid);
                 break;
         default:
                 LBUG();
         }
 
-        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, sizeof conn);
+        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, sizeof(conn));
         if (tmp == NULL)
                 GOTO(out, rc = -EPROTO);
 
         if (tmp == NULL)
                 GOTO(out, rc = -EPROTO);
 
index 952112b..c47e514 100644 (file)
@@ -51,7 +51,8 @@ static int ldlm_refcount;
 
 static struct ldlm_state *ldlm_state;
 
 
 static struct ldlm_state *ldlm_state;
 
-inline unsigned long round_timeout(unsigned long timeout)
+static inline unsigned long
+round_timeout(unsigned long timeout)
 {
         return ((timeout / HZ) + 1) * HZ;
 }
 {
         return ((timeout / HZ) + 1) * HZ;
 }
@@ -697,11 +698,12 @@ existing_lock:
                 memcpy(&lock->l_req_extent, &lock->l_policy_data.l_extent,
                        sizeof(lock->l_req_extent));
 
                 memcpy(&lock->l_req_extent, &lock->l_policy_data.l_extent,
                        sizeof(lock->l_req_extent));
 
-        err = ldlm_lock_enqueue(obddev->obd_namespace, &lock, cookie, &flags);
+        err = ldlm_lock_enqueue(obddev->obd_namespace, &lock,
+                                cookie, (int *)&flags);
         if (err)
                 GOTO(out, err);
 
         if (err)
                 GOTO(out, err);
 
-        dlm_rep = lustre_msg_buf(req->rq_repmsg, 0, sizeof (*dlm_rep));
+        dlm_rep = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*dlm_rep));
         dlm_rep->lock_flags = flags;
 
         ldlm_lock2desc(lock, &dlm_rep->lock_desc);
         dlm_rep->lock_flags = flags;
 
         ldlm_lock2desc(lock, &dlm_rep->lock_desc);
@@ -796,7 +798,7 @@ int ldlm_handle_convert(struct ptlrpc_request *req)
                 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
 
                 res = ldlm_lock_convert(lock, dlm_req->lock_desc.l_req_mode,
                 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
 
                 res = ldlm_lock_convert(lock, dlm_req->lock_desc.l_req_mode,
-                                        &dlm_rep->lock_flags);
+                                        (int *)&dlm_rep->lock_flags);
                 if (res) {
                         l_lock(&lock->l_resource->lr_namespace->ns_lock);
                         if (ldlm_del_waiting_lock(lock))
                 if (res) {
                         l_lock(&lock->l_resource->lr_namespace->ns_lock);
                         if (ldlm_del_waiting_lock(lock))
index 0fa697d..1ed72f3 100644 (file)
@@ -530,7 +530,8 @@ int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, int *flags)
         if (req->rq_status)
                 GOTO(out, rc = req->rq_status);
 
         if (req->rq_status)
                 GOTO(out, rc = req->rq_status);
 
-        res = ldlm_lock_convert(lock, new_mode, &reply->lock_flags);
+        res = ldlm_lock_convert(lock, new_mode,
+                                (int *)&reply->lock_flags);
         if (res != NULL) {
                 ldlm_reprocess_all(res);
                 /* Go to sleep until the lock is granted. */
         if (res != NULL) {
                 ldlm_reprocess_all(res);
                 /* Go to sleep until the lock is granted. */
index 1b40b6e..4c9023e 100644 (file)
@@ -427,7 +427,7 @@ do_lock:
         ll_frob_intent(&it, &lookup_it);
         LASSERT(it != NULL);
 
         ll_frob_intent(&it, &lookup_it);
         LASSERT(it != NULL);
 
-        rc = md_intent_lock(exp, &pid, de->d_name.name, de->d_name.len,
+        rc = md_intent_lock(exp, &pid, (char *)de->d_name.name, de->d_name.len,
                             NULL, 0, &cid, it, flags, &req, ll_mdc_blocking_ast);
         /* If req is NULL, then md_intent_lock() only tried to do a lock match;
          * if all was well, it will return 1 if it found locks, 0 otherwise. */
                             NULL, 0, &cid, it, flags, &req, ll_mdc_blocking_ast);
         /* If req is NULL, then md_intent_lock() only tried to do a lock match;
          * if all was well, it will return 1 if it found locks, 0 otherwise. */
@@ -529,15 +529,13 @@ do_lookup:
                         LBUG();
         }
         
                         LBUG();
         }
         
-        // We did that already, right?  ll_inode2id(&pid, de->d_parent->d_inode);
-        rc = md_intent_lock(exp, &pid, de->d_name.name,
-                            de->d_name.len, NULL, 0, NULL,
-                            it, 0, &req, ll_mdc_blocking_ast);
+        rc = md_intent_lock(exp, &pid, (char *)de->d_name.name, de->d_name.len,
+                            NULL, 0, NULL, it, 0, &req, ll_mdc_blocking_ast);
         if (rc >= 0) {
                 struct mds_body *mds_body = lustre_msg_buf(req->rq_repmsg, 1,
                                                            sizeof(*mds_body));
 
         if (rc >= 0) {
                 struct mds_body *mds_body = lustre_msg_buf(req->rq_repmsg, 1,
                                                            sizeof(*mds_body));
 
-                /* See if we got same inode, if not - return error */
+                /* see if we got same inode, if not - return error */
                 if (id_equal_stc(&cid, &mds_body->id1))
                         goto revalidate_finish;
         }
                 if (id_equal_stc(&cid, &mds_body->id1))
                         goto revalidate_finish;
         }
index 3be6c48..e2f5453 100644 (file)
@@ -235,8 +235,8 @@ static int ll_intent_file_open(struct file *file, void *lmm,
                                int lmmsize, struct lookup_intent *itp)
 {
         struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode);
                                int lmmsize, struct lookup_intent *itp)
 {
         struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode);
+        const char *name = (char *)file->f_dentry->d_name.name;
         struct dentry *parent = file->f_dentry->d_parent;
         struct dentry *parent = file->f_dentry->d_parent;
-        const char *name = file->f_dentry->d_name.name;
         const int len = file->f_dentry->d_name.len;
         struct lustre_handle lockh;
         struct mdc_op_data *op_data;
         const int len = file->f_dentry->d_name.len;
         struct lustre_handle lockh;
         struct mdc_op_data *op_data;
index f0190ac..465ff67 100644 (file)
@@ -115,7 +115,8 @@ void lustre_free_sbi(struct super_block *sb)
 
 int lustre_init_dt_desc(struct ll_sb_info *sbi)
 {
 
 int lustre_init_dt_desc(struct ll_sb_info *sbi)
 {
-        int valsize, rc;
+        __u32 valsize;
+        int rc = 0;
         ENTRY;
         
         valsize = sizeof(sbi->ll_dt_desc);
         ENTRY;
         
         valsize = sizeof(sbi->ll_dt_desc);
@@ -212,8 +213,8 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov,
         sb->s_blocksize_bits = log2(osfs.os_bsize);
         sb->s_maxbytes = PAGE_CACHE_MAXBYTES;
        
         sb->s_blocksize_bits = log2(osfs.os_bsize);
         sb->s_maxbytes = PAGE_CACHE_MAXBYTES;
        
-        devno = get_uuid2int(sbi->ll_md_exp->exp_obd->obd_uuid.uuid, 
-                             strlen(sbi->ll_md_exp->exp_obd->obd_uuid.uuid));
+        devno = get_uuid2int((char *)sbi->ll_md_exp->exp_obd->obd_uuid.uuid, 
+                             strlen((char *)sbi->ll_md_exp->exp_obd->obd_uuid.uuid));
 
         sb->s_dev = devno;
 
 
         sb->s_dev = devno;
 
@@ -575,7 +576,7 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
 
         lustre_cfg_bufs_reset(&bufs, name);
         lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MDC_NAME);
 
         lustre_cfg_bufs_reset(&bufs, name);
         lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MDC_NAME);
-        lustre_cfg_bufs_set_string(&bufs, 2, lmv_uuid.uuid);
+        lustre_cfg_bufs_set_string(&bufs, 2, (char *)lmv_uuid.uuid);
 
         lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
         err = class_process_config(lcfg);
 
         lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
         err = class_process_config(lcfg);
@@ -880,10 +881,10 @@ int ll_process_config_update(struct ll_sb_info *sbi, int clean)
 {
         struct obd_export *md_exp = sbi->ll_md_exp;
         struct lustre_mount_data *lmd = sbi->ll_lmd;
 {
         struct obd_export *md_exp = sbi->ll_md_exp;
         struct lustre_mount_data *lmd = sbi->ll_lmd;
-        struct llog_ctxt *ctxt;
-        struct config_llog_instance cfg;
         char *profile = lmd->lmd_profile, *name = NULL;
         char *profile = lmd->lmd_profile, *name = NULL;
+        struct config_llog_instance cfg;
         int rc, namelen =  0, version;
         int rc, namelen =  0, version;
+        struct llog_ctxt *ctxt;
         ENTRY;
 
         if (profile == NULL)
         ENTRY;
 
         if (profile == NULL)
@@ -932,7 +933,9 @@ int ll_process_config_update(struct ll_sb_info *sbi, int clean)
 
         if (rc == 0 && clean == 0) {
                 struct lov_desc desc;
 
         if (rc == 0 && clean == 0) {
                 struct lov_desc desc;
-                int rc, valsize;
+                __u32 valsize;
+                int rc = 0;
+                
                 valsize = sizeof(desc);
                 rc = obd_get_info(sbi->ll_dt_exp, strlen("lovdesc") + 1,
                                   "lovdesc", &valsize, &desc);
                 valsize = sizeof(desc);
                 rc = obd_get_info(sbi->ll_dt_exp, strlen("lovdesc") + 1,
                                   "lovdesc", &valsize, &desc);
index f9be77d..8639126 100644 (file)
@@ -381,9 +381,9 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
         icbd.icbd_parent = parent;
         ll_inode2id(&pid, parent);
 
         icbd.icbd_parent = parent;
         ll_inode2id(&pid, parent);
 
-        rc = md_intent_lock(ll_i2mdexp(parent), &pid,
-                            dentry->d_name.name, dentry->d_name.len, NULL, 0,
-                            NULL, it, flags, &req, ll_mdc_blocking_ast);
+        rc = md_intent_lock(ll_i2mdexp(parent), &pid, (char *)dentry->d_name.name,
+                            dentry->d_name.len, NULL, 0, NULL, it, flags, &req,
+                            ll_mdc_blocking_ast);
         if (rc < 0)
                 GOTO(out, retval = ERR_PTR(rc));
 
         if (rc < 0)
                 GOTO(out, retval = ERR_PTR(rc));
 
@@ -533,8 +533,8 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
                 RETURN(rc);
 
         mdc_store_inode_generation(md_exp, request, MDS_REQ_INTENT_REC_OFF, 1);
                 RETURN(rc);
 
         mdc_store_inode_generation(md_exp, request, MDS_REQ_INTENT_REC_OFF, 1);
-        inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len,
-                               NULL, 0, mode, 0, it);
+        inode = ll_create_node(dir, (char *)dentry->d_name.name,
+                               dentry->d_name.len, NULL, 0, mode, 0, it);
         if (IS_ERR(inode))
                 RETURN(PTR_ERR(inode));
 
         if (IS_ERR(inode))
                 RETURN(PTR_ERR(inode));
 
@@ -577,7 +577,8 @@ static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev)
         ENTRY;
 
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
         ENTRY;
 
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               nd->last.len, nd->last.name, dir->i_ino, dir->i_generation, dir);
+               nd->last.len, nd->last.name, dir->i_ino,
+               dir->i_generation, dir);
 
         mode &= ~current->fs->umask;
 
 
         mode &= ~current->fs->umask;
 
@@ -592,8 +593,10 @@ static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev)
                 OBD_ALLOC(op_data, sizeof(*op_data));
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
                 OBD_ALLOC(op_data, sizeof(*op_data));
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
-                ll_prepare_mdc_data(op_data, dir, NULL, nd->last.name, 
+                ll_prepare_mdc_data(op_data, dir, NULL,
+                                    (char *)nd->last.name, 
                                    nd->last.len, 0);
                                    nd->last.len, 0);
+                
                 err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
                 err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
@@ -638,8 +641,11 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild,
                 OBD_ALLOC(op_data, sizeof(*op_data));
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
                 OBD_ALLOC(op_data, sizeof(*op_data));
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
-                ll_prepare_mdc_data(op_data, dir, NULL, dchild->d_name.name, 
+
+                ll_prepare_mdc_data(op_data, dir, NULL,
+                                    (char *)dchild->d_name.name, 
                                    dchild->d_name.len, 0);
                                    dchild->d_name.len, 0);
+                
                 err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
                 err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
@@ -669,10 +675,10 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild,
 
 static int ll_symlink_raw(struct nameidata *nd, const char *tgt)
 {
 
 static int ll_symlink_raw(struct nameidata *nd, const char *tgt)
 {
+        const char *name = (char *)nd->last.name;
         struct inode *dir = nd->dentry->d_inode;
         struct ptlrpc_request *request = NULL;
         struct ll_sb_info *sbi = ll_i2sbi(dir);
         struct inode *dir = nd->dentry->d_inode;
         struct ptlrpc_request *request = NULL;
         struct ll_sb_info *sbi = ll_i2sbi(dir);
-        const char *name = nd->last.name;
         struct mdc_op_data *op_data;
         int len = nd->last.len;
         int err = -EMLINK;
         struct mdc_op_data *op_data;
         int len = nd->last.len;
         int err = -EMLINK;
@@ -706,9 +712,9 @@ static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
         struct inode *src = srcnd->dentry->d_inode;
         struct inode *dir = tgtnd->dentry->d_inode;
         struct ptlrpc_request *request = NULL;
         struct inode *src = srcnd->dentry->d_inode;
         struct inode *dir = tgtnd->dentry->d_inode;
         struct ptlrpc_request *request = NULL;
+        struct ll_sb_info *sbi = ll_i2sbi(dir);
         struct mdc_op_data *op_data;
         int err;
         struct mdc_op_data *op_data;
         int err;
-        struct ll_sb_info *sbi = ll_i2sbi(dir);
         ENTRY;
 
         CDEBUG(D_VFSTRACE,
         ENTRY;
 
         CDEBUG(D_VFSTRACE,
@@ -719,8 +725,11 @@ static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
-        ll_prepare_mdc_data(op_data, src, dir, tgtnd->last.name, 
+
+        ll_prepare_mdc_data(op_data, src, dir,
+                            (char *)tgtnd->last.name, 
                             tgtnd->last.len, 0);
                             tgtnd->last.len, 0);
+        
         err = md_link(sbi->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (err == 0)
         err = md_link(sbi->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (err == 0)
@@ -745,8 +754,11 @@ static int ll_mkdir_raw(struct nameidata *nd, int mode)
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
-        ll_prepare_mdc_data(op_data, dir, NULL, nd->last.name, 
+
+        ll_prepare_mdc_data(op_data, dir, NULL,
+                            (char *)nd->last.name, 
                             nd->last.len, 0);
                             nd->last.len, 0);
+        
         err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                         current->fsuid, current->fsgid, 0, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                         current->fsuid, current->fsgid, 0, &request);
         OBD_FREE(op_data, sizeof(*op_data));
@@ -765,13 +777,17 @@ static int ll_rmdir_raw(struct nameidata *nd)
 
         ENTRY;
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
 
         ENTRY;
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               nd->last.len, nd->last.name, dir->i_ino, dir->i_generation, dir);
+               nd->last.len, nd->last.name, dir->i_ino,
+               dir->i_generation, dir);
 
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
 
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
-        ll_prepare_mdc_data(op_data, dir, NULL, nd->last.name, 
+
+        ll_prepare_mdc_data(op_data, dir, NULL,
+                            (char *)nd->last.name, 
                             nd->last.len, S_IFDIR);
                             nd->last.len, S_IFDIR);
+        
         rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc == 0)
         rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc == 0)
@@ -788,12 +804,14 @@ static int ll_unlink_raw(struct nameidata *nd)
         int rc;
         ENTRY;
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
         int rc;
         ENTRY;
         CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               nd->last.len, nd->last.name, dir->i_ino, dir->i_generation, dir);
+               nd->last.len, nd->last.name, dir->i_ino,
+               dir->i_generation, dir);
 
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
 
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 RETURN(-ENOMEM);
-        ll_prepare_mdc_data(op_data, dir, NULL, nd->last.name, nd->last.len, 0);
+        ll_prepare_mdc_data(op_data, dir, NULL,
+                            (char *)nd->last.name, nd->last.len, 0);
         rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc)
         rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc)
@@ -827,9 +845,9 @@ static int ll_rename_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, src, tgt, NULL, 0, 0);
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, src, tgt, NULL, 0, 0);
-        err = md_rename(sbi->ll_md_exp, op_data, srcnd->last.name, 
-                        srcnd->last.len, tgtnd->last.name, tgtnd->last.len, 
-                        &request);
+        err = md_rename(sbi->ll_md_exp, op_data, (char *)srcnd->last.name, 
+                        srcnd->last.len, (char *)tgtnd->last.name,
+                        tgtnd->last.len, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (!err) {
                 ll_update_times(request, 0, src);
         OBD_FREE(op_data, sizeof(*op_data));
         if (!err) {
                 ll_update_times(request, 0, src);
index 1ae1660..3f41cee 100644 (file)
@@ -96,7 +96,7 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid,
                 CDEBUG(D_INFO, "lmv idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
 
                 CDEBUG(D_INFO, "lmv idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
 
-                if (strncmp(uuid->uuid, tgt->uuid.uuid, sizeof uuid->uuid) == 0)
+                if (!strncmp((char *)uuid->uuid, (char *)tgt->uuid.uuid, sizeof(uuid->uuid)))
                         break;
         }
 
                         break;
         }
 
index 1843c3a..8b7a564 100644 (file)
@@ -337,7 +337,7 @@ static int lov_set_osc_active(struct lov_obd *lov, struct obd_uuid *uuid,
 
                 CDEBUG(D_INFO, "lov idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
 
                 CDEBUG(D_INFO, "lov idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
-                if (strncmp(uuid->uuid, tgt->uuid.uuid, sizeof uuid->uuid) == 0)
+                if (!strncmp((char *)uuid->uuid, (char *)tgt->uuid.uuid, sizeof(uuid->uuid)))
                         break;
         }
 
                         break;
         }
 
@@ -581,7 +581,7 @@ lov_del_obd(struct obd_device *obd, struct obd_uuid *uuidp, int index, int gen)
                 RETURN(-EINVAL);
         }
 
                 RETURN(-EINVAL);
         }
 
-        if (strncmp(uuidp->uuid, tgt->uuid.uuid, sizeof uuidp->uuid) != 0) {
+        if (strncmp((char *)uuidp->uuid, (char *)tgt->uuid.uuid, sizeof(uuidp->uuid))) {
                 CERROR("LOV target UUID %s at index %d doesn't match %s.\n",
                        tgt->uuid.uuid, index, uuidp->uuid);
                 RETURN(-EINVAL);
                 CERROR("LOV target UUID %s at index %d doesn't match %s.\n",
                        tgt->uuid.uuid, index, uuidp->uuid);
                 RETURN(-EINVAL);
@@ -1932,7 +1932,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 tgtdesc = lov->tgts;
                 /* the uuid will be empty for deleted OSTs */
                 for (i = 0; i < count; i++, uuidp++, genp++, tgtdesc++) {
                 tgtdesc = lov->tgts;
                 /* the uuid will be empty for deleted OSTs */
                 for (i = 0; i < count; i++, uuidp++, genp++, tgtdesc++) {
-                        obd_str2uuid(uuidp, tgtdesc->uuid.uuid);
+                        obd_str2uuid(uuidp, (char *)tgtdesc->uuid.uuid);
                         *genp = tgtdesc->ltd_gen;
                 }
 
                         *genp = tgtdesc->ltd_gen;
                 }
 
@@ -2046,8 +2046,10 @@ static int lov_get_info(struct obd_export *exp, __u32 keylen,
                                                 data->stripe_number);
                 RETURN(0);
         } else if (keylen >= strlen("last_id") && strcmp(key, "last_id") == 0) {
                                                 data->stripe_number);
                 RETURN(0);
         } else if (keylen >= strlen("last_id") && strcmp(key, "last_id") == 0) {
+                __u32 size = sizeof(obd_id);
                 obd_id *ids = val;
                 obd_id *ids = val;
-                int rc, size = sizeof(obd_id);
+                int rc = 0;
+
                 for (i = 0; i < lov->desc.ld_tgt_count; i++) {
                         if (!lov->tgts[i].active)
                                 continue;
                 for (i = 0; i < lov->desc.ld_tgt_count; i++) {
                         if (!lov->tgts[i].active)
                                 continue;
index b64ef0d..3a9dd92 100644 (file)
@@ -887,7 +887,7 @@ static int llog_lvfs_destroy(struct llog_handle *loghandle)
         fdentry = loghandle->lgh_file->f_dentry;
         parent_inode = fdentry->d_parent->d_inode;
         
         fdentry = loghandle->lgh_file->f_dentry;
         parent_inode = fdentry->d_parent->d_inode;
         
-        if (!strcmp(fdentry->d_parent->d_name.name, "LOGS")) {
+        if (!strcmp((char *)fdentry->d_parent->d_name.name, "LOGS")) {
                 LASSERT(parent_inode == ctxt->loc_logs_dir->d_inode);
                 
                 id_len = ll_id2str(id_name, fdentry->d_inode->i_ino,
                 LASSERT(parent_inode == ctxt->loc_logs_dir->d_inode);
                 
                 id_len = ll_id2str(id_name, fdentry->d_inode->i_ino,
@@ -933,7 +933,7 @@ out_err:
                 GOTO(out, rc);
         }
         if (ctxt->loc_alone) {
                 GOTO(out, rc);
         }
         if (ctxt->loc_alone) {
-                if (!strcmp(fdentry->d_parent->d_name.name, "OBJECTS")) {
+                if (!strcmp((char *)fdentry->d_parent->d_name.name, "OBJECTS")) {
                         LASSERT(parent_inode == ctxt->loc_objects_dir->d_inode);
                         
                         dget(fdentry);
                         LASSERT(parent_inode == ctxt->loc_objects_dir->d_inode);
                         
                         dget(fdentry);
index 023951c..6a5100b 100644 (file)
@@ -1258,11 +1258,11 @@ static int mdc_get_info(struct obd_export *exp, obd_count keylen,
                 RETURN(-EPROTO);
                 
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OBD_VERSION,
                 RETURN(-EPROTO);
                 
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OBD_VERSION,
-                              OST_GET_INFO, 1, &keylen, bufs);
+                              OST_GET_INFO, 1, (int *)&keylen, bufs);
         if (req == NULL)
                 RETURN(-ENOMEM);
 
         if (req == NULL)
                 RETURN(-ENOMEM);
 
-        req->rq_replen = lustre_msg_size(1, valsize);
+        req->rq_replen = lustre_msg_size(1, (int *)valsize);
         rc = ptlrpc_queue_wait(req);
         if (rc)
                 GOTO(out_req, rc);
         rc = ptlrpc_queue_wait(req);
         if (rc)
                 GOTO(out_req, rc);
index ff79c7d..db9f070 100644 (file)
@@ -272,7 +272,7 @@ struct dentry *mds_id2locked_dentry(struct obd_device *obd, struct lustre_id *id
                 }
                 flags = 0;
 
                 }
                 flags = 0;
 
-                res_id.name[2] = full_name_hash(name, namelen);
+                res_id.name[2] = full_name_hash((unsigned char *)name, namelen);
 
                 CDEBUG(D_INFO, "take lock on "DLID4":"LPX64"\n",
                        OLID4(id), res_id.name[2]);
 
                 CDEBUG(D_INFO, "take lock on "DLID4":"LPX64"\n",
                        OLID4(id), res_id.name[2]);
@@ -2370,9 +2370,9 @@ static int mdt_get_info(struct ptlrpc_request *req)
 
         if (keylen >= strlen("rootid") && !strcmp(key, "rootid")) {
                 struct lustre_id *reply;
 
         if (keylen >= strlen("rootid") && !strcmp(key, "rootid")) {
                 struct lustre_id *reply;
-                int size = sizeof(*reply);
+                __u32 size = sizeof(*reply);
                 
                 
-                rc = lustre_pack_reply(req, 1, &size, NULL);
+                rc = lustre_pack_reply(req, 1, (int *)&size, NULL);
                 if (rc)
                         RETURN(rc);
 
                 if (rc)
                         RETURN(rc);
 
@@ -2380,9 +2380,9 @@ static int mdt_get_info(struct ptlrpc_request *req)
                 rc = obd_get_info(exp, keylen, key, &size, reply);
         } else {
                 obd_id *reply;
                 rc = obd_get_info(exp, keylen, key, &size, reply);
         } else {
                 obd_id *reply;
-                int size = sizeof(*reply);
+                __u32 size = sizeof(*reply);
                 
                 
-                rc = lustre_pack_reply(req, 1, &size, NULL);
+                rc = lustre_pack_reply(req, 1, (int *)&size, NULL);
                 if (rc)
                         RETURN(rc);
 
                 if (rc)
                         RETURN(rc);
 
index 0900cd8..0785828 100644 (file)
@@ -67,7 +67,7 @@ int mds_client_add(struct obd_device *obd, struct mds_obd *mds,
         LASSERT(bitmap != NULL);
 
         /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
         LASSERT(bitmap != NULL);
 
         /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
+        if (!strcmp((char *)med->med_mcd->mcd_uuid, (char *)obd->obd_uuid.uuid))
                 RETURN(0);
 
         /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
                 RETURN(0);
 
         /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
@@ -134,7 +134,7 @@ int mds_client_free(struct obd_export *exp, int clear_client)
                 RETURN(0);
 
         /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
                 RETURN(0);
 
         /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
+        if (!strcmp((char *)med->med_mcd->mcd_uuid, (char *)obd->obd_uuid.uuid))
                 GOTO(free_and_out, 0);
 
         CDEBUG(D_INFO, "freeing client at idx %u (%lld)with UUID '%s'\n",
                 GOTO(free_and_out, 0);
 
         CDEBUG(D_INFO, "freeing client at idx %u (%lld)with UUID '%s'\n",
@@ -278,7 +278,7 @@ static int mds_read_last_rcvd(struct obd_device *obd, struct file *file)
                                file->f_dentry->d_name.name, rc);
                         GOTO(err_msd, rc);
                 }
                                file->f_dentry->d_name.name, rc);
                         GOTO(err_msd, rc);
                 }
-                if (strcmp(msd->msd_uuid, obd->obd_uuid.uuid) != 0) {
+                if (strcmp((char *)msd->msd_uuid, (char *)obd->obd_uuid.uuid)) {
                         CERROR("OBD UUID %s does not match last_rcvd UUID %s\n",
                                obd->obd_uuid.uuid, msd->msd_uuid);
                         GOTO(err_msd, rc = -EINVAL);
                         CERROR("OBD UUID %s does not match last_rcvd UUID %s\n",
                                obd->obd_uuid.uuid, msd->msd_uuid);
                         GOTO(err_msd, rc = -EINVAL);
index e6ea5d8..ce81bc0 100644 (file)
@@ -53,7 +53,8 @@ int mds_md_connect(struct obd_device *obd, char *md_name)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0};
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0};
-        int rc, valsize, value;
+        int rc, value;
+        __u32 valsize;
         ENTRY;
 
         if (IS_ERR(mds->mds_md_obd))
         ENTRY;
 
         if (IS_ERR(mds->mds_md_obd))
index 0f6bf52..5d13d0f 100644 (file)
@@ -182,12 +182,14 @@ int mds_dt_set_growth(struct mds_obd *mds, int count)
 static int mds_dt_update_desc(struct obd_device *obd, struct obd_export *lov)
 {
         struct mds_obd *mds = &obd->u.mds;
 static int mds_dt_update_desc(struct obd_device *obd, struct obd_export *lov)
 {
         struct mds_obd *mds = &obd->u.mds;
-        int valsize = sizeof(mds->mds_dt_desc), rc, i;
-        int old_count = mds->mds_dt_desc.ld_tgt_count;
+        __u32 valsize = sizeof(mds->mds_dt_desc);
+        int old_count, rc = 0, i;
         ENTRY;
 
         ENTRY;
 
-        rc = obd_get_info(lov, strlen("lovdesc") + 1, "lovdesc", &valsize,
-                          &mds->mds_dt_desc);
+        old_count = mds->mds_dt_desc.ld_tgt_count;
+        
+        rc = obd_get_info(lov, strlen("lovdesc") + 1, "lovdesc",
+                          &valsize, &mds->mds_dt_desc);
         if (rc)
                 RETURN(rc);
 
         if (rc)
                 RETURN(rc);
 
@@ -221,7 +223,7 @@ static int mds_dt_update_desc(struct obd_device *obd, struct obd_export *lov)
         RETURN(0);
 }
 
         RETURN(0);
 }
 
-int mds_dt_connect(struct obd_device *obd, char * lov_name)
+int mds_dt_connect(struct obd_device *obd, char *lov_name)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0,};
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0,};
@@ -291,7 +293,7 @@ int mds_dt_connect(struct obd_device *obd, char * lov_name)
         /* If we're mounting this code for the first time on an existing FS,
          * we need to populate the objids array from the real OST values */
         if (!mds->mds_dt_objids_valid) {
         /* If we're mounting this code for the first time on an existing FS,
          * we need to populate the objids array from the real OST values */
         if (!mds->mds_dt_objids_valid) {
-                int size = sizeof(obd_id) * mds->mds_dt_desc.ld_tgt_count;
+                __u32 size = sizeof(obd_id) * mds->mds_dt_desc.ld_tgt_count;
                 rc = obd_get_info(mds->mds_dt_exp, strlen("last_id"),
                                   "last_id", &size, mds->mds_dt_objids);
                 if (!rc) {
                 rc = obd_get_info(mds->mds_dt_exp, strlen("last_id"),
                                   "last_id", &size, mds->mds_dt_objids);
                 if (!rc) {
index 8f1f983..a474f9e 100644 (file)
@@ -1565,7 +1565,8 @@ int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
                                 RETURN(-ENOLCK);
                 }
 
                                 RETURN(-ENOLCK);
                 }
 
-                parent_res_id.name[2] = full_name_hash(name, namelen - 1);
+                parent_res_id.name[2] = full_name_hash((unsigned char *)name,
+                                                       namelen - 1);
                 
                 CDEBUG(D_INFO, "take lock on %lu:%lu:"LPX64"\n",
                        (unsigned long)id_fid(id), (unsigned long)id_group(id),
                 
                 CDEBUG(D_INFO, "take lock on %lu:%lu:"LPX64"\n",
                        (unsigned long)id_fid(id), (unsigned long)id_group(id),
@@ -2583,7 +2584,7 @@ static int mds_reint_link(struct mds_update_record *rec, int offset,
                                 GOTO(cleanup, rc = -ENOLCK);
                 }
 
                                 GOTO(cleanup, rc = -ENOLCK);
                 }
 
-                tgt_dir_res_id.name[2] = full_name_hash(rec->ur_name,
+                tgt_dir_res_id.name[2] = full_name_hash((unsigned char *)rec->ur_name,
                                                         rec->ur_namelen - 1);
                 CDEBUG(D_INFO, "take lock on %lu:%lu:"LPX64"\n",
                        (unsigned long)id_fid(rec->ur_id2),
                                                         rec->ur_namelen - 1);
                 CDEBUG(D_INFO, "take lock on %lu:%lu:"LPX64"\n",
                        (unsigned long)id_fid(rec->ur_id2),
@@ -2763,8 +2764,10 @@ static int mds_get_parents_children_locked(struct obd_device *obd,
                 if (rc != ELDLM_OK)
                         GOTO(cleanup, rc);
                 
                 if (rc != ELDLM_OK)
                         GOTO(cleanup, rc);
                 
-                p1_res_id.name[2] = full_name_hash(old_name, old_len - 1);
-                p2_res_id.name[2] = full_name_hash(new_name, new_len - 1);
+                p1_res_id.name[2] = full_name_hash((unsigned char *)old_name,
+                                                   old_len - 1);
+                p2_res_id.name[2] = full_name_hash((unsigned char *)new_name,
+                                                   new_len - 1);
 
                 CDEBUG(D_INFO, "take locks on "
                        LPX64":"LPX64":"LPX64", "LPX64":"LPX64":"LPX64"\n",
 
                 CDEBUG(D_INFO, "take locks on "
                        LPX64":"LPX64":"LPX64", "LPX64":"LPX64":"LPX64"\n",
index f8478b4..5708441 100644 (file)
@@ -634,9 +634,9 @@ static int class_config_parse_handler(struct llog_handle * handle,
                         lustre_cfg_bufs_set_string(&bufs, 0, inst_name);
 
                 }
                         lustre_cfg_bufs_set_string(&bufs, 0, inst_name);
 
                 }
-                if (cfg && lcfg->lcfg_command == LCFG_ATTACH) {
-                        lustre_cfg_bufs_set_string(&bufs, 2, cfg->cfg_uuid.uuid);
-                }
+                if (cfg && lcfg->lcfg_command == LCFG_ATTACH)
+                        lustre_cfg_bufs_set_string(&bufs, 2,
+                                                   (char *)cfg->cfg_uuid.uuid);
                 lcfg_new = lustre_cfg_new(lcfg->lcfg_command, &bufs);
 
                 lcfg_new->lcfg_num   = lcfg->lcfg_num;
                 lcfg_new = lustre_cfg_new(lcfg->lcfg_command, &bufs);
 
                 lcfg_new->lcfg_num   = lcfg->lcfg_num;
index 2226f90..44269a4 100644 (file)
@@ -134,7 +134,7 @@ void class_uuid_unparse(class_uuid_t uu, struct obd_uuid *out)
        struct uuid uuid;
 
        uuid_unpack(uu, &uuid);
        struct uuid uuid;
 
        uuid_unpack(uu, &uuid);
-       sprintf(out->uuid,
+       sprintf((char *)out->uuid,
                "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
                uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
                "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
                uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
@@ -156,7 +156,7 @@ struct obd_device *client_tgtuuid2obd(struct obd_uuid *tgtuuid)
                              sizeof LUSTRE_MDC_NAME) == 0)) {
                         struct client_obd *cli = &obd->u.cli;
                         struct obd_import *imp = cli->cl_import;
                              sizeof LUSTRE_MDC_NAME) == 0)) {
                         struct client_obd *cli = &obd->u.cli;
                         struct obd_import *imp = cli->cl_import;
-                        if (strncmp(tgtuuid->uuid, imp->imp_target_uuid.uuid,
+                        if (strncmp((char *)tgtuuid->uuid, (char *)imp->imp_target_uuid.uuid,
                                     sizeof(imp->imp_target_uuid)) == 0)
                                 return obd;
                 }
                                     sizeof(imp->imp_target_uuid)) == 0)
                                 return obd;
                 }
index 3852fc7..023bb30 100644 (file)
@@ -160,7 +160,7 @@ static int filter_client_add(struct obd_device *obd, struct filter_obd *filter,
         LASSERT(bitmap != NULL);
 
         /* XXX if fcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
         LASSERT(bitmap != NULL);
 
         /* XXX if fcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (!strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid))
+        if (!strcmp((char *)fed->fed_fcd->fcd_uuid, (char *)obd->obd_uuid.uuid))
                 RETURN(0);
 
         /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
                 RETURN(0);
 
         /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
@@ -251,7 +251,7 @@ static int filter_client_free(struct obd_export *exp, int flags)
                 GOTO(free, 0);
 
         /* XXX if fcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
                 GOTO(free, 0);
 
         /* XXX if fcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid ) == 0)
+        if (!strcmp((char *)fed->fed_fcd->fcd_uuid, (char *)obd->obd_uuid.uuid))
                 GOTO(free, 0);
 
         LASSERT(filter->fo_last_rcvd_slots != NULL);
                 GOTO(free, 0);
 
         LASSERT(filter->fo_last_rcvd_slots != NULL);
@@ -401,7 +401,7 @@ static int filter_init_server_data(struct obd_device *obd, struct file * filp)
                                LAST_RCVD, rc);
                         GOTO(err_fsd, rc);
                 }
                                LAST_RCVD, rc);
                         GOTO(err_fsd, rc);
                 }
-                if (strcmp(fsd->fsd_uuid, obd->obd_uuid.uuid) != 0) {
+                if (strcmp((char *)fsd->fsd_uuid, (char *)obd->obd_uuid.uuid)) {
                         CERROR("OBD UUID %s does not match last_rcvd UUID %s\n",
                                obd->obd_uuid.uuid, fsd->fsd_uuid);
                         GOTO(err_fsd, rc = -EINVAL);
                         CERROR("OBD UUID %s does not match last_rcvd UUID %s\n",
                                obd->obd_uuid.uuid, fsd->fsd_uuid);
                         GOTO(err_fsd, rc = -EINVAL);
@@ -1089,14 +1089,17 @@ static int filter_blocking_ast(struct ldlm_lock *lock,
 extern void *lock_dir(struct inode *dir, struct qstr *name);
 extern void unlock_dir(struct inode *dir, void *lock);
 
 extern void *lock_dir(struct inode *dir, struct qstr *name);
 extern void unlock_dir(struct inode *dir, void *lock);
 
-static void * filter_lock_dentry(struct obd_device *obd,
-                                 struct dentry *dparent, obd_id id)
+static void *filter_lock_dentry(struct obd_device *obd,
+                                struct dentry *dparent,
+                                obd_id id)
 {
 #ifdef S_PDIROPS
         struct qstr qstr;
         char name[32];
 {
 #ifdef S_PDIROPS
         struct qstr qstr;
         char name[32];
-        qstr.name = name;
-        qstr.len = sprintf(name, LPU64, id);
+        int len;
+
+        len = sprintf(name, LPU64, id);
+        qstr_assign(&qstr, (char *)name, len);
         return lock_dir(dparent->d_inode, &qstr);
 #else
         down(&dparent->d_inode->i_sem);
         return lock_dir(dparent->d_inode, &qstr);
 #else
         down(&dparent->d_inode->i_sem);
index 4c49b3a..f311b04 100644 (file)
@@ -642,7 +642,7 @@ static int check_write_rcs(struct ptlrpc_request *request,
                            int requested_nob, int niocount,
                            obd_count page_count, struct brw_page *pga)
 {
                            int requested_nob, int niocount,
                            obd_count page_count, struct brw_page *pga)
 {
-        int    *remote_rcs, i;
+        int *remote_rcs, i;
 
         /* return error if any niobuf was in error */
         remote_rcs = lustre_swab_repbuf(request, 1,
 
         /* return error if any niobuf was in error */
         remote_rcs = lustre_swab_repbuf(request, 1,
@@ -653,7 +653,7 @@ static int check_write_rcs(struct ptlrpc_request *request,
         }
         if (lustre_msg_swabbed(request->rq_repmsg))
                 for (i = 0; i < niocount; i++)
         }
         if (lustre_msg_swabbed(request->rq_repmsg))
                 for (i = 0; i < niocount; i++)
-                        __swab32s(&remote_rcs[i]);
+                        __swab32s((__u32 *)&remote_rcs[i]);
 
         for (i = 0; i < niocount; i++) {
                 if (remote_rcs[i] < 0)
 
         for (i = 0; i < niocount; i++) {
                 if (remote_rcs[i] < 0)
@@ -2822,11 +2822,11 @@ static int osc_get_info(struct obd_export *exp, obd_count keylen,
                 char *bufs[1] = {key};
                 int rc;
                 req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OBD_VERSION,
                 char *bufs[1] = {key};
                 int rc;
                 req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OBD_VERSION,
-                                      OST_GET_INFO, 1, &keylen, bufs);
+                                      OST_GET_INFO, 1, (int *)&keylen, bufs);
                 if (req == NULL)
                         RETURN(-ENOMEM);
 
                 if (req == NULL)
                         RETURN(-ENOMEM);
 
-                req->rq_replen = lustre_msg_size(1, vallen);
+                req->rq_replen = lustre_msg_size(1, (int *)vallen);
                 rc = ptlrpc_queue_wait(req);
                 if (rc)
                         GOTO(out, rc);
                 rc = ptlrpc_queue_wait(req);
                 if (rc)
                         GOTO(out, rc);
index 47e0072..f20386c 100644 (file)
@@ -908,7 +908,7 @@ static int ost_get_info(struct obd_export *exp, struct ptlrpc_request *req)
                 RETURN(rc);
 
         reply = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*reply));
                 RETURN(rc);
 
         reply = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*reply));
-        rc = obd_get_info(exp, keylen, key, &size, reply);
+        rc = obd_get_info(exp, keylen, key, (__u32 *)&size, reply);
         req->rq_repmsg->status = 0;
         RETURN(rc);
 }
         req->rq_repmsg->status = 0;
         RETURN(rc);
 }
index 349e218..f24a028 100644 (file)
@@ -1375,6 +1375,8 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
         list_add_tail(&req->rq_replay_list, &imp->imp_replay_list);
 }
 
         list_add_tail(&req->rq_replay_list, &imp->imp_replay_list);
 }
 
+int ptlrpc_check_and_wait_suspend(struct ptlrpc_request *req);
+
 int ptlrpc_queue_wait(struct ptlrpc_request *req)
 {
         char str[PTL_NALFMT_SIZE];
 int ptlrpc_queue_wait(struct ptlrpc_request *req)
 {
         char str[PTL_NALFMT_SIZE];
index c2c5288..9e19704 100644 (file)
@@ -93,7 +93,7 @@ struct ptlrpc_connection *ptlrpc_get_connection(struct ptlrpc_peer *peer,
                 GOTO(out, c);
 
         if (uuid && uuid->uuid)                         /* XXX ???? */
                 GOTO(out, c);
 
         if (uuid && uuid->uuid)                         /* XXX ???? */
-                obd_str2uuid(&c->c_remote_uuid, uuid->uuid);
+                obd_str2uuid(&c->c_remote_uuid, (char *)uuid->uuid);
         atomic_set(&c->c_refcount, 0);
         memcpy(&c->c_peer, peer, sizeof(c->c_peer));
 
         atomic_set(&c->c_refcount, 0);
         memcpy(&c->c_peer, peer, sizeof(c->c_peer));
 
index 2a253c5..20fde70 100644 (file)
@@ -356,7 +356,7 @@ int ptlrpc_uuid_to_peer (struct obd_uuid *uuid, struct ptlrpc_peer *peer)
         ptl_nid_t           peer_nid;
         int                 i;
         char                str[PTL_NALFMT_SIZE];
         ptl_nid_t           peer_nid;
         int                 i;
         char                str[PTL_NALFMT_SIZE];
-        int                 rc = lustre_uuid_to_peer(uuid->uuid, 
+        int                 rc = lustre_uuid_to_peer((char *)uuid->uuid, 
                                                      &peer_nal, &peer_nid);
         if (rc != 0)
                 RETURN (rc);
                                                      &peer_nal, &peer_nid);
         if (rc != 0)
                 RETURN (rc);
index 96ad1c6..069a427 100644 (file)
@@ -329,8 +329,8 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid)
                       sizeof(imp->imp_connect_flags),
                       sizeof(imp->imp_connect_data)};
         char *tmp[] = {NULL,
                       sizeof(imp->imp_connect_flags),
                       sizeof(imp->imp_connect_data)};
         char *tmp[] = {NULL,
-                       imp->imp_target_uuid.uuid,
-                       obd->obd_uuid.uuid,
+                       (char *)imp->imp_target_uuid.uuid,
+                       (char *)obd->obd_uuid.uuid,
                        (char *)&imp->imp_dlm_handle,
                        (char *)&imp->imp_connect_flags, /* XXX: make this portable! */
                        (char*) &imp->imp_connect_data};
                        (char *)&imp->imp_dlm_handle,
                        (char *)&imp->imp_connect_flags, /* XXX: make this portable! */
                        (char*) &imp->imp_connect_data};
index 47d25c1..f33ce32 100644 (file)
@@ -210,9 +210,9 @@ int llog_origin_handle_next_block(struct ptlrpc_request *req)
                 GOTO(out_close, rc);
 
         memset(buf, 0, LLOG_CHUNK_SIZE);
                 GOTO(out_close, rc);
 
         memset(buf, 0, LLOG_CHUNK_SIZE);
-        rc = llog_next_block(loghandle, &body->lgd_saved_index,
-                             body->lgd_index,
-                             &body->lgd_cur_offset, buf, LLOG_CHUNK_SIZE);
+        rc = llog_next_block(loghandle, (int *)&body->lgd_saved_index,
+                             body->lgd_index, &body->lgd_cur_offset,
+                             buf, LLOG_CHUNK_SIZE);
         if (rc)
                 GOTO(out_close, rc);
 
         if (rc)
                 GOTO(out_close, rc);
 
index e51e346..6bf1d35 100644 (file)
@@ -54,7 +54,7 @@ void ptlrpc_run_recovery_over_upcall(struct obd_device *obd)
 
         argv[0] = obd_lustre_upcall;
         argv[1] = "RECOVERY_OVER";
 
         argv[0] = obd_lustre_upcall;
         argv[1] = "RECOVERY_OVER";
-        argv[2] = obd->obd_uuid.uuid;
+        argv[2] = (char *)obd->obd_uuid.uuid;
         argv[3] = NULL;
         
         envp[0] = "HOME=/";
         argv[3] = NULL;
         
         envp[0] = "HOME=/";
@@ -92,10 +92,10 @@ void ptlrpc_run_failed_import_upcall(struct obd_import* imp)
         
         argv[0] = obd_lustre_upcall;
         argv[1] = "FAILED_IMPORT";
         
         argv[0] = obd_lustre_upcall;
         argv[1] = "FAILED_IMPORT";
-        argv[2] = imp->imp_target_uuid.uuid;
+        argv[2] = (char *)imp->imp_target_uuid.uuid;
         argv[3] = imp->imp_obd->obd_name;
         argv[3] = imp->imp_obd->obd_name;
-        argv[4] = imp->imp_connection->c_remote_uuid.uuid;
-        argv[5] = imp->imp_obd->obd_uuid.uuid;
+        argv[4] = (char *)imp->imp_connection->c_remote_uuid.uuid;
+        argv[5] = (char *)imp->imp_obd->obd_uuid.uuid;
         argv[6] = NULL;
 
         envp[0] = "HOME=/";
         argv[6] = NULL;
 
         envp[0] = "HOME=/";
index 2991431..f70324b 100644 (file)
@@ -184,7 +184,7 @@ make_checksum(__s32 cksumtype,
         buf_to_sg(sg, header, hdrlen);
         crypto_digest_update(tfm, sg, 1);
         if (body->len) {
         buf_to_sg(sg, header, hdrlen);
         crypto_digest_update(tfm, sg, 1);
         if (body->len) {
-                buf_to_sg(sg, body->data, body->len);
+                buf_to_sg(sg, (char *)body->data, body->len);
                 crypto_digest_update(tfm, sg, 1);
         }
 
                 crypto_digest_update(tfm, sg, 1);
         }
 
index 8dcca46..3597223 100644 (file)
@@ -72,7 +72,7 @@
 #include "gss_krb5.h"
 
 rawobj_t gss_mech_krb5_oid =
 #include "gss_krb5.h"
 
 rawobj_t gss_mech_krb5_oid =
-   {9, "\052\206\110\206\367\022\001\002\002"};
+{9, (__u8 *)"\052\206\110\206\367\022\001\002\002"};
 
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
 
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
@@ -146,8 +146,8 @@ static __u32
 gss_import_sec_context_kerberos(rawobj_t *inbuf,
                                 struct gss_ctx *ctx_id)
 {
 gss_import_sec_context_kerberos(rawobj_t *inbuf,
                                 struct gss_ctx *ctx_id)
 {
-        char            *p = inbuf->data;
-        char            *end = inbuf->data + inbuf->len;
+        char            *p = (char *)inbuf->data;
+        char            *end = (char *)(inbuf->data + inbuf->len);
         struct krb5_ctx *ctx;
 
         OBD_ALLOC(ctx, sizeof(*ctx));
         struct krb5_ctx *ctx;
 
         OBD_ALLOC(ctx, sizeof(*ctx));
index 388a94a..fec10e2 100644 (file)
@@ -143,7 +143,7 @@ krb5_make_token(struct krb5_ctx *ctx,
         *(__u16 *)(krb5_hdr + 2) = cpu_to_be16(ctx->signalg);
         memset(krb5_hdr + 4, 0xff, 4);
 
         *(__u16 *)(krb5_hdr + 2) = cpu_to_be16(ctx->signalg);
         memset(krb5_hdr + 4, 0xff, 4);
 
-        if (make_checksum(checksum_type, krb5_hdr, 8, text, &md5cksum))
+        if (make_checksum(checksum_type, (char *)krb5_hdr, 8, text, &md5cksum))
                 goto out_err;
 
         switch (ctx->signalg) {
                 goto out_err;
 
         switch (ctx->signalg) {
index 96e6822..74bcc9e 100644 (file)
@@ -162,8 +162,8 @@ krb5_read_token(struct krb5_ctx *ctx,
 
         switch (signalg) {
         case SGN_ALG_DES_MAC_MD5:
 
         switch (signalg) {
         case SGN_ALG_DES_MAC_MD5:
-                ret = make_checksum(checksum_type, ptr - 2, 8,
-                                    message_buffer, &md5cksum);
+                ret = make_checksum(checksum_type, (char *)(ptr - 2),
+                                    8, message_buffer, &md5cksum);
                 if (ret)
                         goto out;
 
                 if (ret)
                         goto out;
 
index 1099156..0ca56d1 100644 (file)
@@ -165,7 +165,8 @@ gss_wrap_kerberos(struct gss_ctx    *ctx,
         data_desc.data = msgbuf->buf + msgbuf->dataoff - blocksize;
         data_desc.len = msgbuf->datalen + blocksize;
 
         data_desc.data = msgbuf->buf + msgbuf->dataoff - blocksize;
         data_desc.len = msgbuf->datalen + blocksize;
 
-        if (make_checksum(checksum_type, krb5_hdr, 8, &data_desc, &md5cksum)) {
+        if (make_checksum(checksum_type, (char *)krb5_hdr,
+                          8, &data_desc, &md5cksum)) {
                 CERROR("checksum error\n");
                 RETURN(GSS_S_FAILURE);
         }
                 CERROR("checksum error\n");
                 RETURN(GSS_S_FAILURE);
         }
@@ -317,8 +318,8 @@ gss_unwrap_kerberos(struct gss_ctx  *ctx,
         switch (signalg) {
         case SGN_ALG_DES_MAC_MD5:
                 checksum_type = CKSUMTYPE_RSA_MD5;
         switch (signalg) {
         case SGN_ALG_DES_MAC_MD5:
                 checksum_type = CKSUMTYPE_RSA_MD5;
-                major = make_checksum(checksum_type, krb5_hdr, 8,
-                                      &plain_out, &md5cksum);
+                major = make_checksum(checksum_type, (char *)krb5_hdr,
+                                      8, &plain_out, &md5cksum);
                 if (major) {
                         CERROR("make checksum err: 0x%x\n", major);
                         GOTO(out_free, major);
                 if (major) {
                         CERROR("make checksum err: 0x%x\n", major);
                         GOTO(out_free, major);
index f46d2f5..de85047 100644 (file)
@@ -99,7 +99,7 @@ static int secinit_compose_request(struct obd_import *imp,
         struct ptlrpcs_wire_hdr *hdr;
         struct lustre_msg       *lmsg;
         struct mds_req_sec_desc *secdesc;
         struct ptlrpcs_wire_hdr *hdr;
         struct lustre_msg       *lmsg;
         struct mds_req_sec_desc *secdesc;
-        __u32                    size = sizeof(*secdesc);
+        int                      size = sizeof(*secdesc);
         __u32                    lmsg_size, *p;
         int                      rc;
 
         __u32                    lmsg_size, *p;
         int                      rc;
 
@@ -620,11 +620,11 @@ int gss_parse_init_downcall(struct gss_api_mech *gm, rawobj_t *buf,
                             struct gss_cl_ctx **gc,
                             struct gss_upcall_msg_data *gmd, int *gss_err)
 {
                             struct gss_cl_ctx **gc,
                             struct gss_upcall_msg_data *gmd, int *gss_err)
 {
-        char *p = buf->data;
-        __u32 len = buf->len;
+        char *p = (char *)buf->data;
         struct gss_cl_ctx *ctx;
         struct gss_cl_ctx *ctx;
-        rawobj_t tmp_buf;
+        __u32 len = buf->len;
         unsigned int timeout;
         unsigned int timeout;
+        rawobj_t tmp_buf;
         int err = -EPERM;
         ENTRY;
 
         int err = -EPERM;
         ENTRY;
 
@@ -976,7 +976,7 @@ static int gss_cred_sign(struct ptlrpc_cred *cred,
         vlen -= 4;
 
         mic.len = vlen;
         vlen -= 4;
 
         mic.len = vlen;
-        mic.data = (char *) vp;
+        mic.data = (unsigned char *)vp;
 
         CDEBUG(D_SEC, "reqbuf at %p, lmsg at %p, len %d, mic at %p, len %d\n",
                req->rq_reqbuf, lmsg.data, lmsg.len, mic.data, mic.len);
 
         CDEBUG(D_SEC, "reqbuf at %p, lmsg at %p, len %d, mic at %p, len %d\n",
                req->rq_reqbuf, lmsg.data, lmsg.len, mic.data, mic.len);
@@ -1048,7 +1048,7 @@ static int gss_cred_verify(struct ptlrpc_cred *cred,
                         CERROR("vlen %d, mic.len %d\n", vlen, mic.len);
                         RETURN(-EINVAL);
                 }
                         CERROR("vlen %d, mic.len %d\n", vlen, mic.len);
                         RETURN(-EINVAL);
                 }
-                mic.data = (char *) vp;
+                mic.data = (unsigned char *)vp;
 
                 gcred = container_of(cred, struct gss_cred, gc_base);
                 ctx = gss_cred_get_ctx(cred);
 
                 gcred = container_of(cred, struct gss_cred, gc_base);
                 ctx = gss_cred_get_ctx(cred);
@@ -1458,7 +1458,7 @@ gss_pipe_downcall(struct file *filp, const char *src, size_t mlen)
         if (left)
                 GOTO(err_free, err = -EFAULT);
 
         if (left)
                 GOTO(err_free, err = -EFAULT);
 
-        obj.data = buf;
+        obj.data = (unsigned char *)buf;
         obj.len = mlen;
 
         LASSERT(rpci->private);
         obj.len = mlen;
 
         LASSERT(rpci->private);
index f40544e..6e8b738 100644 (file)
@@ -135,8 +135,8 @@ static void rsi_put(struct cache_head *item, struct cache_detail *cd)
 
 static inline int rsi_hash(struct rsi *item)
 {
 
 static inline int rsi_hash(struct rsi *item)
 {
-        return hash_mem(item->in_handle.data, item->in_handle.len, RSI_HASHBITS)
-              ^ hash_mem(item->in_token.data, item->in_token.len, RSI_HASHBITS);
+        return hash_mem((char *)item->in_handle.data, item->in_handle.len, RSI_HASHBITS)
+                ^ hash_mem((char *)item->in_token.data, item->in_token.len, RSI_HASHBITS);
 }
 
 static inline int rsi_match(struct rsi *item, struct rsi *tmp)
 }
 
 static inline int rsi_match(struct rsi *item, struct rsi *tmp)
@@ -151,11 +151,11 @@ static void rsi_request(struct cache_detail *cd,
 {
         struct rsi *rsii = container_of(h, struct rsi, h);
 
 {
         struct rsi *rsii = container_of(h, struct rsi, h);
 
-        qword_addhex(bpp, blen, (char *) &rsii->naltype, sizeof(rsii->naltype));
-        qword_addhex(bpp, blen, (char *) &rsii->netid, sizeof(rsii->netid));
-        qword_addhex(bpp, blen, (char *) &rsii->nid, sizeof(rsii->nid));
-        qword_addhex(bpp, blen, rsii->in_handle.data, rsii->in_handle.len);
-        qword_addhex(bpp, blen, rsii->in_token.data, rsii->in_token.len);
+        qword_addhex(bpp, blen, (char *)&rsii->naltype, sizeof(rsii->naltype));
+        qword_addhex(bpp, blen, (char *)&rsii->netid, sizeof(rsii->netid));
+        qword_addhex(bpp, blen, (char *)&rsii->nid, sizeof(rsii->nid));
+        qword_addhex(bpp, blen, (char *)rsii->in_handle.data, rsii->in_handle.len);
+        qword_addhex(bpp, blen, (char *)rsii->in_token.data, rsii->in_token.len);
         (*bpp)[-1] = '\n';
 }
 
         (*bpp)[-1] = '\n';
 }
 
@@ -418,7 +418,8 @@ static void rsc_put(struct cache_head *item, struct cache_detail *cd)
 static inline int
 rsc_hash(struct rsc *rsci)
 {
 static inline int
 rsc_hash(struct rsc *rsci)
 {
-        return hash_mem(rsci->handle.data, rsci->handle.len, RSC_HASHBITS);
+        return hash_mem((char *)rsci->handle.data,
+                        rsci->handle.len, RSC_HASHBITS);
 }
 
 static inline int
 }
 
 static inline int
@@ -472,7 +473,8 @@ out_noset:
 static int rsc_parse(struct cache_detail *cd,
                      char *mesg, int mlen)
 {
 static int rsc_parse(struct cache_detail *cd,
                      char *mesg, int mlen)
 {
-        /* contexthandle expiry [ uid gid N <n gids> mechname ...mechdata... ] */
+        /* contexthandle expiry [ uid gid N <n gids> mechname
+         * ...mechdata... ] */
         char *buf = mesg;
         int len, rv;
         struct rsc *rsci, *res = NULL;
         char *buf = mesg;
         int len, rv;
         struct rsc *rsci, *res = NULL;
@@ -500,21 +502,21 @@ static int rsc_parse(struct cache_detail *cd,
                 goto out;
 
         /* remote flag */
                 goto out;
 
         /* remote flag */
-        rv = get_int(&mesg, &rsci->remote_realm);
+        rv = get_int(&mesg, (int *)&rsci->remote_realm);
         if (rv) {
                 CERROR("fail to get remote flag\n");
                 goto out;
         }
 
         /* mapped uid */
         if (rv) {
                 CERROR("fail to get remote flag\n");
                 goto out;
         }
 
         /* mapped uid */
-        rv = get_int(&mesg, &rsci->mapped_uid);
+        rv = get_int(&mesg, (int *)&rsci->mapped_uid);
         if (rv) {
                 CERROR("fail to get mapped uid\n");
                 goto out;
         }
 
         /* uid, or NEGATIVE */
         if (rv) {
                 CERROR("fail to get mapped uid\n");
                 goto out;
         }
 
         /* uid, or NEGATIVE */
-        rv = get_int(&mesg, &rsci->cred.vc_uid);
+        rv = get_int(&mesg, (int *)&rsci->cred.vc_uid);
         if (rv == -EINVAL)
                 goto out;
         if (rv == -ENOENT) {
         if (rv == -EINVAL)
                 goto out;
         if (rv == -ENOENT) {
@@ -526,7 +528,7 @@ static int rsc_parse(struct cache_detail *cd,
                 __u64 ctx_expiry;
 
                 /* gid */
                 __u64 ctx_expiry;
 
                 /* gid */
-                if (get_int(&mesg, &rsci->cred.vc_gid))
+                if (get_int(&mesg, (int *)&rsci->cred.vc_gid))
                         goto out;
 
                 /* mech name */
                         goto out;
 
                 /* mech name */
@@ -546,7 +548,7 @@ static int rsc_parse(struct cache_detail *cd,
                         goto out;
                 }
                 tmp_buf.len = len;
                         goto out;
                 }
                 tmp_buf.len = len;
-                tmp_buf.data = buf;
+                tmp_buf.data = (unsigned char *)buf;
                 if (kgss_import_sec_context(&tmp_buf, gm, &rsci->mechctx)) {
                         kgss_mech_put(gm);
                         goto out;
                 if (kgss_import_sec_context(&tmp_buf, gm, &rsci->mechctx)) {
                         kgss_mech_put(gm);
                         goto out;
@@ -718,7 +720,7 @@ gss_svc_verify_request(struct ptlrpc_request *req,
         msg.data = (__u8 *)req->rq_reqmsg;
 
         mic.len = le32_to_cpu(*vp++);
         msg.data = (__u8 *)req->rq_reqmsg;
 
         mic.len = le32_to_cpu(*vp++);
-        mic.data = (char *) vp;
+        mic.data = (unsigned char *)vp;
         vlen -= 4;
 
         if (mic.len > vlen) {
         vlen -= 4;
 
         if (mic.len > vlen) {
@@ -1287,7 +1289,7 @@ gss_svcsec_authorize(struct ptlrpc_request *req)
                 vlen -= 7 * 4;
 
                 mic.len = vlen;
                 vlen -= 7 * 4;
 
                 mic.len = vlen;
-                mic.data = (char *) vp;
+                mic.data = (unsigned char *)vp;
 
                 major = kgss_get_mic(rscp->mechctx, 0, &lmsg, &mic);
                 if (major) {
 
                 major = kgss_get_mic(rscp->mechctx, 0, &lmsg, &mic);
                 if (major) {
index 1e27fff..6b33b29 100644 (file)
@@ -54,8 +54,8 @@ static int cache_leaf_node(struct dentry *dentry, __u64 *active_entry)
         if (S_ISDIR(inode->i_mode)) {
                 if (inode->i_nlink != 2)
                         return 0;
         if (S_ISDIR(inode->i_mode)) {
                 if (inode->i_nlink != 2)
                         return 0;
-                if (!strncmp(dentry->d_name.name, "lost+found",
-                             dentry->d_name.len))
+                if (!strncmp((char *)dentry->d_name.name,
+                             "lost+found", dentry->d_name.len))
                         return 0;
                 LASSERT(active_entry != NULL);
                 get_active_entry(inode, active_entry);
                         return 0;
                 LASSERT(active_entry != NULL);
                 get_active_entry(inode, active_entry);
@@ -63,8 +63,8 @@ static int cache_leaf_node(struct dentry *dentry, __u64 *active_entry)
         } else {
                 if (inode->i_nlink != 1)
                         return 0;
         } else {
                 if (inode->i_nlink != 1)
                         return 0;
-                if (!strncmp(dentry->d_name.name, KML_LOG_NAME, dentry->d_name.len) ||
-                    !strncmp(dentry->d_name.name, CACHE_LRU_LOG, dentry->d_name.len))
+                if (!strncmp((char *)dentry->d_name.name, KML_LOG_NAME, dentry->d_name.len) ||
+                    !strncmp((char *)dentry->d_name.name, CACHE_LRU_LOG, dentry->d_name.len))
                         return 0;
                 return 1;
         }
                         return 0;
                 return 1;
         }
@@ -74,8 +74,8 @@ static int cache_pre_leaf_node(struct dentry *dentry, __u64 *active_entry, int o
 {
         if (((op == 0 && dentry->d_inode->i_nlink == 0) ||
             (op == 1 && dentry->d_inode->i_nlink == 2)) &&
 {
         if (((op == 0 && dentry->d_inode->i_nlink == 0) ||
             (op == 1 && dentry->d_inode->i_nlink == 2)) &&
-            strncmp(dentry->d_name.name, KML_LOG_NAME, dentry->d_name.len) &&
-            strncmp(dentry->d_name.name, CACHE_LRU_LOG, dentry->d_name.len))
+            strncmp((char *)dentry->d_name.name, KML_LOG_NAME, dentry->d_name.len) &&
+            strncmp((char *)dentry->d_name.name, CACHE_LRU_LOG, dentry->d_name.len))
                 return 1;
         else if ((op == 2 && dentry->d_inode->i_nlink == 0) ||
                  (op == 3 && dentry->d_inode->i_nlink == 3)) {
                 return 1;
         else if ((op == 2 && dentry->d_inode->i_nlink == 0) ||
                  (op == 3 && dentry->d_inode->i_nlink == 3)) {
index 7629e39..a8c7254 100644 (file)
@@ -889,6 +889,8 @@ static int fsfilt_smfs_free_extents(struct super_block *sb, ino_t ino,
 static int fsfilt_smfs_write_extents(struct dentry *dentry,
                                      unsigned long from, unsigned long num)
 {
 static int fsfilt_smfs_write_extents(struct dentry *dentry,
                                      unsigned long from, unsigned long num)
 {
+        /* TODO: fix this later */
+#if 0
         int rc = 0;
         struct inode * cache_inode = I2CI(dentry->d_inode);
         struct hook_write_msg msg = {
         int rc = 0;
         struct inode * cache_inode = I2CI(dentry->d_inode);
         struct hook_write_msg msg = {
@@ -899,7 +901,6 @@ static int fsfilt_smfs_write_extents(struct dentry *dentry,
 
         ENTRY;
         
 
         ENTRY;
         
-        /*TODO: fix this later
         pre_smfs_inode(dentry->d_inode, cache_inode);
  
         SMFS_PRE_HOOK(dentry->d_inode, HOOK_WRITE, &msg);
         pre_smfs_inode(dentry->d_inode, cache_inode);
  
         SMFS_PRE_HOOK(dentry->d_inode, HOOK_WRITE, &msg);
@@ -907,9 +908,11 @@ static int fsfilt_smfs_write_extents(struct dentry *dentry,
         rc = smfs_write_extents(dentry->d_inode, dentry, from, num);
         SMFS_POST_HOOK(dentry->d_inode, HOOK_WRITE, &msg, rc);
         post_smfs_inode(dentry->d_inode, cache_inode);
         rc = smfs_write_extents(dentry->d_inode, dentry, from, num);
         SMFS_POST_HOOK(dentry->d_inode, HOOK_WRITE, &msg, rc);
         post_smfs_inode(dentry->d_inode, cache_inode);
-        */
         
         RETURN(rc);
         
         RETURN(rc);
+#endif
+        ENTRY;
+        RETURN(0);
 }
 
 static int fsfilt_smfs_precreate_rec(struct dentry *dentry, int *count, 
 }
 
 static int fsfilt_smfs_precreate_rec(struct dentry *dentry, int *count, 
index b314eaf..ccb3522 100644 (file)
@@ -105,6 +105,8 @@ exit:
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
+#if 0
+/* not used curently */
 static smfs_pack_rec_func smfs_get_rec_pack_type(struct super_block *sb)
 {
         int idx = 0;
 static smfs_pack_rec_func smfs_get_rec_pack_type(struct super_block *sb)
 {
         int idx = 0;
@@ -113,6 +115,7 @@ static smfs_pack_rec_func smfs_get_rec_pack_type(struct super_block *sb)
         idx = GET_REC_PACK_TYPE_INDEX(smsi->smsi_flags);
         return smsi->smsi_pack_rec[idx];
 }
         idx = GET_REC_PACK_TYPE_INDEX(smsi->smsi_flags);
         return smsi->smsi_pack_rec[idx];
 }
+#endif
 
 static inline void
 copy_inode_attr(struct iattr *iattr, struct inode *inode)
 
 static inline void
 copy_inode_attr(struct iattr *iattr, struct inode *inode)
@@ -456,12 +459,11 @@ exit:
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
-static int kml_link(struct inode * inode, void *arg, struct kml_priv * priv) 
+static int kml_link(struct inode *inode, void *arg, struct kml_priv *priv) 
 {
 {
-        struct hook_link_msg * msg = arg;
-        int rc = 0, length = 0, buf_len = 0;
-        char *buffer = NULL, *pbuf = NULL;
-        struct smfs_super_info *smb;
+        struct hook_link_msg *msg = arg;
+        int rc = 0, length = 0;
+        char *buffer = NULL;
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
@@ -507,12 +509,12 @@ exit:
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
-static int kml_symlink(struct inode * inode, void *arg, struct kml_priv * priv) 
+static int kml_symlink(struct inode *inode, void *arg, struct kml_priv *priv) 
 {
 {
-        struct hook_symlink_msg * msg = arg;
         struct smfs_super_info *smb = S2SMI(inode->i_sb);
         struct smfs_super_info *smb = S2SMI(inode->i_sb);
-        char   *buffer = NULL, *pbuf;
+        struct hook_symlink_msg *msg = arg;
         int rc = 0, length = 0;
         int rc = 0, length = 0;
+        char *buffer = NULL;
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
@@ -533,11 +535,11 @@ exit:
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
-static int kml_rename(struct inode * inode, void *arg, struct kml_priv * priv) 
+static int kml_rename(struct inode *inode, void *arg, struct kml_priv *priv) 
 {
 {
-        struct hook_rename_msg * msg = arg;
-        char *buffer = NULL, *pbuf = NULL;
-        int rc = 0, length = 0, buf_len = 0;
+        struct hook_rename_msg *msg = arg;
+        int rc = 0, length = 0;
+        char *buffer = NULL;
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
         ENTRY;
         
         OBD_ALLOC(buffer, PAGE_SIZE);
@@ -557,11 +559,11 @@ exit:
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
-static int kml_setattr(struct inode * inode, void *arg, struct kml_priv * priv) 
+static int kml_setattr(struct inode *inode, void *arg, struct kml_priv *priv) 
 {
 {
-        struct hook_setattr_msg * msg = arg;
-        char   *buffer = NULL, *pbuf;
-        int rc = 0, length = 0, buf_len = 0;
+        struct hook_setattr_msg *msg = arg;
+        int rc = 0, length = 0;
+        char *buffer = NULL;
         ENTRY;
 
         OBD_ALLOC(buffer, PAGE_SIZE);
         ENTRY;
 
         OBD_ALLOC(buffer, PAGE_SIZE);
index 6b57a4d..2e8facf 100644 (file)
@@ -53,7 +53,8 @@ static int mds_rec_link_pack(char *buffer, struct dentry *dentry,
                 return -ENOMEM;
         
         mdc_prepare_mdc_data(op_data, src->d_inode, dir,
                 return -ENOMEM;
         
         mdc_prepare_mdc_data(op_data, src->d_inode, dir,
-                             tgt->d_name.name, tgt->d_name.len, 0);
+                             (char *)tgt->d_name.name,
+                             tgt->d_name.len, 0);
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
         mkpi = (struct mds_kml_pack_info *)buffer;
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
         mkpi = (struct mds_kml_pack_info *)buffer;
@@ -141,8 +142,10 @@ static int mds_rec_create_pack(char *buffer, struct dentry *dentry,
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 return -ENOMEM;
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 return -ENOMEM;
+        
         mdc_prepare_mdc_data(op_data, dir, dentry->d_inode,
         mdc_prepare_mdc_data(op_data, dir, dentry->d_inode,
-                             dentry->d_name.name, dentry->d_name.len, 0);
+                             (char *)dentry->d_name.name,
+                             dentry->d_name.len, 0);
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
         mkpi = (struct mds_kml_pack_info *)buffer;
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
         mkpi = (struct mds_kml_pack_info *)buffer;
@@ -190,8 +193,9 @@ static int mds_rec_unlink_pack(char *buffer, struct dentry *dentry,
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 return -ENOMEM;
         OBD_ALLOC(op_data, sizeof(*op_data));
         if (op_data == NULL)
                 return -ENOMEM;
+        
         mdc_prepare_mdc_data(op_data, dir, NULL,
         mdc_prepare_mdc_data(op_data, dir, NULL,
-                             dentry->d_name.name,
+                             (char *)dentry->d_name.name,
                              dentry->d_name.len, mode);
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
                              dentry->d_name.len, mode);
 
         PACK_KML_REC_INIT(buffer, MDS_REINT);
@@ -244,8 +248,8 @@ static int mds_rec_rename_pack(char *buffer, struct dentry *dentry,
         msg = (struct lustre_msg *)(buffer + sizeof(*mkpi));
         lustre_init_msg(msg, mkpi->mpi_bufcount, mkpi->mpi_size, NULL);
 
         msg = (struct lustre_msg *)(buffer + sizeof(*mkpi));
         lustre_init_msg(msg, mkpi->mpi_bufcount, mkpi->mpi_size, NULL);
 
-        tmp = mdc_rename_pack(msg, 0, op_data, dentry->d_name.name,
-                              dentry->d_name.len, new_dentry->d_name.name,
+        tmp = mdc_rename_pack(msg, 0, op_data, (char *)dentry->d_name.name,
+                              dentry->d_name.len, (char *)new_dentry->d_name.name,
                               new_dentry->d_name.len);
 
         mkpi->mpi_total_size = tmp - (void*)msg;
                               new_dentry->d_name.len);
 
         mkpi->mpi_total_size = tmp - (void*)msg;
index 6938b1b..6147071 100644 (file)
@@ -127,8 +127,9 @@ static int mmap_wait(char *str, int timeout)
                 int fromlen =sizeof(from);
                 
                memset(buffer, 0, sizeof(buffer));
                 int fromlen =sizeof(from);
                 
                memset(buffer, 0, sizeof(buffer));
-               rc = recvfrom(sockfd, buffer, sizeof(buffer), 0, 
-                              (struct sockaddr *)&from, &fromlen);
+               rc = recvfrom(sockfd, buffer, sizeof(buffer),
+                              0, (struct sockaddr *)&from,
+                              (socklen_t *)&fromlen);
                 if (rc <= 0) {
                         perror("recvfrom()");
                         rc = errno;
                 if (rc <= 0) {
                         perror("recvfrom()");
                         rc = errno;
index fcd5016..b7c2a66 100644 (file)
@@ -292,7 +292,7 @@ static int setup_obd_uuids(DIR *dir, char *dname, struct find_param *param)
 
         if (param->obduuid) {
                 for (i = 0, uuidp = uuids; i < obdcount; i++, uuidp++) {
 
         if (param->obduuid) {
                 for (i = 0, uuidp = uuids; i < obdcount; i++, uuidp++) {
-                        if (strncmp(param->obduuid->uuid, uuidp->uuid,
+                        if (strncmp((char *)param->obduuid->uuid, (char *)uuidp->uuid,
                                     sizeof(*uuidp)) == 0) {
                                 param->obdindex = i;
                                 break;
                                     sizeof(*uuidp)) == 0) {
                                 param->obdindex = i;
                                 break;
index 2b110d8..a1fc338 100644 (file)
@@ -377,14 +377,16 @@ int main (int argc, char **argv)
 
         /* read user/group database */
         ioc_data.err = get_groups_local(ioc_data.uid, &ioc_data.gid,
 
         /* read user/group database */
         ioc_data.err = get_groups_local(ioc_data.uid, &ioc_data.gid,
-                                        &ioc_data.ngroups, &ioc_data.groups);
+                                        (int *)&ioc_data.ngroups,
+                                        &ioc_data.groups);
         if (ioc_data.err)
                 goto do_downcall;
 
         /* read lsd config database */
         conf_fp = fopen(conf_name, "r");
         if (conf_fp) {
         if (ioc_data.err)
                 goto do_downcall;
 
         /* read lsd config database */
         conf_fp = fopen(conf_name, "r");
         if (conf_fp) {
-                get_perms(conf_fp, ioc_data.uid, &ioc_data.nperms,
+                get_perms(conf_fp, ioc_data.uid,
+                          (int *)&ioc_data.nperms,
                           &ioc_data.perms);
                 fclose(conf_fp);
         }
                           &ioc_data.perms);
                 fclose(conf_fp);
         }