struct lquota_id_info oti_qi;
struct lu_seq_range oti_seq_range;
- struct lu_buf oti_xattr_lbuf;
};
extern struct lu_context_key osd_key;
struct list_head ot_stop_dcb_list;
struct list_head ot_unlinked_list;
struct list_head ot_sa_list;
+ struct semaphore ot_sa_lock;
dmu_tx_t *ot_tx;
struct lquota_trans ot_quota_trans;
__u32 ot_write_commit:1,
struct rw_semaphore oo_sem;
/* to serialize some updates: destroy vs. others,
- * xattr_set, etc */
+ * xattr_set, object block size change etc */
struct rw_semaphore oo_guard;
/* protected by oo_guard */
uint64_t oo_xattr;
enum osd_destroy_type oo_destroy;
- __u32 oo_destroyed:1,
- oo_late_xattr:1;
+ __u32 oo_destroyed:1;
/* the i_flags in LMA */
__u32 oo_lma_flags;
- /* record size for index file */
- unsigned char oo_keysize;
- unsigned char oo_recsize;
- unsigned char oo_recusize; /* unit size */
+ union {
+ int oo_ea_in_bonus; /* EA bytes we expect */
+ struct {
+ /* record size for index file */
+ unsigned char oo_keysize;
+ unsigned char oo_recsize;
+ unsigned char oo_recusize; /* unit size */
+ };
+ };
+
+
};
int osd_statfs(const struct lu_env *, struct dt_device *, struct obd_statfs *);
/* osd_object.c */
extern char *osd_obj_tag;
-void osd_object_sa_dirty_rele(const struct lu_env *env, struct osd_thandle *oh);
-void osd_object_sa_dirty_add(struct osd_object *obj, struct osd_thandle *oh);
+void osd_object_sa_dirty_rele(struct osd_thandle *oh);
int __osd_obj2dbuf(const struct lu_env *env, objset_t *os,
uint64_t oid, dmu_buf_t **dbp);
struct lu_object *osd_object_alloc(const struct lu_env *env,
void *buf, uint32_t buflen, struct osd_thandle *oh);
int __osd_zap_create(const struct lu_env *env, struct osd_device *osd,
dmu_buf_t **zap_dbp, dmu_tx_t *tx, struct lu_attr *la,
- uint64_t parent, zap_flags_t flags);
+ zap_flags_t flags);
int __osd_object_create(const struct lu_env *env, struct osd_object *obj,
- dmu_buf_t **dbp, dmu_tx_t *tx, struct lu_attr *la,
- uint64_t parent);
+ dmu_buf_t **dbp, dmu_tx_t *tx, struct lu_attr *la);
+int __osd_attr_init(const struct lu_env *env, struct osd_device *osd,
+ sa_handle_t *sa_hdl, dmu_tx_t *tx,
+ struct lu_attr *la, uint64_t parent);
/* osd_oi.c */
int osd_oi_init(const struct lu_env *env, struct osd_device *o);
int osd_fid_lookup(const struct lu_env *env,
struct osd_device *, const struct lu_fid *, uint64_t *);
uint64_t osd_get_name_n_idx(const struct lu_env *env, struct osd_device *osd,
- const struct lu_fid *fid, char *buf);
+ const struct lu_fid *fid, char *buf, int bufsize);
int osd_options_init(void);
int osd_ost_seq_exists(const struct lu_env *env, struct osd_device *osd,
__u64 seq);
uint64_t osd_zap_cursor_serialize(zap_cursor_t *zc);
/* osd_xattr.c */
-int __osd_sa_xattr_update(const struct lu_env *env, struct osd_object *obj,
- struct osd_thandle *oh);
int __osd_xattr_load(struct osd_device *osd, uint64_t dnode,
nvlist_t **sa_xattr);
int __osd_xattr_get_large(const struct lu_env *env, struct osd_device *osd,
int __osd_xattr_set(const struct lu_env *env, struct osd_object *obj,
const struct lu_buf *buf, const char *name, int fl,
struct osd_thandle *oh);
+int __osd_sa_xattr_update(const struct lu_env *env, struct osd_object *obj,
+ struct osd_thandle *oh);
static inline int
osd_xattr_set_internal(const struct lu_env *env, struct osd_object *obj,
const struct lu_buf *buf, const char *name, int fl,
}
#endif /* HAVE_DMU_OBJECT_ALLOC_DNSIZE */
+#ifdef HAVE_DMU_PREFETCH_6ARG
+#define osd_dmu_prefetch(os, obj, lvl, off, len, pri) \
+ dmu_prefetch((os), (obj), (lvl), (off), (len), (pri))
+#else
+#define osd_dmu_prefetch(os, obj, lvl, off, len, pri) \
+ dmu_prefetch((os), (obj), (lvl), (off))
+#endif
+
+#ifndef DN_MAX_BONUSLEN
+#define DN_MAX_BONUSLEN DN_OLD_MAX_BONUSLEN
+#endif
+
#endif /* _OSD_INTERNAL_H */