X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flov%2Flov_internal.h;h=8c8e5da8d1474fd07241151584136c030ccca644;hb=49b17944e1a61f88bddb5595bb053a555c8c08da;hp=a40b53b29bfb7a280ccf0496d7556debf2227dd4;hpb=0ad4f8a4227ed7dd93fec99d33c6bb25056473fc;p=fs%2Flustre-release.git diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index a40b53b..8c8e5da 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -27,7 +27,7 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2013, Intel Corporation. + * Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -114,6 +114,8 @@ struct lov_request_set { extern struct kmem_cache *lov_oinfo_slab; +extern struct lu_kmem_descr lov_caches[]; + void lov_finish_set(struct lov_request_set *set); static inline void lov_put_reqset(struct lov_request_set *set) @@ -126,22 +128,21 @@ static inline void lov_put_reqset(struct lov_request_set *set) (char *)((lv)->lov_tgts[index]->ltd_uuid.uuid) /* lov_merge.c */ -void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_valid valid, - struct lov_stripe_md *lsm, int stripeno, int *set); +void lov_merge_attrs(struct obdo *tgt, struct obdo *src, u64 valid, + struct lov_stripe_md *lsm, int stripeno, int *set); int lov_merge_lvb_kms(struct lov_stripe_md *lsm, struct ost_lvb *lvb, __u64 *kms_place); /* lov_offset.c */ -obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size, - int stripeno); -int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off, - int stripeno, obd_off *obd_off); -obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size, - int stripeno); +u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, int stripeno); +int lov_stripe_offset(struct lov_stripe_md *lsm, loff_t lov_off, int stripeno, + loff_t *obd_off); +loff_t lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, + int stripeno); int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, - obd_off start, obd_off end, - obd_off *obd_start, obd_off *obd_end); -int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off); + loff_t start, loff_t end, + loff_t *obd_start, loff_t *obd_end); +int lov_stripe_number(struct lov_stripe_md *lsm, loff_t lov_off); pgoff_t lov_stripe_pgoff(struct lov_stripe_md *lsm, pgoff_t stripe_index, int stripe); @@ -187,14 +188,13 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, __u32 *indexp, int *genp); int lov_del_target(struct obd_device *obd, __u32 index, struct obd_uuid *uuidp, int gen); +int lov_getattr_interpret(struct ptlrpc_request_set *rqset, void *data, int rc); /* lov_pack.c */ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmm, struct lov_stripe_md *lsm); int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp, struct lov_mds_md *lmm, int lmm_bytes); -int lov_getstripe(struct obd_export *exp, - struct lov_stripe_md *lsm, struct lov_user_md __user *lump); int lov_alloc_memmd(struct lov_stripe_md **lsmp, __u16 stripe_count, int pattern, int magic); int lov_free_memmd(struct lov_stripe_md **lsmp); @@ -211,7 +211,7 @@ void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm); /* lproc_lov.c */ extern struct file_operations lov_proc_target_fops; -#ifdef LPROCFS +#ifdef CONFIG_PROC_FS extern struct lprocfs_vars lprocfs_lov_obd_vars[]; #endif @@ -233,7 +233,6 @@ int lov_pool_del(struct obd_device *obd, char *poolname); int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname); int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname); void lov_dump_pool(int level, struct pool_desc *pool); -void lov_pool_putref(struct pool_desc *pool); static inline struct lov_stripe_md *lsm_addref(struct lov_stripe_md *lsm) { @@ -253,4 +252,9 @@ static inline bool lov_oinfo_is_dummy(const struct lov_oinfo *loi) return false; } +static inline struct obd_device *lov2obd(const struct lov_obd *lov) +{ + return container_of0(lov, struct obd_device, u.lov); +} + #endif