In order to prepare for replay lmm->lmm_stripe_offset (which contains
layout generation) has to be set to -1 (LOV_OFFSET_DEFAULT) in order
to not confuse lod_verify_v1v3
Fixes:
f90abfdc96 ("LU-169 lov: add generation number to LOV EA")
Fixes:
89693927f0 ("LU-8998 lod: accomodate to composite layout")
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-7008
Change-Id: I911d3c659b6c11cc8847f0517062dd8e4df89dff
Reviewed-on: https://review.whamcloud.com/34371
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#define LOV_PATTERN_F_RELEASED 0x80000000 /* HSM released file */
#define LOV_PATTERN_DEFAULT 0xffffffff
#define LOV_PATTERN_F_RELEASED 0x80000000 /* HSM released file */
#define LOV_PATTERN_DEFAULT 0xffffffff
+#define LOV_OFFSET_DEFAULT ((__u16)-1)
+
static inline bool lov_pattern_supported(__u32 pattern)
{
return (pattern & ~LOV_PATTERN_F_RELEASED) == LOV_PATTERN_RAID0 ||
static inline bool lov_pattern_supported(__u32 pattern)
{
return (pattern & ~LOV_PATTERN_F_RELEASED) == LOV_PATTERN_RAID0 ||
#define LMVEA_DELETE_VALUES(count, offset) \
((count) == 0 && (offset) == (typeof(offset))(-1))
#define LMVEA_DELETE_VALUES(count, offset) \
((count) == 0 && (offset) == (typeof(offset))(-1))
-#define LOV_OFFSET_DEFAULT ((__u16)-1)
-
struct lod_qos_rr {
spinlock_t lqr_alloc; /* protect allocation index */
__u32 lqr_start_idx; /* start index of new inode */
struct lod_qos_rr {
spinlock_t lqr_alloc; /* protect allocation index */
__u32 lqr_start_idx; /* start index of new inode */
lum->lmm_magic = cpu_to_le32(LOV_USER_MAGIC_V1);
lum->lmm_stripe_size = 0;
lum->lmm_stripe_count = 0;
lum->lmm_magic = cpu_to_le32(LOV_USER_MAGIC_V1);
lum->lmm_stripe_size = 0;
lum->lmm_stripe_count = 0;
- lum->lmm_stripe_offset = (typeof(lum->lmm_stripe_offset))(-1);
+ lum->lmm_stripe_offset =
+ (typeof(lum->lmm_stripe_offset))LOV_OFFSET_DEFAULT;
} else {
memcpy(lum, ea, ealen);
}
} else {
memcpy(lum, ea, ealen);
}
void *data, u32 size)
{
struct req_capsule *pill = &req->rq_pill;
void *data, u32 size)
{
struct req_capsule *pill = &req->rq_pill;
+ struct lov_user_md *lmm;
int rc = 0;
if (req_capsule_get_size(pill, field, RCL_CLIENT) < size) {
int rc = 0;
if (req_capsule_get_size(pill, field, RCL_CLIENT) < size) {
req_capsule_set_size(pill, field, RCL_CLIENT, size);
lmm = req_capsule_client_get(pill, field);
req_capsule_set_size(pill, field, RCL_CLIENT, size);
lmm = req_capsule_client_get(pill, field);
+ /* overwrite layout generation returned from the MDS */
+ lmm->lmm_stripe_offset =
+ (typeof(lmm->lmm_stripe_offset))LOV_OFFSET_DEFAULT;
+ }
}
run_test 133 "check resend of ongoing requests for lwp during failover"
}
run_test 133 "check resend of ongoing requests for lwp during failover"
+test_134() {
+ [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return 0
+
+ pool_add pool_134
+ pool_add_targets pool_134 1 1
+
+ mkdir $DIR/$tdir
+ $LFS setstripe -p pool_134 $DIR/$tdir
+
+ replay_barrier mds1
+
+ touch $DIR/$tdir/$tfile
+
+ fail mds1
+
+ [ -f $DIR/$tdir/$tfile ] || error "file does not exist"
+}
+run_test 134 "replay creation of a file created in a pool"
+
complete $SECONDS
check_and_cleanup_lustre
exit_status
complete $SECONDS
check_and_cleanup_lustre
exit_status