Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=16312
[fs/lustre-release.git]
/
lustre
/
obdfilter
/
filter_internal.h
diff --git
a/lustre/obdfilter/filter_internal.h
b/lustre/obdfilter/filter_internal.h
index
d73a468
..
dbe4fae
100644
(file)
--- a/
lustre/obdfilter/filter_internal.h
+++ b/
lustre/obdfilter/filter_internal.h
@@
-16,8
+16,8
@@
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
[sun.com URL with a
- *
copy of GPLv2].
+ * version 2 along with this program; If not, see
+ *
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
@@
-40,7
+40,6
@@
#ifdef __KERNEL__
# include <linux/spinlock.h>
#endif
#ifdef __KERNEL__
# include <linux/spinlock.h>
#endif
-#include <lustre_disk.h>
#include <lustre_handles.h>
#include <lustre_debug.h>
#include <obd.h>
#include <lustre_handles.h>
#include <lustre_debug.h>
#include <obd.h>
@@
-59,6
+58,7
@@
OBD_INCOMPAT_COMMON_LR)
#define FILTER_GRANT_CHUNK (2ULL * PTLRPC_MAX_BRW_SIZE)
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;
#define GRANT_FOR_LLOG(obd) 16
extern struct file_operations filter_per_export_stats_fops;
@@
-93,6
+93,12
@@
struct filter_mod_data {
/* Client cache seconds */
#define FILTER_FMD_MAX_AGE_DEFAULT ((obd_timeout + 10) * HZ)
/* Client cache seconds */
#define FILTER_FMD_MAX_AGE_DEFAULT ((obd_timeout + 10) * HZ)
+#ifndef HAVE_PAGE_CONSTANT
+#define mapping_cap_page_constant_write(mapping) 0
+#define SetPageConstant(page) do {} while (0)
+#define ClearPageConstant(page) do {} while (0)
+#endif
+
struct filter_mod_data *filter_fmd_find(struct obd_export *exp,
obd_id objid, obd_gr group);
struct filter_mod_data *filter_fmd_get(struct obd_export *exp,
struct filter_mod_data *filter_fmd_find(struct obd_export *exp,
obd_id objid, obd_gr group);
struct filter_mod_data *filter_fmd_get(struct obd_export *exp,
@@
-103,6
+109,11
@@
void filter_fmd_expire(struct obd_export *exp);
enum {
LPROC_FILTER_READ_BYTES = 0,
LPROC_FILTER_WRITE_BYTES = 1,
enum {
LPROC_FILTER_READ_BYTES = 0,
LPROC_FILTER_WRITE_BYTES = 1,
+ LPROC_FILTER_GET_PAGE = 2,
+ LPROC_FILTER_NO_PAGE = 3,
+ LPROC_FILTER_CACHE_ACCESS = 4,
+ LPROC_FILTER_CACHE_HIT = 5,
+ LPROC_FILTER_CACHE_MISS = 6,
LPROC_FILTER_LAST,
};
LPROC_FILTER_LAST,
};
@@
-115,7
+126,7
@@
enum {
extern int *obdfilter_created_scratchpad;
extern void target_recovery_fini(struct obd_device *obd);
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 */
svc_handler_t handler);
/* filter.c */
@@
-126,8
+137,8
@@
struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa,
const char *what, int quiet);
#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__, 0)
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,
__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,
@@
-139,7
+150,7
@@
int filter_common_setup(struct obd_device *, struct lustre_cfg *lcfg,
void *option);
int filter_destroy(struct obd_export *exp, struct obdo *oa,
struct lov_stripe_md *md, struct obd_trans_info *,
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,
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,
@@
-155,20
+166,21
@@
extern struct ldlm_valblock_ops filter_lvbo;
/* filter_io.c */
int filter_preprw(int cmd, struct obd_export *, struct obdo *, int objcount,
/* filter_io.c */
int filter_preprw(int cmd, struct obd_export *, struct obdo *, int objcount,
- struct obd_ioobj *,
int niocount,
struct niobuf_remote *,
- struct niobuf_local *, struct obd_trans_info *,
+ struct obd_ioobj *, struct niobuf_remote *,
+
int *,
struct niobuf_local *, struct obd_trans_info *,
struct lustre_capa *);
int filter_commitrw(int cmd, struct obd_export *, struct obdo *, int objcount,
struct lustre_capa *);
int filter_commitrw(int cmd, struct obd_export *, struct obdo *, int objcount,
- struct obd_ioobj *,
int niocount, struct niobuf_local *
,
- struct obd_trans_info *, int rc);
+ struct obd_ioobj *,
struct niobuf_remote *, int
,
+ 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 *);
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 flip_into_page_cache(struct inode *inode, struct page *new_page);
+void filter_invalidate_cache(struct obd_device *, struct obd_ioobj *,
+ struct niobuf_remote *, struct inode *);
/* filter_io_*.c */
struct filter_iobuf;
int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount,
/* filter_io_*.c */
struct filter_iobuf;
int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount,
- struct obd_ioobj *obj,
int niocou
nt,
+ struct obd_ioobj *obj,
struct niobuf_remote *, i
nt,
struct niobuf_local *res, struct obd_trans_info *oti,
int rc);
obd_size filter_grant_space_left(struct obd_export *exp);
struct niobuf_local *res, struct obd_trans_info *oti,
int rc);
obd_size filter_grant_space_left(struct obd_export *exp);
@@
-176,6
+188,7
@@
long filter_grant(struct obd_export *exp, obd_size current_grant,
obd_size want, obd_size fs_space_left);
void filter_grant_commit(struct obd_export *exp, int niocount,
struct niobuf_local *res);
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);
struct filter_iobuf *filter_alloc_iobuf(struct filter_obd *, int rw,
int num_pages);
void filter_free_iobuf(struct filter_iobuf *iobuf);
@@
-223,15
+236,11
@@
static void lprocfs_filter_init_vars(struct lprocfs_static_vars *lvars)
/* Quota stuff */
extern quota_interface_t *filter_quota_interface_ref;
/* 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_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);
void filter_free_capa_keys(struct filter_obd *filter);
void blacklist_add(uid_t uid);