From 68825cdf81688faa8d090a3a5f2321b66c2cec63 Mon Sep 17 00:00:00 2001 From: Vitaly Fertman Date: Fri, 13 Mar 2020 16:42:35 +0300 Subject: [PATCH] LU-13366 lod: check for extension size at instantiation time lod_statfs_and_check() may consider an OST as OK, but SEL needs its extension size to fit the free space and the OST may turn out to be low-on-space, thus inappropriate OST may be chosen, SEL cannot use it and ENOSPC occurs. Take the extension size into account at the object allocation time. If none of OSTs is able to allocate an object, try to allocate in old manner instead of returning ENOSPC from lod_qos_prep_create(). Adjust tests to work on smaller extension sizes to fit into OSTs used for sanity tests to enable the new logic above. Signed-off-by: Vitaly Fertman Change-Id: If5159200a72a68a7261aa7031e58a1ac6a8e3f24 Reviewed-by: Alexey Lyashkov Reviewed-by: Andriy Skulysh Tested-by: Elena Gryaznova Reviewed-on: https://es-gerrit.dev.cray.com/156372 HPE-bug-id: LUS-8157 Reviewed-on: https://review.whamcloud.com/37961 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin --- lustre/lod/lod_internal.h | 2 +- lustre/lod/lod_object.c | 69 ++++++++++++++++++++++++++-------------------- lustre/lod/lod_qos.c | 63 +++++++++++++++++++++++++++++------------- lustre/osp/osp_dev.c | 8 +++--- lustre/osp/osp_precreate.c | 9 +++++- lustre/tests/sanity-pfl.sh | 22 +++++++-------- 6 files changed, 107 insertions(+), 66 deletions(-) diff --git a/lustre/lod/lod_internal.h b/lustre/lod/lod_internal.h index 00fad0a..6140166 100644 --- a/lustre/lod/lod_internal.h +++ b/lustre/lod/lod_internal.h @@ -686,7 +686,7 @@ int lod_qos_parse_config(const struct lu_env *env, struct lod_object *lo, const struct lu_buf *buf); int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo, struct lu_attr *attr, struct thandle *th, - int comp_idx); + int comp_idx, __u64 reserve); __u16 lod_comp_entry_stripe_count(struct lod_object *lo, struct lod_layout_component *entry, bool is_dir); diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 0381a6e..1385967 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -4223,6 +4223,7 @@ static int lod_layout_repeat_comp(const struct lu_env *env, new_comp->llc_flags &= ~LCME_FL_INIT; new_comp->llc_stripe = NULL; new_comp->llc_stripes_allocated = 0; + new_comp->llc_ost_indices = NULL; new_comp->llc_stripe_offset = LOV_OFFSET_DEFAULT; /* for uninstantiated components, layout gen stores default stripe * offset */ @@ -6290,7 +6291,9 @@ static int lod_invalidate(const struct lu_env *env, struct dt_object *dt) } static int lod_declare_instantiate_components(const struct lu_env *env, - struct lod_object *lo, struct thandle *th) + struct lod_object *lo, + struct thandle *th, + __u64 reserve) { struct lod_thread_info *info = lod_env_info(env); int i; @@ -6301,7 +6304,7 @@ static int lod_declare_instantiate_components(const struct lu_env *env, for (i = 0; i < info->lti_count; i++) { rc = lod_qos_prep_create(env, lo, NULL, th, - info->lti_comp_idx[i]); + info->lti_comp_idx[i], reserve); if (rc) break; } @@ -6337,15 +6340,15 @@ static int lod_declare_instantiate_components(const struct lu_env *env, */ static bool lod_sel_osts_allowed(const struct lu_env *env, struct lod_object *lo, - int index, __u64 extension_size, + int index, __u64 reserve, struct lu_extent *extent, struct lu_extent *comp_extent, int write) { struct lod_layout_component *lod_comp = &lo->ldo_comp_entries[index]; struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); - struct obd_statfs *sfs = &lod_env_info(env)->lti_osfs; + struct lod_thread_info *tinfo = lod_env_info(env); + struct obd_statfs *sfs = &tinfo->lti_osfs; __u64 available = 0; - __u64 size; bool ret = true; int i, rc; @@ -6353,21 +6356,6 @@ static bool lod_sel_osts_allowed(const struct lu_env *env, LASSERT(lod_comp->llc_stripe_count != 0); - if (write == 0 || - (extent->e_start == 0 && extent->e_end == OBD_OBJECT_EOF)) { - /* truncate or append */ - size = extension_size; - } else { - /* In case of write op, check the real write extent, - * it may be larger than the extension_size */ - size = roundup(min(extent->e_end, comp_extent->e_end) - - max(extent->e_start, comp_extent->e_start), - extension_size); - } - /* extension_size is file level, so we must divide by stripe count to - * compare it to available space on a single OST */ - size /= lod_comp->llc_stripe_count; - lod_getref(&lod->lod_ost_descs); for (i = 0; i < lod_comp->llc_stripe_count; i++) { int index = lod_comp->llc_ost_indices[i]; @@ -6428,11 +6416,11 @@ static bool lod_sel_osts_allowed(const struct lu_env *env, (100ull * sfs->os_bavail) / sfs->os_blocks, (100ull * sfs->os_bfree) / sfs->os_blocks); - if (size * repeated > available) { + if (reserve * repeated > available) { ret = false; CDEBUG(D_LAYOUT, "low space on ost %d, available %llu " - "< extension size %llu\n", index, available, - extension_size); + "< extension size %llu repeated %d\n", index, + available, reserve, repeated); break; } } @@ -6538,6 +6526,26 @@ static __u64 lod_extension_new_end(__u64 extension_size, __u64 extent_end, return new_end; } +/** + * Calculate the exact reservation (per-OST extension_size) on the OSTs being + * instantiated. It needs to be calculated in advance and taken into account at + * the instantiation time, because otherwise lod_statfs_and_check() may consider + * an OST as OK, but SEL needs its extension_size to fit the free space and the + * OST may turn out to be low-on-space, thus inappropriate OST may be used and + * ENOSPC occurs. + * + * \param[in] lod_comp lod component we are checking + * + * \retval size to reserved on each OST of lod_comp's stripe. + */ +static __u64 lod_sel_stripe_reserved(struct lod_layout_component *lod_comp) +{ + /* extension_size is file level, so we must divide by stripe count to + * compare it to available space on a single OST */ + return lod_comp->llc_stripe_size * SEL_UNIT_SIZE / + lod_comp->llc_stripe_count; +} + /* As lod_sel_handler() could be re-entered for the same component several * times, this is the data for the next call. Fields could be changed to * component indexes when needed, (e.g. if there is no need to instantiate @@ -6619,7 +6627,7 @@ static int lod_sel_handler(const struct lu_env *env, struct lod_layout_component *lod_comp; struct lod_layout_component *prev; struct lod_layout_component *next = NULL; - __u64 extension_size; + __u64 extension_size, reserve; __u64 new_end = 0; bool repeated; int change = 0; @@ -6656,11 +6664,13 @@ static int lod_sel_handler(const struct lu_env *env, RETURN(-EINVAL); } + reserve = lod_sel_stripe_reserved(lod_comp); + if (!prev->llc_stripe) { CDEBUG(D_LAYOUT, "Previous component not inited\n"); info->lti_count = 1; info->lti_comp_idx[0] = index - 1; - rc = lod_declare_instantiate_components(env, lo, th); + rc = lod_declare_instantiate_components(env, lo, th, reserve); /* ENOSPC tells us we can't use this component. If there is * a next or we are repeating, we either spill over (next) or * extend the original comp (repeat). Otherwise, return the @@ -6672,8 +6682,7 @@ static int lod_sel_handler(const struct lu_env *env, } if (sd->sd_force == 0 && rc == 0) - rc = !lod_sel_osts_allowed(env, lo, index - 1, - extension_size, extent, + rc = !lod_sel_osts_allowed(env, lo, index - 1, reserve, extent, &lod_comp->llc_extent, write); repeated = !!(sd->sd_repeat); @@ -6987,7 +6996,7 @@ static int lod_declare_update_plain(const struct lu_env *env, RETURN(-EALREADY); lod_obj_inc_layout_gen(lo); - rc = lod_declare_instantiate_components(env, lo, th); + rc = lod_declare_instantiate_components(env, lo, th, 0); EXIT; out: if (rc) @@ -7404,7 +7413,7 @@ static int lod_declare_update_rdonly(const struct lu_env *env, lo->ldo_layout_gen = layout_version & 0xffff; } - rc = lod_declare_instantiate_components(env, lo, th); + rc = lod_declare_instantiate_components(env, lo, th, 0); if (rc) GOTO(out, rc); @@ -7548,7 +7557,7 @@ static int lod_declare_update_write_pending(const struct lu_env *env, lo->ldo_flr_state = LCM_FL_SYNC_PENDING; } - rc = lod_declare_instantiate_components(env, lo, th); + rc = lod_declare_instantiate_components(env, lo, th, 0); if (rc) GOTO(out, rc); diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index eefc286..644ced9 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -100,8 +100,9 @@ static inline int lod_statfs_check(struct lu_tgt_descs *ltd, */ static int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d, struct lu_tgt_descs *ltd, - struct lu_tgt_desc *tgt) + struct lu_tgt_desc *tgt, __u64 reserve) { + struct obd_statfs_info info = { 0 }; struct lov_desc *desc = <d->ltd_lov_desc; int rc; ENTRY; @@ -109,7 +110,8 @@ static int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d, LASSERT(d); LASSERT(tgt); - rc = dt_statfs(env, tgt->ltd_tgt, &tgt->ltd_statfs); + info.os_enable_pre = 1; + rc = dt_statfs_info(env, tgt->ltd_tgt, &tgt->ltd_statfs, &info); if (rc && rc != -ENOTCONN) CERROR("%s: statfs: rc = %d\n", lod2obd(d)->obd_name, rc); @@ -119,6 +121,11 @@ static int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d, return rc; } + if (reserve && + (reserve + (info.os_reserved_mb_low << 20) > + tgt->ltd_statfs.os_bavail * tgt->ltd_statfs.os_bsize)) + return -ENOSPC; + /* check whether device has changed state (active, inactive) */ if (rc != 0 && tgt->ltd_active) { /* turned inactive? */ @@ -211,7 +218,7 @@ void lod_qos_statfs_update(const struct lu_env *env, struct lod_device *lod, ltd_foreach_tgt(ltd, tgt) { avail = tgt->ltd_statfs.os_bavail; - if (lod_statfs_and_check(env, lod, ltd, tgt)) + if (lod_statfs_and_check(env, lod, ltd, tgt, 0)) continue; if (tgt->ltd_statfs.os_bavail != avail) @@ -615,7 +622,8 @@ static int lod_check_and_reserve_ost(const struct lu_env *env, struct dt_object **stripe, __u32 *ost_indices, struct thandle *th, - bool *overstriped) + bool *overstriped, + __u64 reserve) { struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); struct lod_avoid_guide *lag = &lod_env_info(env)->lti_avoid; @@ -626,7 +634,7 @@ static int lod_check_and_reserve_ost(const struct lu_env *env, ENTRY; - rc = lod_statfs_and_check(env, lod, &lod->lod_ost_descs, ost); + rc = lod_statfs_and_check(env, lod, &lod->lod_ost_descs, ost, reserve); if (rc) RETURN(rc); @@ -725,7 +733,8 @@ static int lod_check_and_reserve_ost(const struct lu_env *env, */ static int lod_ost_alloc_rr(const struct lu_env *env, struct lod_object *lo, struct dt_object **stripe, __u32 *ost_indices, - int flags, struct thandle *th, int comp_idx) + int flags, struct thandle *th, int comp_idx, + __u64 reserve) { struct lod_layout_component *lod_comp; struct lod_device *m = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); @@ -819,7 +828,8 @@ repeat_find: spin_unlock(&lqr->lqr_alloc); rc = lod_check_and_reserve_ost(env, lo, lod_comp, ost_idx, speed, &stripe_idx, stripe, - ost_indices, th, &overstriped); + ost_indices, th, &overstriped, + reserve); spin_lock(&lqr->lqr_alloc); if (rc != 0 && OST_TGT(m, ost_idx)->ltd_connecting) @@ -1089,7 +1099,7 @@ repeat_find: */ static int lod_alloc_ost_list(const struct lu_env *env, struct lod_object *lo, struct dt_object **stripe, __u32 *ost_indices, - struct thandle *th, int comp_idx) + struct thandle *th, int comp_idx, __u64 reserve) { struct lod_layout_component *lod_comp; struct lod_device *m = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); @@ -1147,7 +1157,8 @@ static int lod_alloc_ost_list(const struct lu_env *env, struct lod_object *lo, } rc = lod_statfs_and_check(env, m, &m->lod_ost_descs, - LTD_TGT(&m->lod_ost_descs, ost_idx)); + LTD_TGT(&m->lod_ost_descs, ost_idx), + reserve); if (rc < 0) /* this OSP doesn't feel well */ break; @@ -1201,7 +1212,8 @@ static int lod_alloc_ost_list(const struct lu_env *env, struct lod_object *lo, static int lod_ost_alloc_specific(const struct lu_env *env, struct lod_object *lo, struct dt_object **stripe, __u32 *ost_indices, - int flags, struct thandle *th, int comp_idx) + int flags, struct thandle *th, int comp_idx, + __u64 reserve) { struct lod_layout_component *lod_comp; struct lod_device *m = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); @@ -1294,7 +1306,8 @@ repeat_find: * start OST, then it can be skipped, otherwise skip it only * if it is inactive/recovering/out-of-space." */ - rc = lod_statfs_and_check(env, m, &m->lod_ost_descs, tgt); + rc = lod_statfs_and_check(env, m, &m->lod_ost_descs, + tgt, reserve); if (rc) { /* this OSP doesn't feel well */ continue; @@ -1395,7 +1408,8 @@ out: */ static int lod_ost_alloc_qos(const struct lu_env *env, struct lod_object *lo, struct dt_object **stripe, __u32 *ost_indices, - int flags, struct thandle *th, int comp_idx) + int flags, struct thandle *th, int comp_idx, + __u64 reserve) { struct lod_layout_component *lod_comp; struct lod_device *lod = lu2lod_dev(lo->ldo_obj.do_lu.lo_dev); @@ -1464,7 +1478,8 @@ static int lod_ost_alloc_qos(const struct lu_env *env, struct lod_object *lo, ost = OST_TGT(lod, osts->op_array[i]); ost->ltd_qos.ltq_usable = 0; - rc = lod_statfs_and_check(env, lod, &lod->lod_ost_descs, ost); + rc = lod_statfs_and_check(env, lod, &lod->lod_ost_descs, + ost, reserve); if (rc) { /* this OSP doesn't feel well */ continue; @@ -2450,7 +2465,7 @@ void lod_collect_avoidance(struct lod_object *lo, struct lod_avoid_guide *lag, */ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo, struct lu_attr *attr, struct thandle *th, - int comp_idx) + int comp_idx, __u64 reserve) { struct lod_layout_component *lod_comp; struct lod_device *d = lu2lod_dev(lod2lu_obj(lo)->lo_dev); @@ -2500,6 +2515,7 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo, if (!ost_indices) GOTO(out, rc = -ENOMEM); +repeat: lod_getref(&d->lod_ost_descs); /* XXX: support for non-0 files w/o objects */ CDEBUG(D_OTHER, "tgt_count %d stripe_count %d\n", @@ -2508,7 +2524,7 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo, if (lod_comp->llc_ostlist.op_array && lod_comp->llc_ostlist.op_count) { rc = lod_alloc_ost_list(env, lo, stripe, ost_indices, - th, comp_idx); + th, comp_idx, reserve); } else if (lod_comp->llc_stripe_offset == LOV_OFFSET_DEFAULT) { /** * collect OSTs and OSSs used in other mirrors whose @@ -2523,15 +2539,15 @@ int lod_qos_prep_create(const struct lu_env *env, struct lod_object *lo, lod_collect_avoidance(lo, lag, comp_idx); rc = lod_ost_alloc_qos(env, lo, stripe, ost_indices, - flag, th, comp_idx); + flag, th, comp_idx, reserve); if (rc == -EAGAIN) rc = lod_ost_alloc_rr(env, lo, stripe, ost_indices, flag, th, - comp_idx); + comp_idx, reserve); } else { rc = lod_ost_alloc_specific(env, lo, stripe, ost_indices, flag, th, - comp_idx); + comp_idx, reserve); } put_ldts: lod_putref(d, &d->lod_ost_descs); @@ -2539,6 +2555,15 @@ put_ldts: for (i = 0; i < stripe_len; i++) if (stripe[i] != NULL) dt_object_put(env, stripe[i]); + + /* In case there is no space on any OST, let's ignore + * the @reserve space to avoid an error at the init + * time, probably the actual IO will be less than the + * given @reserve space (aka extension_size). */ + if (reserve) { + reserve = 0; + goto repeat; + } lod_comp->llc_stripe_count = 0; } else { lod_comp->llc_stripe = stripe; @@ -2629,7 +2654,7 @@ int lod_prepare_create(const struct lu_env *env, struct lod_object *lo, extent = &lod_comp->llc_extent; QOS_DEBUG("comp[%d] %lld "DEXT"\n", i, size, PEXT(extent)); if (!lo->ldo_is_composite || size >= extent->e_start) { - rc = lod_qos_prep_create(env, lo, attr, th, i); + rc = lod_qos_prep_create(env, lo, attr, th, i, 0); if (rc) break; } diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index 6d2a7f2..04ad620 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -789,10 +789,10 @@ static int osp_statfs(const struct lu_env *env, struct dt_device *dev, if (d->opd_pre == NULL) RETURN(0); - CDEBUG(D_OTHER, - "%s: %llu blocks, %llu free, %llu avail, %u reserved mb low, %u reserved mb high, %llu files, %llu free files\n", - d->opd_obd->obd_name, - sfs->os_blocks, sfs->os_bfree, sfs->os_bavail, + CDEBUG(D_OTHER, "%s: %llu blocks, %llu free, %llu avail, " + "%u bsize, %u reserved mb low, %u reserved mb high, " + "%llu files, %llu free files\n", d->opd_obd->obd_name, + sfs->os_blocks, sfs->os_bfree, sfs->os_bavail, sfs->os_bsize, d->opd_reserved_mb_low, d->opd_reserved_mb_high, sfs->os_files, sfs->os_ffree); diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 4fa55e6..6e3e9e9 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -139,6 +139,7 @@ static int osp_statfs_interpret(const struct lu_env *env, union ptlrpc_async_args *aa = args; struct obd_import *imp = req->rq_import; struct obd_statfs *msfs; + struct obd_statfs *sfs; struct osp_device *d; u64 maxage_ns; @@ -167,7 +168,13 @@ static int osp_statfs_interpret(const struct lu_env *env, jiffies + cfs_time_seconds(d->opd_statfs_maxage)); d->opd_statfs_update_in_progress = 0; - CDEBUG(D_CACHE, "updated statfs %p\n", d); + sfs = &d->opd_statfs; + CDEBUG(D_CACHE, "%s (%p): %llu blocks, %llu free, %llu avail, " + "%u bsize, %u reserved mb low, %u reserved mb high," + "%llu files, %llu free files\n", d->opd_obd->obd_name, d, + sfs->os_blocks, sfs->os_bfree, sfs->os_bavail, sfs->os_bsize, + d->opd_reserved_mb_low, d->opd_reserved_mb_high, + sfs->os_files, sfs->os_ffree); RETURN(0); out: diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index df4c1a0..e83a9fe 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -1405,7 +1405,7 @@ test_20a() { wait_mds_ost_sync # First component is on OST0 - $LFS setstripe -E 256M -i 0 -z 64M -E -1 -z 1G $comp_file || + $LFS setstripe -E 256M -i 0 -z 64M -E -1 -z 128M $comp_file || error "Create $comp_file failed" # write past end of first component, so it is extended @@ -1429,12 +1429,12 @@ test_20a() { $LFS getstripe $comp_file flg_opts="--comp-flags init" - found=$($LFS find --comp-start 128M -E 1152M $flg_opts $comp_file | \ + found=$($LFS find --comp-start 128M -E 256M $flg_opts $comp_file | \ wc -l) [ $found -eq 1 ] || error "Write: third component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 1152M -E EOF $flg_opts $comp_file |wc -l) + found=$($LFS find --comp-start 256M -E EOF $flg_opts $comp_file |wc -l) [ $found -eq 1 ] || error "Write: fourth extension component not found" sel_layout_sanity $comp_file 3 @@ -1458,7 +1458,7 @@ test_20b() { # normal component to 10M, extendable component to 1G # further extendable to EOF - $LFS setstripe -E 10M -E 1G -p $TESTNAME -z 64M -E -1 -p "" -z 512M \ + $LFS setstripe -E 10M -E 1G -p $TESTNAME -z 64M -E -1 -p "" -z 128M \ $comp_file || error "Create $comp_file failed" replay_barrier $SINGLEMDS @@ -1483,11 +1483,11 @@ test_20b() { [ $found -eq 0 ] || error "Write: zero length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 10M -E 522M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 10M -E 138M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: second component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 522M -E EOF $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 138M -E EOF $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: third component not found" fail $SINGLEMDS @@ -1496,11 +1496,11 @@ test_20b() { [ $found -eq 0 ] || error "Failover: 0-length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 10M -E 522M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 10M -E 138M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Failover: second component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 522M -E EOF $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 138M -E EOF $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Failover: third component not found" sel_layout_sanity $comp_file 3 @@ -1687,7 +1687,7 @@ test_21b() { test_mkdir -p $DIR/$tdir # DoM, extendable component, further extendable component - $LFS setstripe -E 1M -L mdt -E 256M -i 0 -z 64M -E -1 -z 1G \ + $LFS setstripe -E 1M -L mdt -E 256M -i 0 -z 64M -E -1 -z 128M \ $comp_file || error "Create $comp_file failed" found=$($LFS find --comp-start 1M -E 1M $flg_opts $comp_file | wc -l) @@ -1711,11 +1711,11 @@ test_21b() { [ $found -eq 0 ] || error "Write: Zero length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 1M -E 1025M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 1M -E 129M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: extended component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 1025M -E EOF $flg_opts $comp_file |wc -l) + found=$($LFS find --comp-start 129M -E EOF $flg_opts $comp_file |wc -l) [ $found -eq 1 ] || error "Write: extension component not found" sel_layout_sanity $comp_file 3 -- 1.8.3.1