staging: lustre: fix inappropriate enums declarations.
Signed-off-by: Hugues Morisset <morisset.hugues@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
498374f7b6
commit
fe67299757
3 changed files with 7 additions and 11 deletions
|
@ -589,13 +589,11 @@ enum placement_policy {
|
||||||
PLACEMENT_MAX_POLICY
|
PLACEMENT_MAX_POLICY
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum placement_policy placement_policy_t;
|
|
||||||
|
|
||||||
struct lmv_obd {
|
struct lmv_obd {
|
||||||
int refcount;
|
int refcount;
|
||||||
struct lu_client_fld lmv_fld;
|
struct lu_client_fld lmv_fld;
|
||||||
spinlock_t lmv_lock;
|
spinlock_t lmv_lock;
|
||||||
placement_policy_t lmv_placement;
|
enum placement_policy lmv_placement;
|
||||||
struct lmv_desc desc;
|
struct lmv_desc desc;
|
||||||
struct obd_uuid cluuid;
|
struct obd_uuid cluuid;
|
||||||
struct obd_export *exp;
|
struct obd_export *exp;
|
||||||
|
@ -1086,16 +1084,14 @@ enum op_cli_flags {
|
||||||
|
|
||||||
struct md_enqueue_info;
|
struct md_enqueue_info;
|
||||||
/* metadata stat-ahead */
|
/* metadata stat-ahead */
|
||||||
typedef int (* md_enqueue_cb_t)(struct ptlrpc_request *req,
|
|
||||||
struct md_enqueue_info *minfo,
|
|
||||||
int rc);
|
|
||||||
|
|
||||||
struct md_enqueue_info {
|
struct md_enqueue_info {
|
||||||
struct md_op_data mi_data;
|
struct md_op_data mi_data;
|
||||||
struct lookup_intent mi_it;
|
struct lookup_intent mi_it;
|
||||||
struct lustre_handle mi_lockh;
|
struct lustre_handle mi_lockh;
|
||||||
struct inode *mi_dir;
|
struct inode *mi_dir;
|
||||||
md_enqueue_cb_t mi_cb;
|
int (*mi_cb)(struct ptlrpc_request *req,
|
||||||
|
struct md_enqueue_info *minfo, int rc);
|
||||||
__u64 mi_cbdata;
|
__u64 mi_cbdata;
|
||||||
unsigned int mi_generation;
|
unsigned int mi_generation;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1189,7 +1189,7 @@ static int lmv_nid_policy(struct lmv_obd *lmv)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lmv_choose_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
|
static int lmv_choose_mds(struct lmv_obd *lmv, struct md_op_data *op_data,
|
||||||
placement_policy_t placement)
|
enum placement_policy placement)
|
||||||
{
|
{
|
||||||
switch (placement) {
|
switch (placement) {
|
||||||
case PLACEMENT_CHAR_POLICY:
|
case PLACEMENT_CHAR_POLICY:
|
||||||
|
|
|
@ -58,7 +58,7 @@ static const char *placement_name[] = {
|
||||||
[PLACEMENT_INVAL_POLICY] = "INVAL"
|
[PLACEMENT_INVAL_POLICY] = "INVAL"
|
||||||
};
|
};
|
||||||
|
|
||||||
static placement_policy_t placement_name2policy(char *name, int len)
|
static enum placement_policy placement_name2policy(char *name, int len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ static placement_policy_t placement_name2policy(char *name, int len)
|
||||||
return PLACEMENT_INVAL_POLICY;
|
return PLACEMENT_INVAL_POLICY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *placement_policy2name(placement_policy_t placement)
|
static const char *placement_policy2name(enum placement_policy placement)
|
||||||
{
|
{
|
||||||
LASSERT(placement < PLACEMENT_MAX_POLICY);
|
LASSERT(placement < PLACEMENT_MAX_POLICY);
|
||||||
return placement_name[placement];
|
return placement_name[placement];
|
||||||
|
@ -94,7 +94,7 @@ static ssize_t lmv_placement_seq_write(struct file *file,
|
||||||
struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
|
struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
|
||||||
char dummy[MAX_POLICY_STRING_SIZE + 1];
|
char dummy[MAX_POLICY_STRING_SIZE + 1];
|
||||||
int len = count;
|
int len = count;
|
||||||
placement_policy_t policy;
|
enum placement_policy policy;
|
||||||
struct lmv_obd *lmv;
|
struct lmv_obd *lmv;
|
||||||
|
|
||||||
if (copy_from_user(dummy, buffer, MAX_POLICY_STRING_SIZE))
|
if (copy_from_user(dummy, buffer, MAX_POLICY_STRING_SIZE))
|
||||||
|
|
Loading…
Add table
Reference in a new issue