#ifndef _LUSTRE_USER_H
#define _LUSTRE_USER_H
#include <asm/types.h>
-#ifdef __KERNEL__
-#include <linux/string.h>
-#else
-#include <string.h>
-#endif
+
+#define IOC_MDC_TYPE 'i'
+#define IOC_MDC_GETSTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_mds_md *)
#define LL_IOC_GETFLAGS _IOR ('f', 151, long)
#define LL_IOC_SETFLAGS _IOW ('f', 152, long)
#define LL_IOC_LOV_GETSTRIPE _IOW ('f', 155, long)
#define LL_IOC_LOV_SETEA _IOW ('f', 156, long)
#define LL_IOC_RECREATE_OBJ _IOW ('f', 157, long)
-#define LL_IOC_GROUP_LOCK _IOW ('f', 158, long)
-#define LL_IOC_GROUP_UNLOCK _IOW ('f', 159, long)
-
-#define IOC_MDC_TYPE 'i'
-#define IOC_MDC_GETSTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_mds_md *)
+#define LL_IOC_CW_LOCK _IOW ('f', 158, long)
+#define LL_IOC_CW_UNLOCK _IOW ('f', 159, long)
+#define LL_IOC_MDC_MKDIRSTRIPE _IOW ('f', 160, long)
#define O_LOV_DELAY_CREATE 0100000000 /* hopefully this does not conflict */
#define LL_FILE_IGNORE_LOCK 0x00000001
-#define LL_FILE_GROUP_LOCKED 0x00000002
+#define LL_FILE_CW_LOCKED 0x00000002
#define LOV_USER_MAGIC_V1 0x0BD10BD0
#define LOV_USER_MAGIC LOV_USER_MAGIC_V1
struct lov_user_ost_data_v1 { /* per-stripe data structure */
__u64 l_object_id; /* OST object ID */
__u64 l_object_gr; /* OST object group (creating MDS number) */
- __u32 l_ost_gen; /* generation of this OST index */
- __u32 l_ost_idx; /* OST index in LOV */
+ __u32 l_ost_generation; /* generation of this OST index */
+ __u16 l_ost_idx; /* OST index in LOV */
+ __u16 l_reserved2;
} __attribute__((packed));
#define lov_user_md lov_user_md_v1
struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
} __attribute__((packed));
-struct ll_recreate_obj {
- __u64 lrc_id;
- __u32 lrc_ost_idx;
+struct ll_user_mkdir_stripe {
+ int lums_namelen;
+ char *lums_name;
+ mode_t lums_mode;
+ int lums_nstripes;
};
-struct obd_uuid {
- __u8 uuid[40];
-};
-
-static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2)
-{
- return strcmp(u1->uuid, u2->uuid) == 0;
-}
-
-static inline void obd_str2uuid(struct obd_uuid *uuid, char *tmp)
-{
- strncpy(uuid->uuid, tmp, sizeof(*uuid));
- uuid->uuid[sizeof(*uuid) - 1] = '\0';
-}
+extern int op_create_file(char *name, long stripe_size, int stripe_offset,
+ int stripe_count);
+extern int op_create_dir(char *name, int stripe_count);
+extern int get_file_stripe(char *path, struct lov_user_md *lum);
#endif /* _LUSTRE_USER_H */