#include <linux/obd_support.h>
#include <linux/obd_class.h>
#include <linux/lustre_net.h>
+#include <linux/lustre_snap.h>
#include <linux/fcntl.h>
return ((void*)tmp + size_round(datalen));
}
-static __u32 mds_pack_open_flags(__u32 flags)
-{
- return
- (flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC |
- MDS_OPEN_DELAY_CREATE | MDS_OPEN_HAS_EA |
- MDS_OPEN_HAS_OBJS)) |
- ((flags & O_CREAT) ? MDS_OPEN_CREAT : 0) |
- ((flags & O_EXCL) ? MDS_OPEN_EXCL : 0) |
- ((flags & O_TRUNC) ? MDS_OPEN_TRUNC : 0) |
- ((flags & O_APPEND) ? MDS_OPEN_APPEND : 0) |
- ((flags & O_SYNC) ? MDS_OPEN_SYNC : 0) |
- ((flags & O_DIRECTORY) ? MDS_OPEN_DIRECTORY : 0) |
- 0;
-}
-
void *mdc_setattr_pack(struct lustre_msg *msg, struct mdc_op_data *data,
struct iattr *iattr, void *ea, int ealen,
void *ea2, int ea2len)
__swab32s (&b->suppgid);
__swab32s (&b->eadatasize);
}
-
+void lustre_swab_clonefs_info (struct clonefs_info *clone)
+{
+ __swab32s(&clone->clone_index);
+ __swab32s(&clone->clone_flags);
+}
void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa)
{
__swab32s (&sa->sa_opcode);
(long long)offsetof(struct llog_log_hdr, llh_tgtuuid));
LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
(long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
- LASSERTF(offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
- (long long)offsetof(struct llog_log_hdr, llh_reserved));
- LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
LASSERTF(offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
(long long)offsetof(struct llog_log_hdr, llh_bitmap));
LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
(long long)offsetof(struct llogd_body, lgd_cur_offset));
LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
(long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
- LASSERTF(LLOG_ORIGIN_HANDLE_CREATE == 501, " found %lld\n",
- (long long)LLOG_ORIGIN_HANDLE_CREATE);
+ LASSERTF(LLOG_ORIGIN_HANDLE_OPEN == 501, " found %lld\n",
+ (long long)LLOG_ORIGIN_HANDLE_OPEN);
LASSERTF(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502, " found %lld\n",
(long long)LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
LASSERTF(LLOG_ORIGIN_HANDLE_READ_HEADER == 503, " found %lld\n",