[PATCH 10/29] staging/lustre: Remove unused lu_object functions.
From: Oleg Drokin Quite a bunch of them are only used on the server. lu_object_put_nocache, lu_object_invariant, lu_dev_del_linkage, lu_context_tags_update, lu_context_tags_clear, lu_session_tags_update, lu_session_tags_clear, lu_env_refill_by_tags, lu_printk_printer, lu_object_assign_fid, lu_object_anon, lu_buf_free, lu_buf_alloc, lu_buf_realloc, lu_buf_check_and_alloc, lu_buf_check_and_grow Reported-by: Arnd Bergmann Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lu_object.h | 27 --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 241 - 2 files changed, 268 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 7756008..e2199c2 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -672,7 +672,6 @@ void lu_object_add_top(struct lu_object_header *h, struct lu_object *o); void lu_object_add (struct lu_object *before, struct lu_object *o); void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d); -void lu_dev_del_linkage(struct lu_site *s, struct lu_device *d); /** * Helpers to initialize and finalize device types. @@ -710,7 +709,6 @@ static inline int lu_object_is_dying(const struct lu_object_header *h) } void lu_object_put(const struct lu_env *env, struct lu_object *o); -void lu_object_put_nocache(const struct lu_env *env, struct lu_object *o); void lu_object_unhash(const struct lu_env *env, struct lu_object *o); int lu_site_purge(const struct lu_env *env, struct lu_site *s, int nr); @@ -1241,14 +1239,6 @@ void lu_context_key_degister_many(struct lu_context_key *k, ...); void lu_context_key_revive_many (struct lu_context_key *k, ...); void lu_context_key_quiesce_many (struct lu_context_key *k, ...); -/* - * update/clear ctx/ses tags. - */ -void lu_context_tags_update(__u32 tags); -void lu_context_tags_clear(__u32 tags); -void lu_session_tags_update(__u32 tags); -void lu_session_tags_clear(__u32 tags); - /** * Environment. */ @@ -1266,7 +1256,6 @@ struct lu_env { int lu_env_init (struct lu_env *env, __u32 tags); void lu_env_fini (struct lu_env *env); int lu_env_refill(struct lu_env *env); -int lu_env_refill_by_tags(struct lu_env *env, __u32 ctags, __u32 stags); /** @} lu_context */ @@ -1319,21 +1308,5 @@ struct lu_kmem_descr { int lu_kmem_init(struct lu_kmem_descr *caches); void lu_kmem_fini(struct lu_kmem_descr *caches); -void lu_object_assign_fid(const struct lu_env *env, struct lu_object *o, - const struct lu_fid *fid); -struct lu_object *lu_object_anon(const struct lu_env *env, -struct lu_device *dev, -const struct lu_object_conf *conf); - -/** null buffer */ -extern struct lu_buf LU_BUF_NULL; - -void lu_buf_free(struct lu_buf *buf); -void lu_buf_alloc(struct lu_buf *buf, int size); -void lu_buf_realloc(struct lu_buf *buf, int size); - -int lu_buf_check_and_grow(struct lu_buf *buf, int len); -struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, int len); - /** @} lu */ #endif /* __LUSTRE_LU_OBJECT_H */ diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index c892e82..01d70f0 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -157,17 +157,6 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) EXPORT_SYMBOL(lu_object_put); /** - * Put object and don't keep in cache. This is temporary solution for - * multi-site objects when its layering is not constant. - */ -void lu_object_put_nocache(const struct lu_env *env, struct lu_object *o) -{ - set_bit(LU_OBJECT_HEARD_BANSHEE, >lo_header->loh_flags); - return lu_object_put(env, o); -} -EXPORT_SYMBOL(lu_object_put_nocache); - -/** * Kill the object and take it out of LRU cache. * Currently used by client code for layout change. */ @@ -529,23 +518,6 @@ void lu_object_print(const struct lu_env *env, void *cookie, } EXPORT_SYMBOL(lu_object_print); -/** - * Check object consistency. - */ -int lu_object_invariant(const struct lu_object *o) -{ - struct lu_object_header *top; - - top = o->lo_header; - list_for_each_entry(o, >loh_layers, lo_linkage) { - if (o->lo_ops->loo_object_invariant != NULL && - !o->lo_ops->loo_object_invariant(o)) - return 0; - } - return 1; -} -EXPORT_SYMBOL(lu_object_invariant); - static struct lu_object *htable_lookup(struct lu_site *s, struct cfs_hash_bd *bd, const struct lu_fid *f, @@ -962,14 +934,6 @@ void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) } EXPORT_SYMBOL(lu_dev_add_linkage); -void lu_dev_del_linkage(struct lu_site
[PATCH 10/29] staging/lustre: Remove unused lu_object functions.
From: Oleg DrokinQuite a bunch of them are only used on the server. lu_object_put_nocache, lu_object_invariant, lu_dev_del_linkage, lu_context_tags_update, lu_context_tags_clear, lu_session_tags_update, lu_session_tags_clear, lu_env_refill_by_tags, lu_printk_printer, lu_object_assign_fid, lu_object_anon, lu_buf_free, lu_buf_alloc, lu_buf_realloc, lu_buf_check_and_alloc, lu_buf_check_and_grow Reported-by: Arnd Bergmann Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lu_object.h | 27 --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 241 - 2 files changed, 268 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 7756008..e2199c2 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -672,7 +672,6 @@ void lu_object_add_top(struct lu_object_header *h, struct lu_object *o); void lu_object_add (struct lu_object *before, struct lu_object *o); void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d); -void lu_dev_del_linkage(struct lu_site *s, struct lu_device *d); /** * Helpers to initialize and finalize device types. @@ -710,7 +709,6 @@ static inline int lu_object_is_dying(const struct lu_object_header *h) } void lu_object_put(const struct lu_env *env, struct lu_object *o); -void lu_object_put_nocache(const struct lu_env *env, struct lu_object *o); void lu_object_unhash(const struct lu_env *env, struct lu_object *o); int lu_site_purge(const struct lu_env *env, struct lu_site *s, int nr); @@ -1241,14 +1239,6 @@ void lu_context_key_degister_many(struct lu_context_key *k, ...); void lu_context_key_revive_many (struct lu_context_key *k, ...); void lu_context_key_quiesce_many (struct lu_context_key *k, ...); -/* - * update/clear ctx/ses tags. - */ -void lu_context_tags_update(__u32 tags); -void lu_context_tags_clear(__u32 tags); -void lu_session_tags_update(__u32 tags); -void lu_session_tags_clear(__u32 tags); - /** * Environment. */ @@ -1266,7 +1256,6 @@ struct lu_env { int lu_env_init (struct lu_env *env, __u32 tags); void lu_env_fini (struct lu_env *env); int lu_env_refill(struct lu_env *env); -int lu_env_refill_by_tags(struct lu_env *env, __u32 ctags, __u32 stags); /** @} lu_context */ @@ -1319,21 +1308,5 @@ struct lu_kmem_descr { int lu_kmem_init(struct lu_kmem_descr *caches); void lu_kmem_fini(struct lu_kmem_descr *caches); -void lu_object_assign_fid(const struct lu_env *env, struct lu_object *o, - const struct lu_fid *fid); -struct lu_object *lu_object_anon(const struct lu_env *env, -struct lu_device *dev, -const struct lu_object_conf *conf); - -/** null buffer */ -extern struct lu_buf LU_BUF_NULL; - -void lu_buf_free(struct lu_buf *buf); -void lu_buf_alloc(struct lu_buf *buf, int size); -void lu_buf_realloc(struct lu_buf *buf, int size); - -int lu_buf_check_and_grow(struct lu_buf *buf, int len); -struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, int len); - /** @} lu */ #endif /* __LUSTRE_LU_OBJECT_H */ diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index c892e82..01d70f0 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -157,17 +157,6 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) EXPORT_SYMBOL(lu_object_put); /** - * Put object and don't keep in cache. This is temporary solution for - * multi-site objects when its layering is not constant. - */ -void lu_object_put_nocache(const struct lu_env *env, struct lu_object *o) -{ - set_bit(LU_OBJECT_HEARD_BANSHEE, >lo_header->loh_flags); - return lu_object_put(env, o); -} -EXPORT_SYMBOL(lu_object_put_nocache); - -/** * Kill the object and take it out of LRU cache. * Currently used by client code for layout change. */ @@ -529,23 +518,6 @@ void lu_object_print(const struct lu_env *env, void *cookie, } EXPORT_SYMBOL(lu_object_print); -/** - * Check object consistency. - */ -int lu_object_invariant(const struct lu_object *o) -{ - struct lu_object_header *top; - - top = o->lo_header; - list_for_each_entry(o, >loh_layers, lo_linkage) { - if (o->lo_ops->loo_object_invariant != NULL && - !o->lo_ops->loo_object_invariant(o)) - return 0; - } - return 1; -} -EXPORT_SYMBOL(lu_object_invariant); - static struct lu_object *htable_lookup(struct lu_site *s, struct cfs_hash_bd *bd, const struct lu_fid *f, @@ -962,14 +934,6 @@ void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) }