Whamcloud - gitweb
LU-4023 build: wrong type used 49/7849/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Sun, 29 Sep 2013 09:58:42 +0000 (13:58 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 30 Oct 2013 21:54:42 +0000 (21:54 +0000)
Fixed implicit conversion from 'unsigned long long' to 'int'.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I331a8ebe1fb9ef53ebd4fc92603b4100f006ee2b
Reviewed-on: http://review.whamcloud.com/7849
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
lustre/include/lustre_dlm.h
lustre/include/obd_class.h
lustre/include/obd_ost.h
lustre/ldlm/ldlm_request.c
lustre/llite/file.c
lustre/lmv/lmv_obd.c
lustre/lov/lov_internal.h
lustre/lov/lov_request.c
lustre/osc/osc_internal.h
lustre/osc/osc_page.c
lustre/osc/osc_request.c

index cca3273..283411e 100644 (file)
@@ -1624,10 +1624,10 @@ int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
 int ldlm_cli_cancel_req(struct obd_export *exp, cfs_list_t *head,
                         int count, ldlm_cancel_flags_t flags);
 int ldlm_cancel_resource_local(struct ldlm_resource *res,
-                               cfs_list_t *cancels,
-                               ldlm_policy_data_t *policy,
-                               ldlm_mode_t mode, int lock_flags,
-                               ldlm_cancel_flags_t cancel_flags, void *opaque);
+                              cfs_list_t *cancels,
+                              ldlm_policy_data_t *policy,
+                              ldlm_mode_t mode, __u64 lock_flags,
+                              ldlm_cancel_flags_t cancel_flags, void *opaque);
 int ldlm_cli_cancel_list_local(cfs_list_t *cancels, int count,
                                ldlm_cancel_flags_t flags);
 int ldlm_cli_cancel_list(cfs_list_t *head, int count,
index f3be6cc..a2a612a 100644 (file)
@@ -1919,13 +1919,13 @@ static inline int md_done_writing(struct obd_export *exp,
 }
 
 static inline int md_enqueue(struct obd_export *exp,
-                             struct ldlm_enqueue_info *einfo,
-                             struct lookup_intent *it,
-                             struct md_op_data *op_data,
-                             struct lustre_handle *lockh,
-                             void *lmm, int lmmsize,
-                             struct ptlrpc_request **req,
-                             int extra_lock_flags)
+                            struct ldlm_enqueue_info *einfo,
+                            struct lookup_intent *it,
+                            struct md_op_data *op_data,
+                            struct lustre_handle *lockh,
+                            void *lmm, int lmmsize,
+                            struct ptlrpc_request **req,
+                            __u64 extra_lock_flags)
 {
         int rc;
         ENTRY;
index 591dc20..5debe02 100644 (file)
@@ -87,6 +87,10 @@ struct osc_enqueue_args {
         unsigned int              oa_agl:1;
 };
 
+extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
+                              struct lov_oinfo *loi, __u64 flags,
+                              struct ost_lvb *lvb, __u32 mode, int rc);
+
 #if 0
 int osc_extent_blocking_cb(struct ldlm_lock *lock,
                            struct ldlm_lock_desc *new, void *data,
index 9cbdcad..678c99f 100644 (file)
@@ -1801,10 +1801,10 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
  * list.
  */
 int ldlm_cancel_resource_local(struct ldlm_resource *res,
-                               cfs_list_t *cancels,
-                               ldlm_policy_data_t *policy,
-                               ldlm_mode_t mode, int lock_flags,
-                               ldlm_cancel_flags_t cancel_flags, void *opaque)
+                              cfs_list_t *cancels,
+                              ldlm_policy_data_t *policy,
+                              ldlm_mode_t mode, __u64 lock_flags,
+                              ldlm_cancel_flags_t cancel_flags, void *opaque)
 {
         struct ldlm_lock *lock;
         int count = 0;
index 72197d9..e09513c 100644 (file)
@@ -255,7 +255,7 @@ int ll_md_close(struct obd_export *md_exp, struct inode *inode,
            we can skip talking to MDS */
         if (file->f_dentry->d_inode) { /* Can this ever be false? */
                 int lockmode;
-                int flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
+               __u64 flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
                 struct lustre_handle lockh;
                 struct inode *inode = file->f_dentry->d_inode;
                 ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
@@ -2499,16 +2499,18 @@ int ll_fsync(struct file *file, struct dentry *dentry, int datasync)
 
 int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
 {
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ldlm_enqueue_info einfo = { .ei_type = LDLM_FLOCK,
-                                           .ei_cb_cp =ldlm_flock_completion_ast,
-                                           .ei_cbdata = file_lock };
-        struct md_op_data *op_data;
-        struct lustre_handle lockh = {0};
-        ldlm_policy_data_t flock = {{0}};
-        int flags = 0;
-        int rc;
+       struct inode *inode = file->f_dentry->d_inode;
+       struct ll_sb_info *sbi = ll_i2sbi(inode);
+       struct ldlm_enqueue_info einfo = {
+               .ei_type        = LDLM_FLOCK,
+               .ei_cb_cp       = ldlm_flock_completion_ast,
+               .ei_cbdata      = file_lock,
+       };
+       struct md_op_data *op_data;
+       struct lustre_handle lockh = {0};
+       ldlm_policy_data_t flock = {{0}};
+       __u64 flags = 0;
+       int rc;
        int rc2 = 0;
         ENTRY;
 
@@ -2598,9 +2600,9 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
         if (IS_ERR(op_data))
                 RETURN(PTR_ERR(op_data));
 
-        CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, "
-               "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
-               flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
+       CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags="LPX64", mode=%u, "
+              "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
+              flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
 
         rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL,
                         op_data, &lockh, &flock, 0, NULL /* req */, flags);
index d226bbc..bc44c1a 100644 (file)
@@ -1573,9 +1573,9 @@ static int lmv_done_writing(struct obd_export *exp,
 
 static int
 lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
-                   struct lookup_intent *it, struct md_op_data *op_data,
-                   struct lustre_handle *lockh, void *lmm, int lmmsize,
-                   int extra_lock_flags)
+                  struct lookup_intent *it, struct md_op_data *op_data,
+                  struct lustre_handle *lockh, void *lmm, int lmmsize,
+                  __u64 extra_lock_flags)
 {
         struct ptlrpc_request      *req = it->d.lustre.it_data;
         struct obd_device          *obd = exp->exp_obd;
index f21edef..fbca855 100644 (file)
@@ -220,7 +220,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
                        ldlm_policy_data_t *policy, __u32 mode,
                        struct lustre_handle *lockh,
                        struct lov_request_set **reqset);
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags);
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags);
 int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
                         struct lov_stripe_md *lsm,
                         __u32 mode, struct lustre_handle *lockh,
