Commit 875332d4 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging/lustre: fix frong ldlm flags type used

Fixed implicit conversion from 'unsigned long long' to 'int'.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/7799
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4023Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98639249
...@@ -1390,7 +1390,7 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *head, ...@@ -1390,7 +1390,7 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *head,
int ldlm_cancel_resource_local(struct ldlm_resource *res, int ldlm_cancel_resource_local(struct ldlm_resource *res,
struct list_head *cancels, struct list_head *cancels,
ldlm_policy_data_t *policy, ldlm_policy_data_t *policy,
ldlm_mode_t mode, int lock_flags, ldlm_mode_t mode, __u64 lock_flags,
ldlm_cancel_flags_t cancel_flags, void *opaque); ldlm_cancel_flags_t cancel_flags, void *opaque);
int ldlm_cli_cancel_list_local(struct list_head *cancels, int count, int ldlm_cli_cancel_list_local(struct list_head *cancels, int count,
ldlm_cancel_flags_t flags); ldlm_cancel_flags_t flags);
......
...@@ -1818,7 +1818,7 @@ static inline int md_enqueue(struct obd_export *exp, ...@@ -1818,7 +1818,7 @@ static inline int md_enqueue(struct obd_export *exp,
struct lustre_handle *lockh, struct lustre_handle *lockh,
void *lmm, int lmmsize, void *lmm, int lmmsize,
struct ptlrpc_request **req, struct ptlrpc_request **req,
int extra_lock_flags) __u64 extra_lock_flags)
{ {
int rc; int rc;
......
...@@ -87,6 +87,10 @@ struct osc_enqueue_args { ...@@ -87,6 +87,10 @@ struct osc_enqueue_args {
unsigned int oa_agl:1; 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 #if 0
int osc_extent_blocking_cb(struct ldlm_lock *lock, int osc_extent_blocking_cb(struct ldlm_lock *lock,
struct ldlm_lock_desc *new, void *data, struct ldlm_lock_desc *new, void *data,
......
...@@ -1768,7 +1768,7 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ...@@ -1768,7 +1768,7 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
int ldlm_cancel_resource_local(struct ldlm_resource *res, int ldlm_cancel_resource_local(struct ldlm_resource *res,
struct list_head *cancels, struct list_head *cancels,
ldlm_policy_data_t *policy, ldlm_policy_data_t *policy,
ldlm_mode_t mode, int lock_flags, ldlm_mode_t mode, __u64 lock_flags,
ldlm_cancel_flags_t cancel_flags, void *opaque) ldlm_cancel_flags_t cancel_flags, void *opaque)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
......
...@@ -290,7 +290,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode, ...@@ -290,7 +290,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
we can skip talking to MDS */ we can skip talking to MDS */
if (file->f_dentry->d_inode) { /* Can this ever be false? */ if (file->f_dentry->d_inode) { /* Can this ever be false? */
int lockmode; 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 lustre_handle lockh;
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}}; ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
...@@ -2623,7 +2623,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2623,7 +2623,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
struct md_op_data *op_data; struct md_op_data *op_data;
struct lustre_handle lockh = {0}; struct lustre_handle lockh = {0};
ldlm_policy_data_t flock = {{0}}; ldlm_policy_data_t flock = {{0}};
int flags = 0; __u64 flags = 0;
int rc; int rc;
int rc2 = 0; int rc2 = 0;
...@@ -2708,7 +2708,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2708,7 +2708,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
if (IS_ERR(op_data)) if (IS_ERR(op_data))
return PTR_ERR(op_data); return PTR_ERR(op_data);
CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, " CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#llx, mode=%u, "
"start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid, "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end); flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
......
...@@ -1715,7 +1715,7 @@ static int ...@@ -1715,7 +1715,7 @@ static int
lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
struct lookup_intent *it, struct md_op_data *op_data, struct lookup_intent *it, struct md_op_data *op_data,
struct lustre_handle *lockh, void *lmm, int lmmsize, struct lustre_handle *lockh, void *lmm, int lmmsize,
int extra_lock_flags) __u64 extra_lock_flags)
{ {
struct ptlrpc_request *req = it->d.lustre.it_data; struct ptlrpc_request *req = it->d.lustre.it_data;
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
......
...@@ -252,7 +252,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo, ...@@ -252,7 +252,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
ldlm_policy_data_t *policy, __u32 mode, ldlm_policy_data_t *policy, __u32 mode,
struct lustre_handle *lockh, struct lustre_handle *lockh,
struct lov_request_set **reqset); 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, int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_stripe_md *lsm, struct lov_stripe_md *lsm,
__u32 mode, struct lustre_handle *lockh, __u32 mode, struct lustre_handle *lockh,
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#include <linux/libcfs/libcfs.h> #include <linux/libcfs/libcfs.h>
#include <obd_class.h> #include <obd_class.h>
#include <obd_ost.h>
#include <lustre/lustre_idl.h> #include <lustre/lustre_idl.h>
#include "lov_internal.h" #include "lov_internal.h"
static void lov_init_set(struct lov_request_set *set) static void lov_init_set(struct lov_request_set *set)
...@@ -194,13 +194,9 @@ int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx) ...@@ -194,13 +194,9 @@ int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx)
return rc; 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, static int lov_update_enqueue_lov(struct obd_export *exp,
struct lustre_handle *lov_lockhp, 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 ost_id *oi, int rc)
{ {
struct lov_obd *lov = &exp->exp_obd->u.lov; struct lov_obd *lov = &exp->exp_obd->u.lov;
...@@ -443,7 +439,7 @@ int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo, ...@@ -443,7 +439,7 @@ int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
return rc; 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; int rc = 0;
......
...@@ -112,7 +112,7 @@ int osc_cancel_base(struct lustre_handle *lockh, __u32 mode); ...@@ -112,7 +112,7 @@ int osc_cancel_base(struct lustre_handle *lockh, __u32 mode);
int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id, int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
__u32 type, ldlm_policy_data_t *policy, __u32 mode, __u32 type, ldlm_policy_data_t *policy, __u32 mode,
int *flags, void *data, struct lustre_handle *lockh, __u64 *flags, void *data, struct lustre_handle *lockh,
int unref); int unref);
int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo, int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo,
......
...@@ -70,7 +70,7 @@ static int osc_page_is_dlocked(const struct lu_env *env, ...@@ -70,7 +70,7 @@ static int osc_page_is_dlocked(const struct lu_env *env,
struct lustre_handle *lockh; struct lustre_handle *lockh;
ldlm_policy_data_t *policy; ldlm_policy_data_t *policy;
ldlm_mode_t dlmmode; ldlm_mode_t dlmmode;
int flags; __u64 flags;
might_sleep(); might_sleep();
......
...@@ -635,7 +635,7 @@ static int osc_sync(const struct lu_env *env, struct obd_export *exp, ...@@ -635,7 +635,7 @@ static int osc_sync(const struct lu_env *env, struct obd_export *exp,
* locks added to @cancels list. */ * locks added to @cancels list. */
static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa, static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
struct list_head *cancels, struct list_head *cancels,
ldlm_mode_t mode, int lock_flags) ldlm_mode_t mode, __u64 lock_flags)
{ {
struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
struct ldlm_res_id res_id; struct ldlm_res_id res_id;
...@@ -2398,7 +2398,7 @@ static int osc_enqueue_interpret(const struct lu_env *env, ...@@ -2398,7 +2398,7 @@ static int osc_enqueue_interpret(const struct lu_env *env,
} }
void osc_update_enqueue(struct lustre_handle *lov_lockhp, void osc_update_enqueue(struct lustre_handle *lov_lockhp,
struct lov_oinfo *loi, int flags, struct lov_oinfo *loi, __u64 flags,
struct ost_lvb *lvb, __u32 mode, int rc) struct ost_lvb *lvb, __u32 mode, int rc)
{ {
struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp); struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp);
...@@ -2462,7 +2462,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, ...@@ -2462,7 +2462,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
struct ptlrpc_request *req = NULL; struct ptlrpc_request *req = NULL;
int intent = *flags & LDLM_FL_HAS_INTENT; int intent = *flags & LDLM_FL_HAS_INTENT;
int match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY); __u64 match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
ldlm_mode_t mode; ldlm_mode_t mode;
int rc; int rc;
...@@ -2613,11 +2613,11 @@ static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo, ...@@ -2613,11 +2613,11 @@ 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, int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
__u32 type, ldlm_policy_data_t *policy, __u32 mode, __u32 type, ldlm_policy_data_t *policy, __u32 mode,
int *flags, void *data, struct lustre_handle *lockh, __u64 *flags, void *data, struct lustre_handle *lockh,
int unref) int unref)
{ {
struct obd_device *obd = exp->exp_obd; struct obd_device *obd = exp->exp_obd;
int lflags = *flags; __u64 lflags = *flags;
ldlm_mode_t rc; ldlm_mode_t rc;
if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH)) if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment