* Use is subject to license terms.
*/
/*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
* Use is subject to license terms.
*/
/*
#define _OSD_INTERNAL_H
#include <dt_object.h>
+#include <md_object.h>
#include <lustre_quota.h>
#include <sys/arc.h>
#include <sys/nvpair.h>
+#include <sys/zfs_znode.h>
#include "udmu.h"
#define LUSTRE_ROOT_FID_SEQ 0
uint64_t od_root;
struct osd_oi **od_oi_table;
unsigned int od_oi_count;
- uint64_t od_ost_compat_grp0;
struct osd_seq_list od_seq_list;
unsigned int od_rdonly:1,
uint64_t osd_get_name_n_idx(const struct lu_env *env, struct osd_device *osd,
const struct lu_fid *fid, char *buf);
int osd_options_init(void);
+int osd_convert_root_to_new_seq(const struct lu_env *env,
+ struct osd_device *o);
/* osd_index.c */
int osd_index_try(const struct lu_env *env, struct dt_object *dt,
const struct dt_index_features *feat);
-
+int osd_fld_lookup(const struct lu_env *env, struct osd_device *osd,
+ const struct lu_fid *fid, struct lu_seq_range *range);
/* osd_xattr.c */
int __osd_xattr_load(udmu_objset_t *uos, uint64_t dnode, nvlist_t **sa_xattr);
return rc;
}
+static inline uint64_t attrs_fs2zfs(const uint32_t flags)
+{
+ return (((flags & FS_APPEND_FL) ? ZFS_APPENDONLY : 0) |
+ ((flags & FS_NODUMP_FL) ? ZFS_NODUMP : 0) |
+ ((flags & FS_IMMUTABLE_FL) ? ZFS_IMMUTABLE : 0));
+}
+
+static inline uint32_t attrs_zfs2fs(const uint64_t flags)
+{
+ return (((flags & ZFS_APPENDONLY) ? FS_APPEND_FL : 0) |
+ ((flags & ZFS_NODUMP) ? FS_NODUMP_FL : 0) |
+ ((flags & ZFS_IMMUTABLE) ? FS_IMMUTABLE_FL : 0));
+}
+
#endif
#endif /* _OSD_INTERNAL_H */