Replicated (mirrored) components that are preferred for read or write.
For example, because they are located on SSD-based OSTs, or are more
local on the network to clients.
+.TP
+.B nosync
+Replicated (mirrored) components that do not resync using \fB
+lfs mirror resync\fR. Files with the \fBnosync\fR flag will also
+print the timestamp when the flag was set on the replica.
.RE
.TP
.BR --component-id | --comp-id [ =\fIid ]| -I [ \fIid ]
If there is no stale mirror for the \fImirrored_file(s)\fR, then the command does
nothing. Otherwise, it will copy data from synced mirror to stale mirror(s), and
mark all successfully copied mirror(s) as SYNC.
+.br
+If \fB\-\-only\fR option is not specified, the \fBnosync\fR mirror(s) (i.e.
+components that have this flag set) will not be synced.
+.br
If \fB\-\-only\fR <\fImirror_id\fR[,...]> option is specified, then the
-command will resynchronize the mirror(s) specified by the \fImirror_id\fR(s).
+command will resynchronize the mirror(s) specified by the \fImirror_id\fR(s),
+even nosync mirror(s) will be resynchronized as well.
This option cannot be used when multiple mirrored files are specified.
.SH OPTIONS
.TP
.SH EXAMPLES
.TP
.B lfs mirror resync /mnt/lustre/file1 /mnt/lustre/file2
-Resynchronize all of the stale mirror(s) for /mnt/lustre/file1 and /mnt/lustre/file2.
+Resynchronize all of the stale and sync-able mirror(s) for /mnt/lustre/file1 and /mnt/lustre/file2.
.TP
.B lfs mirror resync --only 4,5 /mnt/lustre/file1
Resynchronize mirrors with mirror ID 4 and 5 for /mnt/lustre/file1 even if they
.I flags
are:
.RS
-.B init\fR - component is initialized (has allocated objects). Used with
+.B * init\fR - component is initialized (has allocated objects). Used with
.B --component-del --component-flags ^init
to find uninitialized components.
.RE
.RS
-.B prefer\fR - component preferred for read/write in a mirrored file
+.B * prefer\fR - component preferred for read/write in a mirrored file
.RE
.RS
-.B stale\fR - component has outdated data in a mirrored file. Once a
+.B * stale\fR - component has outdated data in a mirrored file. Once a
component is marked
.BR stale ,
it isn't permitted to clear this flag directly. \fBlfs-mirror-resync\fR(1)
is required to clear the flag.
.RE
.RS
+.B * nosync\fR - mirror components will not be resynched by default when the
+.BR lfs-mirror-resync (1)
+command is run. This option is useful to freeze a file mirror as an old
+version or snapshot of the file.
+.RE
+.RS
A leading '^' before \fIflags\fR clears the flags, or finds components not
matching the flags. Multiple flags can be separated by comma(s).
.RE
{ LCME_FL_STALE, "stale" },
{ LCME_FL_PREF_RW, "prefer" },
{ LCME_FL_OFFLINE, "offline" },
+ { LCME_FL_NOSYNC, "nosync" },
};
/**
LCME_FL_PREF_RW = LCME_FL_PREF_RD | LCME_FL_PREF_WR,
LCME_FL_OFFLINE = 0x00000008, /* Not used */
LCME_FL_INIT = 0x00000010, /* instantiated */
+ LCME_FL_NOSYNC = 0x00000020, /* FLR: no sync for the mirror */
LCME_FL_NEG = 0x80000000 /* used to indicate a negative flag,
won't be stored on disk */
};
#define LCME_KNOWN_FLAGS (LCME_FL_NEG | LCME_FL_INIT | LCME_FL_STALE | \
- LCME_FL_PREF_RW)
+ LCME_FL_PREF_RW | LCME_FL_NOSYNC)
/* The flags can be set by users at mirror creation time. */
#define LCME_USER_FLAGS (LCME_FL_PREF_RW)
+/* The flags are for mirrors */
+#define LCME_MIRROR_FLAGS (LCME_FL_NOSYNC)
+
/* the highest bit in obdo::o_layout_version is used to mark if the file is
* being resynced. */
#define LU_LAYOUT_RESYNC LCME_FL_NEG
start from lov_comp_md_v1 */
__u32 lcme_size; /* size of component blob */
__u32 lcme_layout_gen;
+ __u64 lcme_timestamp; /* snapshot time if applicable*/
__u32 lcme_padding_1;
- __u64 lcme_padding_2;
} __attribute__((packed));
#define SEQ_ID_MAX 0x0000FFFF
__u16 llc_stripe_offset;
__u16 llc_stripe_count;
__u16 llc_stripes_allocated;
+ __u64 llc_timestamp; /* snapshot time */
char *llc_pool;
/* ost list specified with LOV_USER_MAGIC_SPECIFIC lum */
struct ost_pool llc_ostlist;
/* component could be un-inistantiated */
lcme->lcme_flags = cpu_to_le32(lod_comp->llc_flags);
+ if (lod_comp->llc_flags & LCME_FL_NOSYNC)
+ lcme->lcme_timestamp =
+ cpu_to_le64(lod_comp->llc_timestamp);
lcme->lcme_extent.e_start =
cpu_to_le64(lod_comp->llc_extent.e_start);
lcme->lcme_extent.e_end =
lod_comp->llc_extent.e_end = le64_to_cpu(ext->e_end);
lod_comp->llc_flags =
le32_to_cpu(comp_v1->lcm_entries[i].lcme_flags);
+ if (lod_comp->llc_flags & LCME_FL_NOSYNC)
+ lod_comp->llc_timestamp = le64_to_cpu(
+ comp_v1->lcm_entries[i].lcme_timestamp);
lod_comp->llc_id =
le32_to_cpu(comp_v1->lcm_entries[i].lcme_id);
if (lod_comp->llc_id == LCME_ID_INVAL)
for (i = 0; i < comp_v1->lcm_entry_count; i++) {
__u32 id = comp_v1->lcm_entries[i].lcme_id;
__u32 flags = comp_v1->lcm_entries[i].lcme_flags;
+ __u32 mirror_flag = flags & LCME_MIRROR_FLAGS;
+ bool neg = flags & LCME_FL_NEG;
if (flags & LCME_FL_INIT) {
if (changed)
RETURN(-EINVAL);
}
+ flags &= ~(LCME_MIRROR_FLAGS | LCME_FL_NEG);
for (j = 0; j < lo->ldo_comp_cnt; j++) {
lod_comp = &lo->ldo_comp_entries[j];
- if (id != lod_comp->llc_id)
+
+ /* lfs only put one flag in each entry */
+ if ((flags && id != lod_comp->llc_id) ||
+ (mirror_flag && mirror_id_of(id) !=
+ mirror_id_of(lod_comp->llc_id)))
continue;
- if (flags & LCME_FL_NEG) {
- flags &= ~LCME_FL_NEG;
- lod_comp->llc_flags &= ~flags;
+ if (neg) {
+ if (flags)
+ lod_comp->llc_flags &= ~flags;
+ if (mirror_flag)
+ lod_comp->llc_flags &= ~mirror_flag;
} else {
- lod_comp->llc_flags |= flags;
+ if (flags)
+ lod_comp->llc_flags |= flags;
+ if (mirror_flag) {
+ lod_comp->llc_flags |= mirror_flag;
+ if (mirror_flag & LCME_FL_NOSYNC)
+ lod_comp->llc_timestamp =
+ ktime_get_real_seconds();
+ }
}
changed = true;
}
lod_comp->llc_extent.e_end = le64_to_cpu(ext->e_end);
lod_comp->llc_flags =
le32_to_cpu(comp_v1->lcm_entries[i].lcme_flags);
+ if (lod_comp->llc_flags & LCME_FL_NOSYNC)
+ lod_comp->llc_timestamp = le64_to_cpu(
+ comp_v1->lcm_entries[i].lcme_timestamp);
lod_comp->llc_id =
le32_to_cpu(comp_v1->lcm_entries[i].lcme_id);
if (lod_comp->llc_id == LCME_ID_INVAL)
lsm->lsm_entries[i] = lsme;
lsme->lsme_id = le32_to_cpu(lcme->lcme_id);
lsme->lsme_flags = le32_to_cpu(lcme->lcme_flags);
+ if (lsme->lsme_flags & LCME_FL_NOSYNC)
+ lsme->lsme_timestamp =
+ le64_to_cpu(lcme->lcme_timestamp);
lu_extent_le_to_cpu(&lsme->lsme_extent, &lcme->lcme_extent);
if (i == entry_count - 1) {
u32 lsme_magic;
u32 lsme_flags;
u32 lsme_pattern;
+ u64 lsme_timestamp;
u32 lsme_stripe_size;
u16 lsme_stripe_count;
u16 lsme_layout_gen;
lcme->lcme_id = cpu_to_le32(lsme->lsme_id);
lcme->lcme_flags = cpu_to_le32(lsme->lsme_flags);
+ if (lsme->lsme_flags & LCME_FL_NOSYNC)
+ lcme->lcme_timestamp =
+ cpu_to_le64(lsme->lsme_timestamp);
lcme->lcme_extent.e_start =
cpu_to_le64(lsme->lsme_extent.e_start);
lcme->lcme_extent.e_end =
CDEBUG(lvl, "\tentry %d:\n", i);
CDEBUG(lvl, "\tlcme_id: %#x\n", ent->lcme_id);
CDEBUG(lvl, "\tlcme_flags: %#x\n", ent->lcme_flags);
+ if (ent->lcme_flags & LCME_FL_NOSYNC)
+ CDEBUG(lvl, "\tlcme_timestamp: %llu\n",
+ ent->lcme_timestamp);
CDEBUG(lvl, "\tlcme_extent.e_start: %llu\n",
ent->lcme_extent.e_start);
CDEBUG(lvl, "\tlcme_extent.e_end: %llu\n",
}
__swab32s(&ent->lcme_id);
__swab32s(&ent->lcme_flags);
+ __swab64s(&ent->lcme_timestamp);
__swab64s(&ent->lcme_extent.e_start);
__swab64s(&ent->lcme_extent.e_end);
__swab32s(&ent->lcme_offset);
__swab32s(&ent->lcme_size);
__swab32s(&ent->lcme_layout_gen);
CLASSERT(offsetof(typeof(*ent), lcme_padding_1) != 0);
- CLASSERT(offsetof(typeof(*ent), lcme_padding_2) != 0);
v1 = (struct lov_user_md_v1 *)((char *)lum + off);
stripe_count = v1->lmm_stripe_count;
#include <lustre_disk.h>
#include <uapi/linux/lustre/lustre_lfsck_user.h>
-
void lustre_assert_wire_constants(void)
{
/* Wire protocol assertions generated by 'wirecheck'
(long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen));
LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen));
- LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 36, "found %lld\n",
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp) == 36, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 44, "found %lld\n",
(long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1));
LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1));
- LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2) == 40, "found %lld\n",
- (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2));
- LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2));
LASSERTF(LCME_FL_INIT == 0x00000010UL, "found 0x%.8xUL\n",
(unsigned)LCME_FL_INIT);
LASSERTF(LCME_FL_NEG == 0x80000000UL, "found 0x%.8xUL\n",
(long long)(int)offsetof(struct obd_statfs, os_bavail));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
+ LASSERTF((int)offsetof(struct obd_statfs, os_files) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct obd_statfs, os_files));
+ LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_files) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_statfs *)0)->os_files));
LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_ffree));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_namelen));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
+ LASSERTF((int)offsetof(struct obd_statfs, os_maxbytes) == 96, "found %lld\n",
+ (long long)(int)offsetof(struct obd_statfs, os_maxbytes));
+ LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_maxbytes) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_statfs *)0)->os_maxbytes));
LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_state));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, "found %lld\n",
LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
(long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
}
-
local fl
local expected_list=$(comma_list $expected)
for fl in ${expected_list//,/ }; do
- echo $value | grep -q $fl || {
+ local neg=0
+
+ [[ ${fl:0:1} = "^" ]] && neg=1
+ [[ $neg = 1 ]] && fl=${fl:1}
+
+ $(echo $value | grep -q $fl)
+ local match=$?
+ # 0: matched; 1: not matched
+
+ if [[ $neg = 0 && $match != 0 ||
+ $neg = 1 && $match = 0 ]]; then
$getstripe_cmd $tf
- error "expected flag $fl existing on $comp_id"
- }
+ [[ $neg = 0 ]] && # expect the flag
+ error "expected flag '$fl' not in $comp_id"
+ [[ $neg = 1 ]] && # not expect the flag
+ error "not expected flag '$fl' in $comp_id"
+ fi
done
return
}
}
run_test 47 "Verify mirror obj alloc"
+test_48() {
+ local tf=$DIR/$tfile
+
+ rm -f $tf
+ echo " ** create 2 mirrors FLR file $tf"
+ $LFS mirror create -N -E2M -Eeof --flags prefer \
+ -N -E1M -Eeof $tf ||
+ error "create FLR file $tf failed"
+
+ echo " ** write it"
+ dd if=/dev/urandom of=$tf bs=1M count=3 || error "write $tf failed"
+ verify_flr_state $tf "wp"
+
+ local sum0=$(md5sum < $tf)
+
+ echo " ** resync the file"
+ $LFS mirror resync $tf
+
+ echo " ** snapshot mirror 2"
+ $LFS setstripe --comp-set -I 0x20003 --comp-flags=nosync $tf
+
+ echo " ** write it again"
+ dd if=/dev/urandom of=$tf bs=1M count=3 || error "write $tf failed"
+ echo " ** resync it again"
+ $LFS mirror resync $tf
+
+ verify_flr_state $tf "wp"
+ verify_comp_attr lcme_flags $tf 0x20003 nosync,stale
+
+ local sum1=$($LFS mirror dump -N1 $tf | md5sum)
+ local sum2=$($LFS mirror dump -N2 $tf | md5sum)
+
+ echo " ** verify mirror 2 doesn't change"
+ echo "original checksum: $sum0"
+ echo "mirror 1 checksum: $sum1"
+ echo "mirror 2 checksum: $sum2"
+ [[ $sum0 = $sum2 ]] ||
+ error "original checksum: $sum0, mirror 2 checksum: $sum2"
+ echo " ** mirror 2 stripe info"
+ $LFS getstripe -v --mirror-index=2 $tf
+
+ echo " ** resync mirror 2"
+ $LFS mirror resync --only 2 $tf
+
+ verify_flr_state $tf "ro"
+ verify_comp_attr lcme_flags $tf 0x20003 nosync,^stale
+
+ sum1=$($LFS mirror dump -N1 $tf | md5sum)
+ sum2=$($LFS mirror dump -N2 $tf | md5sum)
+
+ echo " ** verify mirror 2 resync-ed"
+ echo "original checksum: $sum0"
+ echo "mirror 1 checksum: $sum1"
+ echo "mirror 2 checksum: $sum2"
+ [[ $sum1 = $sum2 ]] ||
+ error "mirror 1 checksum: $sum1, mirror 2 checksum: $sum2"
+ echo " ** mirror 2 stripe info"
+ $LFS getstripe -v --mirror-index=2 $tf
+}
+run_test 48 "Verify snapshot mirror"
+
ctrl_file=$(mktemp /tmp/CTRL.XXXXXX)
lock_file=$(mktemp /var/lock/FLR.XXXXXX)
#include <unistd.h>
#endif
#include <poll.h>
+#include <time.h>
#include <libcfs/util/ioctl.h>
#include <libcfs/util/param.h>
lcme_flags2str(entry->lcme_flags);
separator = "\n";
}
+ /* print snapshot timestamp if its a nosync comp */
+ if ((verbose & VERBOSE_COMP_FLAGS) &&
+ (entry->lcme_flags & LCME_FL_NOSYNC)) {
+ llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
+ if (verbose & ~VERBOSE_COMP_FLAGS)
+ llapi_printf(LLAPI_MSG_NORMAL,
+ "%4slcme_timestamp: ", " ");
+ if (yaml) {
+ llapi_printf(LLAPI_MSG_NORMAL, "%llu",
+ entry->lcme_timestamp);
+ } else {
+ time_t stamp = entry->lcme_timestamp;
+ char *date_str = asctime(localtime(&stamp));
+
+ date_str[strlen(date_str) - 1] = '\0';
+ llapi_printf(LLAPI_MSG_NORMAL, "'%s'", date_str);
+ }
+
+ separator = "\n";
+ }
if (verbose & VERBOSE_COMP_START) {
llapi_printf(LLAPI_MSG_NORMAL, "%s", separator);
struct lu_extent llc_extent; /* [start, end) of component */
uint32_t llc_id; /* unique ID of component */
uint32_t llc_flags; /* LCME_FL_* flags */
+ uint64_t llc_timestamp; /* snapshot timestamp */
struct list_head llc_list; /* linked to the llapi_layout
components list */
};
ent = &comp_v1->lcm_entries[i];
__swab32s(&ent->lcme_id);
__swab32s(&ent->lcme_flags);
+ __swab64s(&ent->lcme_timestamp);
__swab64s(&ent->lcme_extent.e_start);
__swab64s(&ent->lcme_extent.e_end);
__swab32s(&ent->lcme_offset);
comp->llc_extent.e_end = ent->lcme_extent.e_end;
comp->llc_id = ent->lcme_id;
comp->llc_flags = ent->lcme_flags;
+ if (comp->llc_flags & LCME_FL_NOSYNC)
+ comp->llc_timestamp = ent->lcme_timestamp;
} else {
comp->llc_extent.e_start = 0;
comp->llc_extent.e_end = LUSTRE_EOF;
ent = &comp_v1->lcm_entries[ent_idx];
ent->lcme_id = comp->llc_id;
ent->lcme_flags = comp->llc_flags;
+ if (ent->lcme_flags & LCME_FL_NOSYNC)
+ ent->lcme_timestamp = comp->llc_timestamp;
ent->lcme_extent.e_start = comp->llc_extent.e_start;
ent->lcme_extent.e_end = comp->llc_extent.e_end;
ent->lcme_size = blob_size;
/* not in the specified mirror */
if (j == ids_nr)
goto next;
+ } else if (flags & LCME_FL_NOSYNC) {
+ /* if not specified mirrors, do not resync "nosync"
+ * mirrors */
+ goto next;
}
rc = llapi_layout_comp_id_get(layout, &id);
BLANK_LINE();
CHECK_STRUCT(lustre_som_attrs);
CHECK_MEMBER(lustre_som_attrs, lsa_valid);
- CHECK_MEMBER(lustre_som_attrs, lsa_reserved;
+ CHECK_MEMBER(lustre_som_attrs, lsa_reserved);
CHECK_MEMBER(lustre_som_attrs, lsa_size);
CHECK_MEMBER(lustre_som_attrs, lsa_blocks);
}
CHECK_MEMBER(lov_comp_md_entry_v1, lcme_offset);
CHECK_MEMBER(lov_comp_md_entry_v1, lcme_size);
CHECK_MEMBER(lov_comp_md_entry_v1, lcme_layout_gen);
+ CHECK_MEMBER(lov_comp_md_entry_v1, lcme_timestamp);
CHECK_MEMBER(lov_comp_md_entry_v1, lcme_padding_1);
- CHECK_MEMBER(lov_comp_md_entry_v1, lcme_padding_2);
CHECK_VALUE_X(LCME_FL_INIT);
CHECK_VALUE_X(LCME_FL_NEG);
CHECK_MEMBER(obd_statfs, os_blocks);
CHECK_MEMBER(obd_statfs, os_bfree);
CHECK_MEMBER(obd_statfs, os_bavail);
+ CHECK_MEMBER(obd_statfs, os_files);
CHECK_MEMBER(obd_statfs, os_ffree);
CHECK_MEMBER(obd_statfs, os_fsid);
CHECK_MEMBER(obd_statfs, os_bsize);
CHECK_MEMBER(obd_statfs, os_namelen);
+ CHECK_MEMBER(obd_statfs, os_maxbytes);
CHECK_MEMBER(obd_statfs, os_state);
CHECK_MEMBER(obd_statfs, os_fprecreated);
- CHECK_MEMBER(obd_statfs, os_spare2);
+ CHECK_MEMBER(obd_statfs, os_granted);
CHECK_MEMBER(obd_statfs, os_spare3);
CHECK_MEMBER(obd_statfs, os_spare4);
CHECK_MEMBER(obd_statfs, os_spare5);
LASSERTF(MDS_ATTR_LSIZE == 0x0000000000020000ULL, "found 0x%.16llxULL\n",
(long long)MDS_ATTR_LSIZE);
LASSERTF(MDS_ATTR_LBLOCKS == 0x0000000000040000ULL, "found 0x%.16llxULL\n",
- (long long)MDS_ATTR_BLOCKS);
+ (long long)MDS_ATTR_LBLOCKS);
LASSERTF(FLD_QUERY == 900, "found %lld\n",
(long long)FLD_QUERY);
LASSERTF(FLD_READ == 901, "found %lld\n",
(long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen));
LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen));
- LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 36, "found %lld\n",
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp) == 36, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 44, "found %lld\n",
(long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1));
LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1));
- LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2) == 40, "found %lld\n",
- (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2));
- LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2));
LASSERTF(LCME_FL_INIT == 0x00000010UL, "found 0x%.8xUL\n",
(unsigned)LCME_FL_INIT);
LASSERTF(LCME_FL_NEG == 0x80000000UL, "found 0x%.8xUL\n",
(long long)(int)offsetof(struct obd_statfs, os_bavail));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
+ LASSERTF((int)offsetof(struct obd_statfs, os_files) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct obd_statfs, os_files));
+ LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_files) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_statfs *)0)->os_files));
LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_ffree));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_namelen));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
+ LASSERTF((int)offsetof(struct obd_statfs, os_maxbytes) == 96, "found %lld\n",
+ (long long)(int)offsetof(struct obd_statfs, os_maxbytes));
+ LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_maxbytes) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_statfs *)0)->os_maxbytes));
LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, "found %lld\n",
(long long)(int)offsetof(struct obd_statfs, os_state));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, "found %lld\n",
LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
(long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
}
-