Commit c9f6bb96 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: lustre: add a blank line after function/struct/union/enum declarations

Fixes checkpatch.pl CHECK:LINE_SPACING: Please use a blank line after
function/struct/union/enum declarations

The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --fix-inplace -f $f
done
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 106495c4
...@@ -1119,6 +1119,7 @@ static inline int __page_in_use(const struct cl_page *page, int refc) ...@@ -1119,6 +1119,7 @@ static inline int __page_in_use(const struct cl_page *page, int refc)
LASSERT(atomic_read(&page->cp_ref) > 0); LASSERT(atomic_read(&page->cp_ref) > 0);
return (atomic_read(&page->cp_ref) > refc); return (atomic_read(&page->cp_ref) > refc);
} }
#define cl_page_in_use(pg) __page_in_use(pg, 1) #define cl_page_in_use(pg) __page_in_use(pg, 1)
#define cl_page_in_use_noref(pg) __page_in_use(pg, 0) #define cl_page_in_use_noref(pg) __page_in_use(pg, 0)
......
...@@ -158,6 +158,7 @@ struct lprocfs_counter { ...@@ -158,6 +158,7 @@ struct lprocfs_counter {
*/ */
__s64 lc_array_sum[1]; __s64 lc_array_sum[1];
}; };
#define lc_sum lc_array_sum[0] #define lc_sum lc_array_sum[0]
#define lc_sum_irq lc_array_sum[1] #define lc_sum_irq lc_array_sum[1]
...@@ -369,6 +370,7 @@ static inline void s2dhms(struct dhms *ts, time64_t secs64) ...@@ -369,6 +370,7 @@ static inline void s2dhms(struct dhms *ts, time64_t secs64)
ts->m = secs / 60; ts->m = secs / 60;
ts->s = secs % 60; ts->s = secs % 60;
} }
#define DHMS_FMT "%dd%dh%02dm%02ds" #define DHMS_FMT "%dd%dh%02dm%02ds"
#define DHMS_VARS(x) (x)->d, (x)->h, (x)->m, (x)->s #define DHMS_VARS(x) (x)->d, (x)->h, (x)->m, (x)->s
......
...@@ -321,6 +321,7 @@ enum lma_incompat { ...@@ -321,6 +321,7 @@ enum lma_incompat {
LMAI_REMOTE_PARENT = 0x00000004, /* the parent of the object LMAI_REMOTE_PARENT = 0x00000004, /* the parent of the object
is on the remote MDT */ is on the remote MDT */
}; };
#define LMA_INCOMPAT_SUPP (LMAI_AGENT | LMAI_REMOTE_PARENT) #define LMA_INCOMPAT_SUPP (LMAI_AGENT | LMAI_REMOTE_PARENT)
/** /**
...@@ -1044,6 +1045,7 @@ static inline int lu_dirent_size(struct lu_dirent *ent) ...@@ -1044,6 +1045,7 @@ static inline int lu_dirent_size(struct lu_dirent *ent)
struct lustre_handle { struct lustre_handle {
__u64 cookie; __u64 cookie;
}; };
#define DEAD_HANDLE_MAGIC 0xdeadbeefcafebabeULL #define DEAD_HANDLE_MAGIC 0xdeadbeefcafebabeULL
static inline int lustre_handle_is_used(struct lustre_handle *lh) static inline int lustre_handle_is_used(struct lustre_handle *lh)
...@@ -1108,6 +1110,7 @@ struct ptlrpc_body_v3 { ...@@ -1108,6 +1110,7 @@ struct ptlrpc_body_v3 {
__u64 pb_padding[4]; __u64 pb_padding[4];
char pb_jobid[JOBSTATS_JOBID_SIZE]; char pb_jobid[JOBSTATS_JOBID_SIZE];
}; };
#define ptlrpc_body ptlrpc_body_v3 #define ptlrpc_body ptlrpc_body_v3
struct ptlrpc_body_v2 { struct ptlrpc_body_v2 {
...@@ -1388,6 +1391,7 @@ struct obd_connect_data { ...@@ -1388,6 +1391,7 @@ struct obd_connect_data {
__u64 paddingE; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingE; /* added 2.1.0. also fix lustre_swab_connect */
__u64 paddingF; /* added 2.1.0. also fix lustre_swab_connect */ __u64 paddingF; /* added 2.1.0. also fix lustre_swab_connect */
}; };
/* XXX README XXX: /* XXX README XXX:
* Please DO NOT use any fields here before first ensuring that this same * Please DO NOT use any fields here before first ensuring that this same
* field is not in use on some other branch. Please clear any such changes * field is not in use on some other branch. Please clear any such changes
...@@ -1932,6 +1936,7 @@ enum { ...@@ -1932,6 +1936,7 @@ enum {
LQUOTA_LAST_RES, LQUOTA_LAST_RES,
LQUOTA_FIRST_RES = LQUOTA_RES_MD LQUOTA_FIRST_RES = LQUOTA_RES_MD
}; };
#define LQUOTA_NR_RES (LQUOTA_LAST_RES - LQUOTA_FIRST_RES + 1) #define LQUOTA_NR_RES (LQUOTA_LAST_RES - LQUOTA_FIRST_RES + 1)
/* /*
...@@ -1979,6 +1984,7 @@ struct ldlm_gl_lquota_desc { ...@@ -1979,6 +1984,7 @@ struct ldlm_gl_lquota_desc {
__u64 gl_time; __u64 gl_time;
__u64 gl_pad2; __u64 gl_pad2;
}; };
#define gl_qunit gl_hardlimit /* current qunit value used when #define gl_qunit gl_hardlimit /* current qunit value used when
* glimpsing per-ID quota locks */ * glimpsing per-ID quota locks */
......
...@@ -833,6 +833,7 @@ struct ioc_data_version { ...@@ -833,6 +833,7 @@ struct ioc_data_version {
__u64 idv_version; __u64 idv_version;
__u64 idv_flags; /* See LL_DV_xxx */ __u64 idv_flags; /* See LL_DV_xxx */
}; };
#define LL_DV_NOFLUSH 0x01 /* Do not take READ EXTENT LOCK before sampling #define LL_DV_NOFLUSH 0x01 /* Do not take READ EXTENT LOCK before sampling
version. Dirty caches are left unchanged. */ version. Dirty caches are left unchanged. */
...@@ -877,6 +878,7 @@ enum hsm_progress_states { ...@@ -877,6 +878,7 @@ enum hsm_progress_states {
HPS_RUNNING = 2, HPS_RUNNING = 2,
HPS_DONE = 3, HPS_DONE = 3,
}; };
#define HPS_NONE 0 #define HPS_NONE 0
static inline char *hsm_progress_state2name(enum hsm_progress_states s) static inline char *hsm_progress_state2name(enum hsm_progress_states s)
...@@ -1101,6 +1103,7 @@ static inline int cfs_size_round (int val) ...@@ -1101,6 +1103,7 @@ static inline int cfs_size_round (int val)
{ {
return (val + 7) & (~0x7); return (val + 7) & (~0x7);
} }
#define HAVE_CFS_SIZE_ROUND #define HAVE_CFS_SIZE_ROUND
#endif #endif
...@@ -1112,6 +1115,7 @@ static inline struct hsm_action_item *hai_zero(struct hsm_action_list *hal) ...@@ -1112,6 +1115,7 @@ static inline struct hsm_action_item *hai_zero(struct hsm_action_list *hal)
hal_fsname) hal_fsname)
+ 1)); + 1));
} }
/* Return pointer to next hai */ /* Return pointer to next hai */
static inline struct hsm_action_item *hai_next(struct hsm_action_item *hai) static inline struct hsm_action_item *hai_next(struct hsm_action_item *hai)
{ {
......
...@@ -515,6 +515,7 @@ struct ldlm_interval { ...@@ -515,6 +515,7 @@ struct ldlm_interval {
struct list_head li_group; /* the locks which have the same struct list_head li_group; /* the locks which have the same
* policy - group of the policy */ * policy - group of the policy */
}; };
#define to_ldlm_interval(n) container_of(n, struct ldlm_interval, li_node) #define to_ldlm_interval(n) container_of(n, struct ldlm_interval, li_node)
/** /**
......
...@@ -77,6 +77,7 @@ struct portals_handle { ...@@ -77,6 +77,7 @@ struct portals_handle {
unsigned int h_size:31; unsigned int h_size:31;
unsigned int h_in:1; unsigned int h_in:1;
}; };
#define RCU2HANDLE(rcu) container_of(rcu, struct portals_handle, h_rcu) #define RCU2HANDLE(rcu) container_of(rcu, struct portals_handle, h_rcu)
/* handles.c */ /* handles.c */
......
...@@ -352,6 +352,7 @@ static inline void at_reset(struct adaptive_timeout *at, int val) ...@@ -352,6 +352,7 @@ static inline void at_reset(struct adaptive_timeout *at, int val)
at->at_worst_time = ktime_get_real_seconds(); at->at_worst_time = ktime_get_real_seconds();
spin_unlock(&at->at_lock); spin_unlock(&at->at_lock);
} }
static inline void at_init(struct adaptive_timeout *at, int val, int flags) static inline void at_init(struct adaptive_timeout *at, int val, int flags)
{ {
memset(at, 0, sizeof(*at)); memset(at, 0, sizeof(*at));
...@@ -359,11 +360,13 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags) ...@@ -359,11 +360,13 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags)
at->at_flags = flags; at->at_flags = flags;
at_reset(at, val); at_reset(at, val);
} }
extern unsigned int at_min; extern unsigned int at_min;
static inline int at_get(struct adaptive_timeout *at) static inline int at_get(struct adaptive_timeout *at)
{ {
return (at->at_current > at_min) ? at->at_current : at_min; return (at->at_current > at_min) ? at->at_current : at_min;
} }
int at_measured(struct adaptive_timeout *at, unsigned int val); int at_measured(struct adaptive_timeout *at, unsigned int val);
int import_at_get_index(struct obd_import *imp, int portal); int import_at_get_index(struct obd_import *imp, int portal);
extern unsigned int at_max; extern unsigned int at_max;
......
...@@ -97,6 +97,7 @@ struct obd_client_handle { ...@@ -97,6 +97,7 @@ struct obd_client_handle {
__u32 och_magic; __u32 och_magic;
fmode_t och_flags; fmode_t och_flags;
}; };
#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed #define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
/* statfs_pack.c */ /* statfs_pack.c */
......
...@@ -1545,6 +1545,7 @@ static inline bool ptlrpc_nrs_req_can_move(struct ptlrpc_request *req) ...@@ -1545,6 +1545,7 @@ static inline bool ptlrpc_nrs_req_can_move(struct ptlrpc_request *req)
*/ */
return nrq->nr_enqueued && !nrq->nr_started && !req->rq_hp; return nrq->nr_enqueued && !nrq->nr_started && !req->rq_hp;
} }
/** @} nrs */ /** @} nrs */
/** /**
...@@ -2394,10 +2395,12 @@ static inline void ptlrpc_free_bulk_pin(struct ptlrpc_bulk_desc *bulk) ...@@ -2394,10 +2395,12 @@ static inline void ptlrpc_free_bulk_pin(struct ptlrpc_bulk_desc *bulk)
{ {
__ptlrpc_free_bulk(bulk, 1); __ptlrpc_free_bulk(bulk, 1);
} }
static inline void ptlrpc_free_bulk_nopin(struct ptlrpc_bulk_desc *bulk) static inline void ptlrpc_free_bulk_nopin(struct ptlrpc_bulk_desc *bulk)
{ {
__ptlrpc_free_bulk(bulk, 0); __ptlrpc_free_bulk(bulk, 0);
} }
void __ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc, void __ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc,
struct page *page, int pageoffset, int len, int); struct page *page, int pageoffset, int len, int);
static inline void ptlrpc_prep_bulk_page_pin(struct ptlrpc_bulk_desc *desc, static inline void ptlrpc_prep_bulk_page_pin(struct ptlrpc_bulk_desc *desc,
...@@ -2837,6 +2840,7 @@ void client_destroy_import(struct obd_import *imp); ...@@ -2837,6 +2840,7 @@ void client_destroy_import(struct obd_import *imp);
enum timeout_event { enum timeout_event {
TIMEOUT_GRANT = 1 TIMEOUT_GRANT = 1
}; };
struct timeout_item; struct timeout_item;
typedef int (*timeout_cb_t)(struct timeout_item *, void *); typedef int (*timeout_cb_t)(struct timeout_item *, void *);
int ptlrpc_pinger_add_import(struct obd_import *imp); int ptlrpc_pinger_add_import(struct obd_import *imp);
......
...@@ -362,6 +362,7 @@ struct client_obd { ...@@ -362,6 +362,7 @@ struct client_obd {
/* hash tables for osc_quota_info */ /* hash tables for osc_quota_info */
struct cfs_hash *cl_quota_hash[MAXQUOTAS]; struct cfs_hash *cl_quota_hash[MAXQUOTAS];
}; };
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid) #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
struct obd_id_info { struct obd_id_info {
...@@ -403,6 +404,7 @@ struct lov_statfs_data { ...@@ -403,6 +404,7 @@ struct lov_statfs_data {
struct obd_info lsd_oi; struct obd_info lsd_oi;
struct obd_statfs lsd_statfs; struct obd_statfs lsd_statfs;
}; };
/* Stripe placement optimization */ /* Stripe placement optimization */
struct lov_qos { struct lov_qos {
struct list_head lq_oss_list; /* list of OSSs that targets use */ struct list_head lq_oss_list; /* list of OSSs that targets use */
......
...@@ -133,6 +133,7 @@ struct config_llog_instance { ...@@ -133,6 +133,7 @@ struct config_llog_instance {
int cfg_last_idx; /* for partial llog processing */ int cfg_last_idx; /* for partial llog processing */
int cfg_flags; int cfg_flags;
}; };
int class_config_parse_llog(const struct lu_env *env, struct llog_ctxt *ctxt, int class_config_parse_llog(const struct lu_env *env, struct llog_ctxt *ctxt,
char *name, struct config_llog_instance *cfg); char *name, struct config_llog_instance *cfg);
enum { enum {
......
...@@ -879,6 +879,7 @@ static ssize_t cancel_unused_locks_before_replay_show(struct kobject *kobj, ...@@ -879,6 +879,7 @@ static ssize_t cancel_unused_locks_before_replay_show(struct kobject *kobj,
{ {
return sprintf(buf, "%d\n", ldlm_cancel_unused_locks_before_replay); return sprintf(buf, "%d\n", ldlm_cancel_unused_locks_before_replay);
} }
static ssize_t cancel_unused_locks_before_replay_store(struct kobject *kobj, static ssize_t cancel_unused_locks_before_replay_store(struct kobject *kobj,
struct attribute *attr, struct attribute *attr,
const char *buffer, const char *buffer,
......
...@@ -474,6 +474,7 @@ static int lprocfs_pool_state_seq_show(struct seq_file *m, void *unused) ...@@ -474,6 +474,7 @@ static int lprocfs_pool_state_seq_show(struct seq_file *m, void *unused)
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(lprocfs_pool_state); LPROC_SEQ_FOPS_RO(lprocfs_pool_state);
static ssize_t grant_speed_show(struct kobject *kobj, struct attribute *attr, static ssize_t grant_speed_show(struct kobject *kobj, struct attribute *attr,
......
...@@ -77,6 +77,7 @@ lprocfs_wr_dump_ns(struct file *file, const char __user *buffer, ...@@ -77,6 +77,7 @@ lprocfs_wr_dump_ns(struct file *file, const char __user *buffer,
ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE); ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE);
return count; return count;
} }
LPROC_SEQ_FOPS_WR_ONLY(ldlm, dump_ns); LPROC_SEQ_FOPS_WR_ONLY(ldlm, dump_ns);
LPROC_SEQ_FOPS_RW_TYPE(ldlm_rw, uint); LPROC_SEQ_FOPS_RW_TYPE(ldlm_rw, uint);
...@@ -426,6 +427,7 @@ static int ldlm_namespace_debugfs_register(struct ldlm_namespace *ns) ...@@ -426,6 +427,7 @@ static int ldlm_namespace_debugfs_register(struct ldlm_namespace *ns)
return 0; return 0;
} }
#undef MAX_STRING_SIZE #undef MAX_STRING_SIZE
static struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res) static struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res)
......
...@@ -562,6 +562,7 @@ int libcfs_debug_mark_buffer(const char *text) ...@@ -562,6 +562,7 @@ int libcfs_debug_mark_buffer(const char *text)
return 0; return 0;
} }
#undef DEBUG_SUBSYSTEM #undef DEBUG_SUBSYSTEM
#define DEBUG_SUBSYSTEM S_LNET #define DEBUG_SUBSYSTEM S_LNET
......
...@@ -100,6 +100,7 @@ struct kkuc_reg { ...@@ -100,6 +100,7 @@ struct kkuc_reg {
struct file *kr_fp; struct file *kr_fp;
__u32 kr_data; __u32 kr_data;
}; };
static struct list_head kkuc_groups[KUC_GRP_MAX+1] = {}; static struct list_head kkuc_groups[KUC_GRP_MAX+1] = {};
/* Protect message sending against remove and adds */ /* Protect message sending against remove and adds */
static DECLARE_RWSEM(kg_sem); static DECLARE_RWSEM(kg_sem);
......
...@@ -82,6 +82,7 @@ static int adler32_update(struct shash_desc *desc, const u8 *data, ...@@ -82,6 +82,7 @@ static int adler32_update(struct shash_desc *desc, const u8 *data,
*cksump = __adler32(*cksump, data, len); *cksump = __adler32(*cksump, data, len);
return 0; return 0;
} }
static int __adler32_finup(u32 *cksump, const u8 *data, unsigned int len, static int __adler32_finup(u32 *cksump, const u8 *data, unsigned int len,
u8 *out) u8 *out)
{ {
...@@ -109,6 +110,7 @@ static int adler32_digest(struct shash_desc *desc, const u8 *data, ...@@ -109,6 +110,7 @@ static int adler32_digest(struct shash_desc *desc, const u8 *data,
return __adler32_finup(crypto_shash_ctx(desc->tfm), data, len, return __adler32_finup(crypto_shash_ctx(desc->tfm), data, len,
out); out);
} }
static struct shash_alg alg = { static struct shash_alg alg = {
.setkey = adler32_setkey, .setkey = adler32_setkey,
.init = adler32_init, .init = adler32_init,
......
...@@ -280,6 +280,7 @@ int cfs_crypto_register(void) ...@@ -280,6 +280,7 @@ int cfs_crypto_register(void)
cfs_crypto_test_hashes(); cfs_crypto_test_hashes();
return 0; return 0;
} }
void cfs_crypto_unregister(void) void cfs_crypto_unregister(void)
{ {
if (adler32 == 0) if (adler32 == 0)
......
...@@ -1449,6 +1449,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, ...@@ -1449,6 +1449,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
return rc; return rc;
} }
int ll_statfs(struct dentry *de, struct kstatfs *sfs) int ll_statfs(struct dentry *de, struct kstatfs *sfs)
{ {
struct super_block *sb = de->d_sb; struct super_block *sb = de->d_sb;
......
...@@ -218,6 +218,7 @@ static int ll_site_stats_seq_show(struct seq_file *m, void *v) ...@@ -218,6 +218,7 @@ static int ll_site_stats_seq_show(struct seq_file *m, void *v)
*/ */
return cl_site_stats_print(lu2cl_site(ll_s2sbi(sb)->ll_site), m); return cl_site_stats_print(lu2cl_site(ll_s2sbi(sb)->ll_site), m);
} }
LPROC_SEQ_FOPS_RO(ll_site_stats); LPROC_SEQ_FOPS_RO(ll_site_stats);
static ssize_t max_read_ahead_mb_show(struct kobject *kobj, static ssize_t max_read_ahead_mb_show(struct kobject *kobj,
...@@ -478,6 +479,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, ...@@ -478,6 +479,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file,
} }
return rc; return rc;
} }
LPROC_SEQ_FOPS(ll_max_cached_mb); LPROC_SEQ_FOPS(ll_max_cached_mb);
static ssize_t checksum_pages_show(struct kobject *kobj, struct attribute *attr, static ssize_t checksum_pages_show(struct kobject *kobj, struct attribute *attr,
...@@ -684,6 +686,7 @@ static int ll_statahead_stats_seq_show(struct seq_file *m, void *v) ...@@ -684,6 +686,7 @@ static int ll_statahead_stats_seq_show(struct seq_file *m, void *v)
atomic_read(&sbi->ll_agl_total)); atomic_read(&sbi->ll_agl_total));
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(ll_statahead_stats); LPROC_SEQ_FOPS_RO(ll_statahead_stats);
static ssize_t lazystatfs_show(struct kobject *kobj, static ssize_t lazystatfs_show(struct kobject *kobj,
...@@ -775,6 +778,7 @@ static int ll_sbi_flags_seq_show(struct seq_file *m, void *v) ...@@ -775,6 +778,7 @@ static int ll_sbi_flags_seq_show(struct seq_file *m, void *v)
seq_printf(m, "\b\n"); seq_printf(m, "\b\n");
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(ll_sbi_flags); LPROC_SEQ_FOPS_RO(ll_sbi_flags);
static ssize_t xattr_cache_show(struct kobject *kobj, static ssize_t xattr_cache_show(struct kobject *kobj,
...@@ -1093,6 +1097,7 @@ void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi) ...@@ -1093,6 +1097,7 @@ void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi)
lprocfs_free_stats(&sbi->ll_stats); lprocfs_free_stats(&sbi->ll_stats);
} }
} }
#undef MAX_STRING_SIZE #undef MAX_STRING_SIZE
#define pct(a, b) (b ? a * 100 / b : 0) #define pct(a, b) (b ? a * 100 / b : 0)
...@@ -1287,6 +1292,7 @@ static ssize_t ll_rw_extents_stats_seq_write(struct file *file, ...@@ -1287,6 +1292,7 @@ static ssize_t ll_rw_extents_stats_seq_write(struct file *file,
return len; return len;
} }
LPROC_SEQ_FOPS(ll_rw_extents_stats); LPROC_SEQ_FOPS(ll_rw_extents_stats);
void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,
......
...@@ -528,6 +528,7 @@ static inline int stride_io_mode(struct ll_readahead_state *ras) ...@@ -528,6 +528,7 @@ static inline int stride_io_mode(struct ll_readahead_state *ras)
{ {
return ras->ras_consecutive_stride_requests > 1; return ras->ras_consecutive_stride_requests > 1;
} }
/* The function calculates how much pages will be read in /* The function calculates how much pages will be read in
* [off, off + length], in such stride IO area, * [off, off + length], in such stride IO area,
* stride_offset = st_off, stride_length = st_len, * stride_offset = st_off, stride_length = st_len,
......
...@@ -143,6 +143,7 @@ static int lmv_desc_uuid_seq_show(struct seq_file *m, void *v) ...@@ -143,6 +143,7 @@ static int lmv_desc_uuid_seq_show(struct seq_file *m, void *v)
seq_printf(m, "%s\n", lmv->desc.ld_uuid.uuid); seq_printf(m, "%s\n", lmv->desc.ld_uuid.uuid);
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(lmv_desc_uuid); LPROC_SEQ_FOPS_RO(lmv_desc_uuid);
static void *lmv_tgt_seq_start(struct seq_file *p, loff_t *pos) static void *lmv_tgt_seq_start(struct seq_file *p, loff_t *pos)
......
...@@ -51,6 +51,7 @@ static inline void lov_sub_enter(struct lov_io_sub *sub) ...@@ -51,6 +51,7 @@ static inline void lov_sub_enter(struct lov_io_sub *sub)
{ {
sub->sub_reenter++; sub->sub_reenter++;
} }
static inline void lov_sub_exit(struct lov_io_sub *sub) static inline void lov_sub_exit(struct lov_io_sub *sub)
{ {
sub->sub_reenter--; sub->sub_reenter--;
...@@ -989,4 +990,5 @@ int lov_io_init_released(const struct lu_env *env, struct cl_object *obj, ...@@ -989,4 +990,5 @@ int lov_io_init_released(const struct lu_env *env, struct cl_object *obj,
io->ci_result = result < 0 ? result : 0; io->ci_result = result < 0 ? result : 0;
return result != 0; return result != 0;
} }
/** @} lov */ /** @} lov */
...@@ -71,6 +71,7 @@ static ssize_t lov_stripesize_seq_write(struct file *file, ...@@ -71,6 +71,7 @@ static ssize_t lov_stripesize_seq_write(struct file *file,
desc->ld_default_stripe_size = val; desc->ld_default_stripe_size = val;
return count; return count;
} }
LPROC_SEQ_FOPS(lov_stripesize); LPROC_SEQ_FOPS(lov_stripesize);
static int lov_stripeoffset_seq_show(struct seq_file *m, void *v) static int lov_stripeoffset_seq_show(struct seq_file *m, void *v)
...@@ -102,6 +103,7 @@ static ssize_t lov_stripeoffset_seq_write(struct file *file, ...@@ -102,6 +103,7 @@ static ssize_t lov_stripeoffset_seq_write(struct file *file,
desc->ld_default_stripe_offset = val; desc->ld_default_stripe_offset = val;
return count; return count;
} }
LPROC_SEQ_FOPS(lov_stripeoffset); LPROC_SEQ_FOPS(lov_stripeoffset);
static int lov_stripetype_seq_show(struct seq_file *m, void *v) static int lov_stripetype_seq_show(struct seq_file *m, void *v)
...@@ -133,6 +135,7 @@ static ssize_t lov_stripetype_seq_write(struct file *file, ...@@ -133,6 +135,7 @@ static ssize_t lov_stripetype_seq_write(struct file *file,
desc->ld_pattern = val; desc->ld_pattern = val;
return count; return count;
} }
LPROC_SEQ_FOPS(lov_stripetype); LPROC_SEQ_FOPS(lov_stripetype);
static int lov_stripecount_seq_show(struct seq_file *m, void *v) static int lov_stripecount_seq_show(struct seq_file *m, void *v)
...@@ -164,6 +167,7 @@ static ssize_t lov_stripecount_seq_write(struct file *file, ...@@ -164,6 +167,7 @@ static ssize_t lov_stripecount_seq_write(struct file *file,
desc->ld_default_stripe_count = val; desc->ld_default_stripe_count = val;
return count; return count;
} }
LPROC_SEQ_FOPS(lov_stripecount); LPROC_SEQ_FOPS(lov_stripecount);
static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr, static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr,
...@@ -200,6 +204,7 @@ static int lov_desc_uuid_seq_show(struct seq_file *m, void *v) ...@@ -200,6 +204,7 @@ static int lov_desc_uuid_seq_show(struct seq_file *m, void *v)
seq_printf(m, "%s\n", lov->desc.ld_uuid.uuid); seq_printf(m, "%s\n", lov->desc.ld_uuid.uuid);
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(lov_desc_uuid); LPROC_SEQ_FOPS_RO(lov_desc_uuid);
static void *lov_tgt_seq_start(struct seq_file *p, loff_t *pos) static void *lov_tgt_seq_start(struct seq_file *p, loff_t *pos)
......
...@@ -52,6 +52,7 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v) ...@@ -52,6 +52,7 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v)
{ {
return lprocfs_mgc_rd_ir_state(m, m->private); return lprocfs_mgc_rd_ir_state(m, m->private);
} }
LPROC_SEQ_FOPS_RO(mgc_ir_state); LPROC_SEQ_FOPS_RO(mgc_ir_state);
static struct lprocfs_vars lprocfs_mgc_obd_vars[] = { static struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
......
...@@ -138,6 +138,7 @@ static void cl_lock_trace0(int level, const struct lu_env *env, ...@@ -138,6 +138,7 @@ static void cl_lock_trace0(int level, const struct lu_env *env,
env, h->coh_nesting, cl_lock_nr_mutexed(env), env, h->coh_nesting, cl_lock_nr_mutexed(env),
func, line); func, line);
} }
#define cl_lock_trace(level, env, prefix, lock) \ #define cl_lock_trace(level, env, prefix, lock) \
cl_lock_trace0(level, env, prefix, lock, __func__, __LINE__) cl_lock_trace0(level, env, prefix, lock, __func__, __LINE__)
......
...@@ -1308,6 +1308,7 @@ int obd_zombie_impexp_init(void) ...@@ -1308,6 +1308,7 @@ int obd_zombie_impexp_init(void)
wait_for_completion(&obd_zombie_start); wait_for_completion(&obd_zombie_start);
return 0; return 0;
} }
/** /**
* stop destroy zombie import/export thread * stop destroy zombie import/export thread
*/ */
......
...@@ -587,6 +587,7 @@ static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m) ...@@ -587,6 +587,7 @@ static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m)
flag2str(pingable, first); flag2str(pingable, first);
return 0; return 0;
} }
#undef flags2str #undef flags2str
static void obd_connect_seq_flags2str(struct seq_file *m, __u64 flags, char *sep) static void obd_connect_seq_flags2str(struct seq_file *m, __u64 flags, char *sep)
......
...@@ -322,6 +322,7 @@ static const struct cl_page_operations echo_page_ops = { ...@@ -322,6 +322,7 @@ static const struct cl_page_operations echo_page_ops = {
} }
} }
}; };
/** @} echo_page */ /** @} echo_page */
/** \defgroup echo_lock Locking /** \defgroup echo_lock Locking
...@@ -417,6 +418,7 @@ static const struct cl_object_operations echo_cl_obj_ops = { ...@@ -417,6 +418,7 @@ static const struct cl_object_operations echo_cl_obj_ops = {
.coo_io_init = echo_io_init, .coo_io_init = echo_io_init,
.coo_conf_set = echo_conf_set .coo_conf_set = echo_conf_set
}; };
/** @} echo_cl_ops */ /** @} echo_cl_ops */
/** \defgroup echo_lu_ops lu_object operations /** \defgroup echo_lu_ops lu_object operations
...@@ -547,6 +549,7 @@ static const struct lu_object_operations echo_lu_obj_ops = { ...@@ -547,6 +549,7 @@ static const struct lu_object_operations echo_lu_obj_ops = {
.loo_object_print = echo_object_print, .loo_object_print = echo_object_print,
.loo_object_invariant = NULL .loo_object_invariant = NULL
}; };
/** @} echo_lu_ops */ /** @} echo_lu_ops */
/** \defgroup echo_lu_dev_ops lu_device operations /** \defgroup echo_lu_dev_ops lu_device operations
...@@ -918,6 +921,7 @@ static struct lu_device_type echo_device_type = { ...@@ -918,6 +921,7 @@ static struct lu_device_type echo_device_type = {
.ldt_ops = &echo_device_type_ops, .ldt_ops = &echo_device_type_ops,
.ldt_ctx_tags = LCT_CL_THREAD, .ldt_ctx_tags = LCT_CL_THREAD,
}; };
/** @} echo_init */ /** @} echo_init */
/** \defgroup echo_exports Exported operations /** \defgroup echo_exports Exported operations
...@@ -1257,6 +1261,7 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset, ...@@ -1257,6 +1261,7 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset,
cl_env_put(env, &refcheck); cl_env_put(env, &refcheck);
return rc; return rc;
} }
/** @} echo_exports */ /** @} echo_exports */
static u64 last_object_id; static u64 last_object_id;
......
...@@ -227,6 +227,7 @@ static ssize_t osc_cached_mb_seq_write(struct file *file, ...@@ -227,6 +227,7 @@ static ssize_t osc_cached_mb_seq_write(struct file *file,
return count; return count;
} }
LPROC_SEQ_FOPS(osc_cached_mb); LPROC_SEQ_FOPS(osc_cached_mb);
static ssize_t cur_dirty_bytes_show(struct kobject *kobj, static ssize_t cur_dirty_bytes_show(struct kobject *kobj,
...@@ -427,6 +428,7 @@ static ssize_t osc_checksum_type_seq_write(struct file *file, ...@@ -427,6 +428,7 @@ static ssize_t osc_checksum_type_seq_write(struct file *file,
} }
return -EINVAL; return -EINVAL;
} }
LPROC_SEQ_FOPS(osc_checksum_type); LPROC_SEQ_FOPS(osc_checksum_type);
static ssize_t resend_count_show(struct kobject *kobj, static ssize_t resend_count_show(struct kobject *kobj,
...@@ -692,6 +694,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v) ...@@ -692,6 +694,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
return 0; return 0;
} }
#undef pct #undef pct
static ssize_t osc_rpc_stats_seq_write(struct file *file, static ssize_t osc_rpc_stats_seq_write(struct file *file,
......
...@@ -185,6 +185,7 @@ struct osc_quota_info { ...@@ -185,6 +185,7 @@ struct osc_quota_info {
struct hlist_node oqi_hash; struct hlist_node oqi_hash;
u32 oqi_id; u32 oqi_id;
}; };
int osc_quota_setup(struct obd_device *obd); int osc_quota_setup(struct obd_device *obd);
int osc_quota_cleanup(struct obd_device *obd); int osc_quota_cleanup(struct obd_device *obd);
int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
......
...@@ -404,6 +404,7 @@ static const struct req_msg_field *ldlm_intent_layout_client[] = { ...@@ -404,6 +404,7 @@ static const struct req_msg_field *ldlm_intent_layout_client[] = {
&RMF_LAYOUT_INTENT, &RMF_LAYOUT_INTENT,
&RMF_EADATA /* for new layout to be set up */ &RMF_EADATA /* for new layout to be set up */
}; };
static const struct req_msg_field *ldlm_intent_open_server[] = { static const struct req_msg_field *ldlm_intent_open_server[] = {
&RMF_PTLRPC_BODY, &RMF_PTLRPC_BODY,
&RMF_DLM_REP, &RMF_DLM_REP,
......
...@@ -270,6 +270,7 @@ ptlrpc_lprocfs_req_history_len_seq_show(struct seq_file *m, void *v) ...@@ -270,6 +270,7 @@ ptlrpc_lprocfs_req_history_len_seq_show(struct seq_file *m, void *v)
seq_printf(m, "%d\n", total); seq_printf(m, "%d\n", total);
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_req_history_len); LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_req_history_len);
static int static int
...@@ -322,6 +323,7 @@ ptlrpc_lprocfs_req_history_max_seq_write(struct file *file, ...@@ -322,6 +323,7 @@ ptlrpc_lprocfs_req_history_max_seq_write(struct file *file,
return count; return count;
} }
LPROC_SEQ_FOPS(ptlrpc_lprocfs_req_history_max); LPROC_SEQ_FOPS(ptlrpc_lprocfs_req_history_max);
static ssize_t threads_min_show(struct kobject *kobj, struct attribute *attr, static ssize_t threads_min_show(struct kobject *kobj, struct attribute *attr,
...@@ -712,6 +714,7 @@ static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, ...@@ -712,6 +714,7 @@ static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file,
return rc < 0 ? rc : count; return rc < 0 ? rc : count;
} }
LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs); LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs);
/** @} nrs */ /** @} nrs */
...@@ -984,6 +987,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n) ...@@ -984,6 +987,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n)
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_timeouts); LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_timeouts);
static ssize_t high_priority_ratio_show(struct kobject *kobj, static ssize_t high_priority_ratio_show(struct kobject *kobj,
......
...@@ -457,6 +457,7 @@ static int cfs_hash_alg_id[] = { ...@@ -457,6 +457,7 @@ static int cfs_hash_alg_id[] = {
[BULK_HASH_ALG_SHA384] = CFS_HASH_ALG_SHA384, [BULK_HASH_ALG_SHA384] = CFS_HASH_ALG_SHA384,
[BULK_HASH_ALG_SHA512] = CFS_HASH_ALG_SHA512, [BULK_HASH_ALG_SHA512] = CFS_HASH_ALG_SHA512,
}; };
const char *sptlrpc_get_hash_name(__u8 hash_alg) const char *sptlrpc_get_hash_name(__u8 hash_alg)
{ {
return cfs_crypto_hash_name(cfs_hash_alg_id[hash_alg]); return cfs_crypto_hash_name(cfs_hash_alg_id[hash_alg]);
......
...@@ -264,15 +264,18 @@ static inline int rule_spec_dir(struct sptlrpc_rule *rule) ...@@ -264,15 +264,18 @@ static inline int rule_spec_dir(struct sptlrpc_rule *rule)
return (rule->sr_from != LUSTRE_SP_ANY || return (rule->sr_from != LUSTRE_SP_ANY ||
rule->sr_to != LUSTRE_SP_ANY); rule->sr_to != LUSTRE_SP_ANY);
} }
static inline int rule_spec_net(struct sptlrpc_rule *rule) static inline int rule_spec_net(struct sptlrpc_rule *rule)
{ {
return (rule->sr_netid != LNET_NIDNET(LNET_NID_ANY)); return (rule->sr_netid != LNET_NIDNET(LNET_NID_ANY));
} }
static inline int rule_match_dir(struct sptlrpc_rule *r1, static inline int rule_match_dir(struct sptlrpc_rule *r1,
struct sptlrpc_rule *r2) struct sptlrpc_rule *r2)
{ {
return (r1->sr_from == r2->sr_from && r1->sr_to == r2->sr_to); return (r1->sr_from == r2->sr_from && r1->sr_to == r2->sr_to);
} }
static inline int rule_match_net(struct sptlrpc_rule *r1, static inline int rule_match_net(struct sptlrpc_rule *r1,
struct sptlrpc_rule *r2) struct sptlrpc_rule *r2)
{ {
...@@ -368,6 +371,7 @@ static int sptlrpc_rule_set_merge(struct sptlrpc_rule_set *rset, ...@@ -368,6 +371,7 @@ static int sptlrpc_rule_set_merge(struct sptlrpc_rule_set *rset,
return 0; return 0;
} }
/** /**
* given from/to/nid, determine a matching flavor in ruleset. * given from/to/nid, determine a matching flavor in ruleset.
* return 1 if a match found, otherwise return 0. * return 1 if a match found, otherwise return 0.
......
...@@ -106,6 +106,7 @@ static int sptlrpc_info_lprocfs_seq_show(struct seq_file *seq, void *v) ...@@ -106,6 +106,7 @@ static int sptlrpc_info_lprocfs_seq_show(struct seq_file *seq, void *v)
out: out:
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(sptlrpc_info_lprocfs); LPROC_SEQ_FOPS_RO(sptlrpc_info_lprocfs);
static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v) static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v)
...@@ -130,6 +131,7 @@ static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v) ...@@ -130,6 +131,7 @@ static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v)
out: out:
return 0; return 0;
} }
LPROC_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs); LPROC_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs);
int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev) int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev)
......
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