X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdfilter%2Ffilter_internal.h;h=91d8ef99d3a66f9ff86c1de7b024d76baecb31b8;hb=956b4238baa1a9c582c14c625748e64cc13922ba;hp=c203f27de23640a3892935af304d154bc564ee95;hpb=72bbd4c86daab4ebd7958ac8350e96fd97c9fa66;p=fs%2Flustre-release.git diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index c203f27..91d8ef9 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -26,7 +26,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -43,6 +43,7 @@ #include #include #include +#include #include #define FILTER_LAYOUT_VERSION "2" @@ -71,12 +72,13 @@ extern struct file_operations filter_per_nid_stats_fops; /* per-client-per-object persistent state (LRU) */ struct filter_mod_data { - struct list_head fmd_list; /* linked to fed_mod_list */ - __u64 fmd_id; /* object being written to */ - __u64 fmd_gr; /* group being written to */ - __u64 fmd_mactime_xid;/* xid highest {m,a,c}time setattr */ - unsigned long fmd_expire; /* jiffies when it should expire */ - int fmd_refcount; /* reference counter - list holds 1 */ + cfs_list_t fmd_list; /* linked to fed_mod_list */ + __u64 fmd_id; /* object being written to */ + __u64 fmd_gr; /* group being written to */ + __u64 fmd_mactime_xid;/* xid highest {m,a,c}time + * setattr */ + unsigned long fmd_expire; /* jiffies when it should expire */ + int fmd_refcount; /* reference counter, list holds 1 */ }; #ifdef HAVE_BGL_SUPPORT @@ -85,7 +87,7 @@ struct filter_mod_data { #define FILTER_FMD_MAX_NUM_DEFAULT 32 #endif /* Client cache seconds */ -#define FILTER_FMD_MAX_AGE_DEFAULT ((obd_timeout + 10) * HZ) +#define FILTER_FMD_MAX_AGE_DEFAULT ((obd_timeout + 10) * CFS_HZ) #ifndef HAVE_PAGE_CONSTANT #define mapping_cap_page_constant_write(mapping) 0 @@ -94,9 +96,9 @@ struct filter_mod_data { #endif struct filter_mod_data *filter_fmd_find(struct obd_export *exp, - obd_id objid, obd_gr group); + obd_id objid, obd_seq seq); struct filter_mod_data *filter_fmd_get(struct obd_export *exp, - obd_id objid, obd_gr group); + obd_id objid, obd_seq seq); void filter_fmd_put(struct obd_export *exp, struct filter_mod_data *fmd); void filter_fmd_expire(struct obd_export *exp); @@ -126,20 +128,20 @@ extern void target_recovery_init(struct lu_target *lut, /* filter.c */ void f_dput(struct dentry *); struct dentry *filter_fid2dentry(struct obd_device *, struct dentry *dir, - obd_gr group, obd_id id); -struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa, + obd_seq seq, obd_id id); +struct dentry *__filter_oa2dentry(struct obd_device *obd, struct ost_id *ostid, const char *what, int quiet); -#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__, 0) +#define filter_oa2dentry(obd, ostid) __filter_oa2dentry(obd, ostid, \ + __func__, 0) int filter_finish_transno(struct obd_export *, struct inode *, struct obd_trans_info *, int rc, int force_sync); __u64 filter_next_id(struct filter_obd *, struct obdo *); -__u64 filter_last_id(struct filter_obd *, obd_gr group); +__u64 filter_last_id(struct filter_obd *, obd_seq seq); int filter_update_fidea(struct obd_export *exp, struct inode *inode, void *handle, struct obdo *oa); -int filter_update_server_data(struct obd_device *, struct file *, - struct lr_server_data *, int force_sync); -int filter_update_last_objid(struct obd_device *, obd_gr, int force_sync); +int filter_update_server_data(struct obd_device *); +int filter_update_last_objid(struct obd_device *, obd_seq, int force_sync); int filter_common_setup(struct obd_device *, struct lustre_cfg *lcfg, void *option); int filter_destroy(struct obd_export *exp, struct obdo *oa, @@ -152,7 +154,7 @@ int filter_setattr(struct obd_export *exp, struct obd_info *oinfo, struct dentry *filter_create_object(struct obd_device *obd, struct obdo *oa); -struct obd_llog_group *filter_find_olg(struct obd_device *obd, int group); +struct obd_llog_group *filter_find_olg(struct obd_device *obd, int seq); /* filter_lvb.c */ extern struct ldlm_valblock_ops filter_lvbo; @@ -231,9 +233,9 @@ static void lprocfs_filter_init_vars(struct lprocfs_static_vars *lvars) extern quota_interface_t *filter_quota_interface_ref; int filter_update_capa_key(struct obd_device *obd, struct lustre_capa_key *key); -int filter_auth_capa(struct obd_export *exp, struct lu_fid *fid, obd_gr group, +int filter_auth_capa(struct obd_export *exp, struct lu_fid *fid, obd_seq seq, struct lustre_capa *capa, __u64 opc); -int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, obd_gr group, +int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, obd_seq seq, struct lustre_capa *capa); void filter_free_capa_keys(struct filter_obd *filter);