X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fobd_class.h;h=f9c02dd229a748cd1adeceacc3ee3df280e27374;hb=6488c0ec57de2d188bd15e502917b762e3a9dd1d;hp=72da1c8ccdd5bbe5e4b8d59ffea0e4a6e313c43c;hpb=2728de4db8c0f8177202e2ffcad74a1893b210c9;p=fs%2Flustre-release.git diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 72da1c8..f9c02dd 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -32,7 +32,7 @@ #ifndef __CLASS_OBD_H #define __CLASS_OBD_H - +#include #include #include #include @@ -54,7 +54,7 @@ extern rwlock_t obd_dev_lock; extern struct obd_device *class_conn2obd(struct lustre_handle *); extern struct obd_device *class_exp2obd(struct obd_export *); extern int class_handle_ioctl(unsigned int cmd, unsigned long arg); -int lustre_get_jobid(char *jobid); +int lustre_get_jobid(char *jobid, size_t len); void lustre_jobid_clear(const char *jobid); void jobid_cache_fini(void); int jobid_cache_init(void); @@ -63,6 +63,7 @@ struct lu_device_type; /* genops.c */ struct obd_export *class_conn2export(struct lustre_handle *); +struct kobject *class_setup_tunables(const char *name); int class_register_type(struct obd_ops *, struct md_ops *, bool enable_proc, struct lprocfs_vars *module_vars, const char *nm, struct lu_device_type *ldt); @@ -140,6 +141,9 @@ struct lustre_cfg *lustre_cfg_rename(struct lustre_cfg *cfg, const char *new_name); void print_lustre_cfg(struct lustre_cfg *lcfg); int class_process_config(struct lustre_cfg *lcfg); +ssize_t class_set_global(const char *param); +ssize_t class_modify_config(struct lustre_cfg *lcfg, const char *prefix, + struct kobject *kobj); int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, struct lustre_cfg *lcfg, void *data); int class_attach(struct lustre_cfg *lcfg); @@ -1074,9 +1078,10 @@ static inline int obd_destroy_export(struct obd_export *exp) RETURN(0); } -/* @max_age is the oldest time in jiffies that we accept using a cached data. +/* @max_age is the oldest time in seconds that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the - * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ + * target. Use a value of 'ktime_get_seconds() + X' to guarantee freshness. + */ static inline int obd_statfs_async(struct obd_export *exp, struct obd_info *oinfo, time64_t max_age, @@ -1118,9 +1123,10 @@ static inline int obd_statfs_async(struct obd_export *exp, RETURN(rc); } -/* @max_age is the oldest time in jiffies that we accept using a cached data. +/* @max_age is the oldest time in seconds that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the - * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ + * target. Use a value of 'ktime_get_seconds() + X' to guarantee freshness. + */ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, struct obd_statfs *osfs, time64_t max_age, __u32 flags) @@ -1132,6 +1138,8 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, if (obd == NULL) RETURN(-EINVAL); + OBD_CHECK_DEV_ACTIVE(obd); + if (!obd->obd_type || !obd->obd_type->typ_dt_ops->o_statfs) { CERROR("%s: no %s operation\n", obd->obd_name, __func__); RETURN(-EOPNOTSUPP); @@ -1865,10 +1873,6 @@ int lustre_register_fs(void); int lustre_unregister_fs(void); int lustre_check_exclusion(struct super_block *sb, char *svname); -/* sysctl.c */ -extern int obd_sysctl_init(void); -extern void obd_sysctl_clean(void); - typedef __u8 class_uuid_t[16]; static inline void class_uuid_unparse(class_uuid_t uu, struct obd_uuid *out) { @@ -1885,7 +1889,7 @@ int class_del_uuid (const char *uuid); int class_check_uuid(struct obd_uuid *uuid, __u64 nid); /* class_obd.c */ -extern char obd_jobid_node[]; +extern char obd_jobid_name[]; /* prng.c */ #define ll_generate_random_uuid(uuid_out) cfs_get_random_bytes(uuid_out, sizeof(class_uuid_t))