#ifdef __KERNEL__
# include <linux/spinlock.h>
#endif
-#include <lustre_disk.h>
#include <lustre_handles.h>
#include <lustre_debug.h>
#include <obd.h>
OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ|\
OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME)
-struct filter_fid {
- struct ll_fid ff_fid; /* ff_fid.f_type == file stripe number */
- __u64 ff_objid;
- __u64 ff_group;
-};
-
/* 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
#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
extern int *obdfilter_created_scratchpad;
extern void target_recovery_fini(struct obd_device *obd);
-extern void target_recovery_init(struct obd_device *obd,
+extern void target_recovery_init(struct lu_target *lut,
svc_handler_t handler);
/* filter.c */
const char *what, int quiet);
#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__, 0)
-int filter_finish_transno(struct obd_export *, struct obd_trans_info *, int rc,
- int force_sync);
+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);
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);
+ struct lr_server_data *);
int filter_update_last_objid(struct obd_device *, obd_gr, int force_sync);
int filter_common_setup(struct obd_device *, struct lustre_cfg *lcfg,
void *option);
struct niobuf_local *, struct obd_trans_info *, int rc);
int filter_brw(int cmd, struct obd_export *, struct obd_info *oinfo,
obd_count oa_bufs, struct brw_page *pga, struct obd_trans_info *);
-void filter_invalidate_cache(struct obd_device *, struct obd_ioobj *,
- struct niobuf_remote *, struct inode *);
+void filter_release_cache(struct obd_device *, struct obd_ioobj *,
+ struct niobuf_remote *, struct inode *);
/* filter_io_*.c */
struct filter_iobuf;
int rc);
obd_size filter_grant_space_left(struct obd_export *exp);
long filter_grant(struct obd_export *exp, obd_size current_grant,
- obd_size want, obd_size fs_space_left);
+ obd_size want, obd_size fs_space_left, int conservative);
void filter_grant_commit(struct obd_export *exp, int niocount,
struct niobuf_local *res);
void filter_grant_incoming(struct obd_export *exp, struct obdo *oa);
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, __u64 mdsid,
+int filter_auth_capa(struct obd_export *exp, struct lu_fid *fid, obd_gr group,
struct lustre_capa *capa, __u64 opc);
-int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, __u64 mdsid,
+int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, obd_gr group,
struct lustre_capa *capa);
void filter_free_capa_keys(struct filter_obd *filter);