index 608307e..bb2e37a 100644 (file)
@@ -44,6 +44,7 @@
 
 #include <obd_class.h>
 #include <obd_lov.h>
+#include <obd_ost.h>
 #include <lustre/lustre_idl.h>
 
 #include "lov_internal.h"
@@ -202,13 +203,9 @@ out:
        return rc;
 }
 
-extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
-                               struct lov_oinfo *loi, int flags,
-                               struct ost_lvb *lvb, __u32 mode, int rc);
-
 static int lov_update_enqueue_lov(struct obd_export *exp,
                                  struct lustre_handle *lov_lockhp,
-                                 struct lov_oinfo *loi, int flags, int idx,
+                                 struct lov_oinfo *loi, __u64 flags, int idx,
                                  struct ost_id *oi, int rc)
 {
        struct lov_obd *lov = &exp->exp_obd->u.lov;
@@ -455,7 +452,7 @@ out_set:
         RETURN(rc);
 }
 
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags)
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags)
 {
         int rc = 0;
         ENTRY;
index e9311d8..940de9a 100644 (file)
@@ -111,9 +111,9 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
 int osc_cancel_base(struct lustre_handle *lockh, __u32 mode);
 
 int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
-                   __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                   int *flags, void *data, struct lustre_handle *lockh,
-                   int unref);
+                  __u32 type, ldlm_policy_data_t *policy, __u32 mode,
+                  __u64 *flags, void *data, struct lustre_handle *lockh,
+                  int unref);
 
 int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo,
                            struct obd_trans_info *oti,
