#ifdef __KERNEL__
# include <linux/spinlock.h>
#endif
-#include <lustre_disk.h>
#include <lustre_handles.h>
#include <lustre_debug.h>
#include <obd.h>
OBD_INCOMPAT_COMMON_LR)
#define FILTER_GRANT_CHUNK (2ULL * PTLRPC_MAX_BRW_SIZE)
+#define FILTER_GRANT_SHRINK_LIMIT (16ULL * FILTER_GRANT_CHUNK)
#define GRANT_FOR_LLOG(obd) 16
extern struct file_operations filter_per_export_stats_fops;
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 *option);
int filter_destroy(struct obd_export *exp, struct obdo *oa,
struct lov_stripe_md *md, struct obd_trans_info *,
- struct obd_export *);
+ struct obd_export *, void *);
int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
struct obdo *oa, struct obd_trans_info *oti);
int filter_setattr(struct obd_export *exp, struct obd_info *oinfo,
obd_size want, obd_size fs_space_left);
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);
struct filter_iobuf *filter_alloc_iobuf(struct filter_obd *, int rw,
int num_pages);
void filter_free_iobuf(struct filter_iobuf *iobuf);
/* Quota stuff */
extern quota_interface_t *filter_quota_interface_ref;
-/* Capability */
-static inline __u64 obdo_mdsno(struct obdo *oa)
-{
- return oa->o_gr - FILTER_GROUP_MDS0;
-}
-
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,
struct lustre_capa *capa, __u64 opc);
+int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, __u64 mdsid,
+ struct lustre_capa *capa);
void filter_free_capa_keys(struct filter_obd *filter);
void blacklist_add(uid_t uid);