#ifndef __OBD_H
#define __OBD_H
-#ifndef __KERNEL__
-# error "userspace should not include <obd.h>"
-#endif
-#if defined(__linux__)
#include <linux/obd.h>
-#else
-#error Unsupported operating system.
-#endif
#include <lustre/lustre_idl.h>
#include <lustre_lib.h>
#include <lustre_export.h>
#include <lustre_fid.h>
#include <lustre_fld.h>
+#include <lustre_handles.h>
+#include <lustre_intent.h>
#include <lustre_capa.h>
#include <lvfs.h>
{
}
+/* If we are unable to get the maximum object size from the OST in
+ * ocd_maxbytes using OBD_CONNECT_MAXBYTES, then we fall back to using
+ * the old maximum object size from ext3. */
+#define LUSTRE_EXT3_STRIPE_MAXBYTES 0x1fffffff000ULL
+
struct lov_stripe_md {
atomic_t lsm_refc;
spinlock_t lsm_lock;
__u32 lw_pattern; /* striping pattern (RAID0, RAID1) */
__u16 lw_stripe_count; /* number of objects being striped over */
__u16 lw_layout_gen; /* generation of the layout */
- char lw_pool_name[LOV_MAXPOOLNAME]; /* pool name */
+ char lw_pool_name[LOV_MAXPOOLNAME + 1]; /* pool name */
} lsm_wire;
struct lov_oinfo *lsm_oinfo[0];
/* lru for osc caching pages */
struct cl_client_cache *cl_cache;
struct list_head cl_lru_osc; /* member of cl_cache->ccc_lru */
- atomic_t *cl_lru_left;
- atomic_t cl_lru_busy;
- atomic_t cl_lru_shrinkers;
- atomic_t cl_lru_in_list;
+ atomic_long_t *cl_lru_left;
+ atomic_long_t cl_lru_busy;
+ atomic_long_t cl_lru_in_list;
+ atomic_long_t cl_unstable_count;
struct list_head cl_lru_list; /* lru page list */
client_obd_lock_t cl_lru_list_lock; /* page list protector */
- atomic_t cl_unstable_count;
+ atomic_t cl_lru_shrinkers;
/* number of in flight destroy rpcs is limited to max_rpcs_in_flight */
atomic_t cl_destroy_in_flight;
/* used by quotacheck when the servers are older than 2.4 */
int cl_qchk_stat; /* quotacheck stat of the peer */
#define CL_NOT_QUOTACHECKED 1 /* client->cl_qchk_stat init value */
-#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 7, 50, 0)
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2, 7, 53, 0)
#warning "please consider removing quotacheck compatibility code"
#endif
struct lmv_tgt_desc {
struct obd_uuid ltd_uuid;
struct obd_export *ltd_exp;
- int ltd_idx;
+ __u32 ltd_idx;
struct mutex ltd_fid_mutex;
unsigned long ltd_active:1; /* target up for requests */
};
int max_def_easize;
int max_cookiesize;
int max_def_cookiesize;
- int server_timeout;
- int tgts_size; /* size of tgts array */
+ __u32 tgts_size; /* size of tgts array */
struct lmv_tgt_desc **tgts;
struct obd_connect_data conn_data;
struct inode *mi_dir;
md_enqueue_cb_t mi_cb;
__u64 mi_cbdata;
- unsigned int mi_generation;
};
struct obd_ops {
struct module *o_owner;
int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
- void *karg, void *uarg);
+ void *karg, void __user *uarg);
int (*o_get_info)(const struct lu_env *env, struct obd_export *,
__u32 keylen, void *key, __u32 *vallen, void *val,
struct lov_stripe_md *lsm);
int (*o_init_export)(struct obd_export *exp);
int (*o_destroy_export)(struct obd_export *exp);
- /* llog related obd_methods */
- int (*o_llog_init)(struct obd_device *obd, struct obd_llog_group *grp,
- struct obd_device *disk_obd, int *idx);
- int (*o_llog_finish)(struct obd_device *obd, int count);
-
int (*o_import_event)(struct obd_device *, struct obd_import *,
enum obd_import_event);
bool mod_is_create;
};
+struct obd_client_handle {
+ struct lustre_handle och_fh;
+ struct lu_fid och_fid;
+ struct md_open_data *och_mod;
+ struct lustre_handle och_lease_handle; /* open lock for lease */
+ __u32 och_magic;
+ int och_flags;
+};
+
+#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
+
struct lookup_intent;
struct cl_attr;