index 6e89354..a19c80a 100644 (file)
@@ -63,23 +63,23 @@ static int osc_page_is_dlocked(const struct lu_env *env,
                                const struct osc_page *opg,
                                enum cl_lock_mode mode, int pending, int unref)
 {
-        struct cl_page         *page;
-        struct osc_object      *obj;
-        struct osc_thread_info *info;
-        struct ldlm_res_id     *resname;
-        struct lustre_handle   *lockh;
-        ldlm_policy_data_t     *policy;
-        ldlm_mode_t             dlmmode;
-        int                     flags;
-
-        cfs_might_sleep();
-
-        info = osc_env_info(env);
-        resname = &info->oti_resname;
-        policy = &info->oti_policy;
-        lockh = &info->oti_handle;
-        page = opg->ops_cl.cpl_page;
-        obj = cl2osc(opg->ops_cl.cpl_obj);
+       struct cl_page         *page;
+       struct osc_object      *obj;
+       struct osc_thread_info *info;
+       struct ldlm_res_id     *resname;
+       struct lustre_handle   *lockh;
+       ldlm_policy_data_t     *policy;
+       ldlm_mode_t             dlmmode;
+       __u64                   flags;
+
+       cfs_might_sleep();
+
+       info = osc_env_info(env);
+       resname = &info->oti_resname;
+       policy = &info->oti_policy;
+       lockh = &info->oti_handle;
+       page = opg->ops_cl.cpl_page;
+       obj = cl2osc(opg->ops_cl.cpl_obj);
 
         flags = LDLM_FL_TEST_LOCK | LDLM_FL_BLOCK_GRANTED;
         if (pending)
index 419f361..b59e668 100644 (file)
@@ -658,8 +658,8 @@ static int osc_sync(const struct lu_env *env, struct obd_export *exp,
  * @objid. Found locks are added into @cancel list. Returns the amount of
  * locks added to @cancels list. */
 static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
-                                   cfs_list_t *cancels,
-                                   ldlm_mode_t mode, int lock_flags)
+                                  cfs_list_t *cancels,
+                                  ldlm_mode_t mode, __u64 lock_flags)
 {
         struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
         struct ldlm_res_id res_id;
@@ -2434,8 +2434,8 @@ static int osc_enqueue_interpret(const struct lu_env *env,
 }
 
 void osc_update_enqueue(struct lustre_handle *lov_lockhp,
-                        struct lov_oinfo *loi, int flags,
-                        struct ost_lvb *lvb, __u32 mode, int rc)
+                       struct lov_oinfo *loi, __u64 flags,
+                       struct ost_lvb *lvb, __u32 mode, int rc)
 {
         struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp);
 
@@ -2489,19 +2489,19 @@ struct ptlrpc_request_set *PTLRPCD_SET = (void *)1;
  * release locks just after they are obtained. */
 int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
                     __u64 *flags, ldlm_policy_data_t *policy,
-                     struct ost_lvb *lvb, int kms_valid,
-                     obd_enqueue_update_f upcall, void *cookie,
-                     struct ldlm_enqueue_info *einfo,
-                     struct lustre_handle *lockh,
-                     struct ptlrpc_request_set *rqset, int async, int agl)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct ptlrpc_request *req = NULL;
-        int intent = *flags & LDLM_FL_HAS_INTENT;
-        int match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
-        ldlm_mode_t mode;
-        int rc;
-        ENTRY;
+                    struct ost_lvb *lvb, int kms_valid,
+                    obd_enqueue_update_f upcall, void *cookie,
+                    struct ldlm_enqueue_info *einfo,
+                    struct lustre_handle *lockh,
+                    struct ptlrpc_request_set *rqset, int async, int agl)
+{
+       struct obd_device *obd = exp->exp_obd;
+       struct ptlrpc_request *req = NULL;
+       int intent = *flags & LDLM_FL_HAS_INTENT;
+       __u64 match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
+       ldlm_mode_t mode;
+       int rc;
+       ENTRY;
 
         /* Filesystem lock extents are extended to page boundaries so that
          * dealing with the page cache is a little smoother.  */
@@ -2650,14 +2650,14 @@ static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo,
 }
 
 int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
-                   __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                   int *flags, void *data, struct lustre_handle *lockh,
-                   int unref)
+                  __u32 type, ldlm_policy_data_t *policy, __u32 mode,
+                  __u64 *flags, void *data, struct lustre_handle *lockh,
+                  int unref)
 {
-        struct obd_device *obd = exp->exp_obd;
-        int lflags = *flags;
-        ldlm_mode_t rc;
-        ENTRY;
+       struct obd_device *obd = exp->exp_obd;
+       __u64 lflags = *flags;
+       ldlm_mode_t rc;
+       ENTRY;
 
         if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
                 RETURN(-EIO);