/* number of pointers at 2nd level */
#define TGT_PTRS_PER_BLOCK (PAGE_SIZE / sizeof(void *))
/* number of pointers at 1st level - only need as many as max OST/MDT count */
-#define TGT_PTRS ((LOV_ALL_STRIPES_MAX + 1) / TGT_PTRS_PER_BLOCK)
+#define TGT_PTRS ((LOV_ALL_STRIPES + 1) / TGT_PTRS_PER_BLOCK)
struct lu_tgt_desc_idx {
struct lu_tgt_desc *ldi_tgt[TGT_PTRS_PER_BLOCK];
* When specified or returned as the value for stripe count, all
* available OSTs will be used.
*/
-#define LLAPI_MIN_STRIPE_COUNT (-1)
-#define LLAPI_MAX_STRIPE_COUNT (-32)
-#define LLAPI_LAYOUT_WIDE_MIN (LLAPI_LAYOUT_INVALID + 2)
-#define LLAPI_LAYOUT_WIDE_MAX (LLAPI_LAYOUT_WIDE_MIN + 32)
+#define LLAPI_OVERSTRIPE_COUNT_MIN ((__s16)LOV_ALL_STRIPES) /* -1 */
+#define LLAPI_OVERSTRIPE_COUNT_MAX ((__s16)LOV_ALL_STRIPES_WIDE) /* -32 */
+#define LLAPI_LAYOUT_WIDE_MIN (LLAPI_LAYOUT_DEFAULT - \
+ LLAPI_OVERSTRIPE_COUNT_MIN)
+#define LLAPI_LAYOUT_WIDE_MAX (LLAPI_LAYOUT_DEFAULT - \
+ LLAPI_OVERSTRIPE_COUNT_MAX)
+#define LLAPI_LAYOUT_WIDE LLAPI_LAYOUT_WIDE_MIN /* backward compatibility */
/**
* When specified as the value for layout pattern, file objects will be
static inline __u32 lov_mds_md_size(__u16 stripes, __u32 lmm_magic)
{
- if (stripes >= LOV_ALL_STRIPES_MIN && stripes <= LOV_ALL_STRIPES_MAX)
+ if (stripes <= LOV_ALL_STRIPES && stripes >= LOV_ALL_STRIPES_WIDE)
stripes = 0;
if (lmm_magic == LOV_MAGIC_V1)
*/
#define LOV_MAX_STRIPE_COUNT 2000 /* ~((12 * 4096 - 256) / 24) */
-/* Below given max and min values are used to check range of stripe count */
-/* LOV_ALL_STRIPES_MAX LLAPI_MIN_STRIPE_COUNT */
-/* LOV_ALL_STRIPES_MIN LLAPI_MIN_STRIPE_COUNT+ LLAPI_MAX_STRIPE_COUNT */
-#define LOV_ALL_STRIPES_MAX 0xffff
-#define LOV_ALL_STRIPES_MIN 0xffdf
-#define LOV_V1_INSANE_STRIPE_COUNT 65532 /* maximum stripe count bz13933 */
+/* max and min values are used to check range of overstripe count */
+#define LOV_ALL_STRIPES 0xffff /* only valid for directories */
+#define LOV_ALL_STRIPES_WIDE 0xffe0 /* LLAPI_OVERSTRIPE_COUNT_MAX */
+#define LOV_V1_INSANE_STRIPE_INDEX (LOV_ALL_STRIPES_WIDE - 1) /* max index */
+#define LOV_V1_INSANE_STRIPE_COUNT LOV_V1_INSANE_STRIPE_INDEX /* deprecated */
#define XATTR_LUSTRE_PREFIX "lustre."
#define XATTR_LUSTRE_LOV XATTR_LUSTRE_PREFIX"lov"
static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
{
- if (stripes >= LOV_ALL_STRIPES_MIN && stripes <= LOV_ALL_STRIPES_MAX)
+ if (stripes <= LOV_ALL_STRIPES && stripes >= LOV_ALL_STRIPES_WIDE)
stripes = 0;
if (lmm_magic == LOV_USER_MAGIC_V1)
"%s: MDT index %u more than MDT count %u\n",
obd->obd_name, index, lmv->lmv_mdt_count);
- if (index >= LOV_V1_INSANE_STRIPE_COUNT)
+ if (index >= LOV_V1_INSANE_STRIPE_INDEX)
return NULL;
if (now > next_print) {
entry = &lo->ldo_comp_entries[comp_idx];
if (lod_comp_inited(entry))
return entry->llc_stripe_count;
- if (entry->llc_stripe_count >= LOV_ALL_STRIPES_MIN &&
- entry->llc_stripe_count <= LOV_ALL_STRIPES_MAX)
+ if (entry->llc_stripe_count <= LOV_ALL_STRIPES &&
+ entry->llc_stripe_count >= LOV_ALL_STRIPES_WIDE)
return lod_get_stripe_count_plain(lod, lo,
entry->llc_stripe_count,
entry->llc_pattern &
(lod_comp_inited(lod_comp) ||
lod_comp->llc_extent.e_start <
lod_comp->llc_extent.e_end) &&
- !(lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_MIN &&
- lod_comp->llc_stripe_count <= LOV_ALL_STRIPES_MAX) &&
+ !(lod_comp->llc_stripe_count <= LOV_ALL_STRIPES &&
+ lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_WIDE) &&
ext->e_end != OBD_OBJECT_EOF &&
(__u64)(lod_comp->llc_stripe_count *
lod_comp->llc_stripe_size) >
}
}
- CDEBUG(D_LAYOUT, DFID" magic = %#08x, pattern = %#x, stripe_count = %hu, stripe_size = %u, stripe_offset = %hu, append_pool = '%s', append_stripe_count = %d\n",
- PFID(lu_object_fid(&lo->ldo_obj.do_lu)),
- v1->lmm_magic,
- v1->lmm_pattern,
- v1->lmm_stripe_count,
- v1->lmm_stripe_size,
- v1->lmm_stripe_offset,
- append_pool ?: "",
- append_stripe_count);
+ CDEBUG(D_LAYOUT, DFID" magic = %#08x, pattern = %#x, stripe_count = %hd, stripe_size = %u, stripe_offset = %hd, append_pool = '%s', append_stripe_count = %d\n",
+ PFID(lu_object_fid(&lo->ldo_obj.do_lu)), v1->lmm_magic,
+ v1->lmm_pattern, (__s16)v1->lmm_stripe_count,
+ v1->lmm_stripe_size, (__s16)v1->lmm_stripe_offset,
+ append_pool ?: "", append_stripe_count);
if (!lov_pattern_supported(v1->lmm_pattern) &&
!(v1->lmm_pattern & LOV_PATTERN_F_RELEASED)) {
{
struct lov_desc *lov_desc = &lod->lod_ost_descs.ltd_lov_desc;
+ if (!stripe_count)
+ stripe_count = lov_desc->ld_default_stripe_count;
+
/* Overstriping allows more stripes than targets */
if (stripe_count > lov_desc->ld_active_tgt_count) {
- if (overstriping) {
- if (stripe_count >= LOV_ALL_STRIPES_MIN &&
- stripe_count <= LOV_ALL_STRIPES_MAX) {
- stripe_count =
- ((stripe_count - LOV_ALL_STRIPES_MIN) + 1) *
- lov_desc->ld_active_tgt_count;
- }
- } else {
+ if (!overstriping) {
*flags |= LOD_USES_DEFAULT_STRIPE;
- if ((stripe_count >= LOV_ALL_STRIPES_MIN &&
- stripe_count <= LOV_ALL_STRIPES_MAX) &&
- lod->lod_max_stripecount)
+ if (stripe_count == LOV_ALL_STRIPES &&
+ lod->lod_max_stripecount)
stripe_count = lod->lod_max_stripecount;
else
stripe_count = lov_desc->ld_active_tgt_count;
+ } else if (stripe_count <= LOV_ALL_STRIPES &&
+ stripe_count >= LOV_ALL_STRIPES_WIDE) {
+ stripe_count = lov_desc->ld_active_tgt_count *
+ (LOV_ALL_STRIPES - stripe_count + 1);
}
}
-
if (!stripe_count)
- stripe_count = lov_desc->ld_default_stripe_count;
+ stripe_count = 1;
- if (overstriping && stripe_count > LOV_MAX_STRIPE_COUNT)
+ if (stripe_count > LOV_MAX_STRIPE_COUNT)
stripe_count = LOV_MAX_STRIPE_COUNT;
return stripe_count;
!(lod_comp->llc_flags & LCME_FL_EXTENSION) &&
(lod_comp_inited(lod_comp) ||
lod_comp->llc_extent.e_start <
- lod_comp->llc_extent.e_end) &&
- !(lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_MIN &&
- lod_comp->llc_stripe_count <= LOV_ALL_STRIPES_MAX) &&
+ lod_comp->llc_extent.e_end) &&
+ !(lod_comp->llc_stripe_count <= LOV_ALL_STRIPES &&
+ lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_WIDE) &&
lod_comp->llc_extent.e_end != OBD_OBJECT_EOF &&
(__u64)lod_comp->llc_stripe_count *
lod_comp->llc_stripe_size >
*/
if (lo->ldo_is_composite &&
!(lod_comp->llc_flags & LCME_FL_EXTENSION) &&
- !(lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_MIN &&
- lod_comp->llc_stripe_count <= LOV_ALL_STRIPES_MAX) &&
+ !(lod_comp->llc_stripe_count <= LOV_ALL_STRIPES &&
+ lod_comp->llc_stripe_count >= LOV_ALL_STRIPES_WIDE) &&
(lod_comp_inited(lod_comp) ||
lod_comp->llc_extent.e_start <
- lod_comp->llc_extent.e_end) &&
+ lod_comp->llc_extent.e_end) &&
lod_comp->llc_extent.e_end != OBD_OBJECT_EOF &&
lod_comp->llc_stripe_count * lod_comp->llc_stripe_size >
(lod_comp->llc_extent.e_end - lod_comp->llc_extent.e_start))
lov->desc.ld_uuid.uuid, POSTID(&loi->loi_oi),
loi->loi_ost_idx, lov->desc.ld_tgt_count);
- if ((u32)loi->loi_ost_idx >= LOV_V1_INSANE_STRIPE_COUNT)
+ if ((u32)loi->loi_ost_idx >= LOV_V1_INSANE_STRIPE_INDEX)
GOTO(out_lsme, rc = -EINVAL);
if (now > next_print) {
if (stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
CDEBUG_LIMIT(level,
"bad stripe_count %u > max_stripe_count %u\n",
- stripe_count, LOV_V1_INSANE_STRIPE_COUNT);
+ stripe_count, LOV_V1_INSANE_STRIPE_INDEX);
return;
}
ASSERTF(rc == 0 || errno == ENOENT, "errno = %d", errno);
layout = llapi_layout_alloc();
ASSERTF(layout != NULL, "errno = %d", errno);
- rc = llapi_layout_stripe_count_set(layout, LLAPI_LAYOUT_WIDE_MIN);
+ rc = llapi_layout_stripe_count_set(layout, LLAPI_LAYOUT_WIDE);
ASSERTF(rc == 0, "errno = %d", errno);
fd = llapi_layout_file_create(path, 0, 0640, layout);
ASSERTF(fd >= 0, "errno = %d", errno);
rc = llapi_layout_stripe_count_get(deflayout, &dcount);
ASSERTF(rc == 0, "errno = %d", errno);
ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
- IN_RANGE(dcount, LLAPI_LAYOUT_WIDE_MIN, LLAPI_LAYOUT_WIDE_MAX),
+ dcount == LLAPI_LAYOUT_WIDE,
"%"PRIu64" != %"PRIu64, fcount, dcount);
rc = llapi_layout_stripe_size_get(filelayout, &fsize);
rc = llapi_layout_stripe_count_get(layout, &count);
ASSERTF(rc == 0, "errno = %d\n", errno);
- ASSERTF((count >= LLAPI_LAYOUT_WIDE_MIN &&
- count <= LLAPI_LAYOUT_WIDE_MAX),
- "count = %"PRIu64"\n", count);
+ ASSERTF(count == LLAPI_LAYOUT_WIDE, "count = %"PRIu64"\n", count);
llapi_layout_free(layout);
}
# verify components ${ids[6]}, ${ids[8]} and ${ids[10]}
for i in 6 8 10; do
verify_comp_attr stripe-size $tf ${ids[$i]} 16777216
- # ffdf which is -33 and matches LOV_ALL_STRIPES_MIN
- local decimal_lov_lower_limit=-33
- #C_opt is -c option which can be -1 to -32
- local C_opt=-1
- local count_exp=$(($decimal_lov_lower_limit + $C_opt + 1))
-
- verify_comp_attr stripe-count $tf ${ids[$i]} $count_exp
+ verify_comp_attr stripe-count $tf ${ids[$i]} -1
verify_comp_attr pool $tf ${ids[$i]} archive
verify_comp_extent $tf ${ids[$i]} 536870912 EOF
done
# verify components ${ids[9]}, ${ids[11]} and ${ids[13]}
for i in 9 11 13; do
verify_comp_attr stripe-size $tf ${ids[$i]} 16777216
- # ffdf which is -33 and matches LOV_ALL_STRIPES_MIN
- local decimal_lov_lower_limit=-33
- #C_opt is -c option which can be -1 to -32
- local C_opt=-1
- local count_exp=$(($decimal_lov_lower_limit + $C_opt + 1))
-
- verify_comp_attr stripe-count $tf ${ids[$i]} $count_exp
+ verify_comp_attr stripe-count $tf ${ids[$i]} -1
verify_comp_attr pool $tf ${ids[$i]} archive
verify_comp_extent $tf ${ids[$i]} 536870912 EOF
done
osts=$osts","
fi
done
+
+ echo "$LFS setstripe -o $osts $DIR/$tdir/$tfile"
$LFS setstripe -o $osts $DIR/$tdir/$tfile || error "setstripe failed"
local getstripe=$($LFS getstripe $DIR/$tdir/$tfile)
echo "$getstripe"
local getstripe_osts=$(echo "$getstripe" | sed -e '1,/obdidx/d' |\
awk '{print $1}' | tr '\n' ' ' | sed -e 's/[[:space:]]*$//')
[ "$getstripe_osts" = "${osts//,/ }" ] ||
- error "stripes not on specified OSTs"
+ error "stripes '$getstripe_osts' not on given OSTs ${osts//,/ }"
dd if=/dev/zero of=$DIR/$tdir/$tfile bs=1M count=4 || error "dd failed"
}
stack_trap simple_cleanup_common
test_mkdir $DIR/$tdir
$LFS setstripe -i 0 -c 1 $DIR/$tdir/$tfile.1
- dd if=/dev/zero of=$DIR/$tdir/$tfile.1 bs=1024 count=$MAXFREE &&
- error "dd should fill OST0"
+ if check_fallocate_supported $ost1; then
+ fallocate -l ${MAXFREE}k $DIR/$tdir/$tfile.1 &&
+ error "fallocate should fill OST0"
+ else
+ dd if=/dev/zero of=$DIR/$tdir/$tfile.1 bs=1024 count=$MAXFREE &&
+ error "dd should fill OST0"
+ fi
i=2
while $LFS setstripe -i 0 -c 1 $DIR/$tdir/$tfile.$i; do
i=$((i + 1))
skip "need MDS >= 2.15.61.76"
stack_trap "rm -f $DIR/$tfile"
+
+ #check that beyond -32 it fails
+ echo "setstripe -C -33 should fail"
+ $LFS setstripe -C -33 $DIR/$tfile && error "setstripe should fail"
+
# start_full_debug_logging
# number of stripes created will be 32*ost count
$LFS setstripe -C -32 $DIR/$tfile || error "create $tfile failed"
local count=$($LFS getstripe -c $DIR/$tfile)
local stripe_cnt=$(($OSTCOUNT * 32))
(( $count == $stripe_cnt )) ||
- error "$DIR/$tfile stripe count $count != $OSTCOUNT"
- #check that beyond -32 it fails
- !($LFS setstripe -C -34 $DIR/$tfile) || error "setstripe should fail"
+ error "$DIR/$tfile stripe count $count != $stripe_cnt"
}
run_test 27Cj "overstriping with -C for max values in multiple of targets"
if (lsa->lsa_stripe_count > 0 &&
lsa->lsa_stripe_count != LLAPI_LAYOUT_DEFAULT &&
!(lsa->lsa_stripe_count >= LLAPI_LAYOUT_WIDE_MIN &&
- lsa->lsa_stripe_count <= LLAPI_LAYOUT_WIDE_MAX) &&
+ lsa->lsa_stripe_count <= LLAPI_LAYOUT_WIDE_MAX) &&
lsa->lsa_nr_tgts != lsa->lsa_stripe_count) {
fprintf(stderr, "stripe_count(%lld) != nr_tgts(%d)\n",
lsa->lsa_stripe_count,
progname, argv[0]);
goto usage_error;
}
- if (migrate_mode)
- overstriped = true;
- else
+ overstriped = true;
+ if (!migrate_mode)
lsa.lsa_pattern = LLAPI_LAYOUT_OVERSTRIPING;
fallthrough;
case 'c':
errno = 0;
lsa.lsa_stripe_count = strtoul(optarg, &end, 0);
+ /* only allow count -2..-32 for overstriped files */
if (errno != 0 || *end != '\0'|| optarg == end ||
- lsa.lsa_stripe_count < LLAPI_MAX_STRIPE_COUNT ||
+ lsa.lsa_stripe_count <
+ (overstriped ? LLAPI_OVERSTRIPE_COUNT_MAX :
+ LLAPI_OVERSTRIPE_COUNT_MIN) ||
lsa.lsa_stripe_count > LOV_MAX_STRIPE_COUNT) {
fprintf(stderr,
"%s %s: invalid stripe count '%s'\n",
goto usage_error;
}
- if (lsa.lsa_stripe_count <= LLAPI_MIN_STRIPE_COUNT &&
- lsa.lsa_stripe_count >= LLAPI_MAX_STRIPE_COUNT) {
- lsa.lsa_stripe_count = LLAPI_LAYOUT_WIDE_MIN +
- abs(lsa.lsa_stripe_count + 1);
+ if (lsa.lsa_stripe_count <=
+ LLAPI_OVERSTRIPE_COUNT_MIN &&
+ lsa.lsa_stripe_count >=
+ LLAPI_OVERSTRIPE_COUNT_MAX) {
+ lsa.lsa_stripe_count = LLAPI_LAYOUT_WIDE_MIN -
+ (lsa.lsa_stripe_count + 1);
}
break;
case 'd':
errno = 0;
lsa.lsa_stripe_off = strtol(optarg, &end, 0);
if (errno != 0 || *end != '\0' || optarg == end ||
- lsa.lsa_stripe_off < -1 ||
- lsa.lsa_stripe_off > LOV_V1_INSANE_STRIPE_COUNT) {
+ lsa.lsa_stripe_off < (__s16)LOV_ALL_STRIPES ||
+ lsa.lsa_stripe_off > LOV_V1_INSANE_STRIPE_INDEX) {
fprintf(stderr,
"%s %s: invalid stripe offset '%s'\n",
progname, argv[0], optarg);
param->lsp_stripe_size = lsa.lsa_stripe_size;
if (lsa.lsa_stripe_count != LLAPI_LAYOUT_DEFAULT) {
if (lsa.lsa_stripe_count >= LLAPI_LAYOUT_WIDE_MIN &&
- lsa.lsa_stripe_count < LLAPI_LAYOUT_WIDE_MAX)
- param->lsp_stripe_count = LOV_ALL_STRIPES_MIN +
- (lsa.lsa_stripe_count - LLAPI_LAYOUT_WIDE_MIN);
+ lsa.lsa_stripe_count <= LLAPI_LAYOUT_WIDE_MAX)
+ param->lsp_stripe_count =
+ LLAPI_LAYOUT_WIDE_MIN -
+ (lsa.lsa_stripe_count + 1);
else
param->lsp_stripe_count = lsa.lsa_stripe_count;
}
if (!(tp->st_op & ops))
continue;
- for (index = 0; index < LOV_ALL_STRIPES_MAX &&
+ for (index = 0; index < LOV_ALL_STRIPES &&
(!lsb || lsb->sb_count < LL_STATFS_MAX); index++) {
memset(&stat_buf, 0, sizeof(struct obd_statfs));
memset(&uuid_buf, 0, sizeof(struct obd_uuid));
errno = 0;
lsa.lsa_stripe_count = strtoul(optarg, &end, 0);
if (errno != 0 || *end != '\0' ||
- lsa.lsa_stripe_count < LLAPI_MAX_STRIPE_COUNT ||
+ lsa.lsa_stripe_count < LLAPI_OVERSTRIPE_COUNT_MAX ||
lsa.lsa_stripe_count > LOV_MAX_STRIPE_COUNT) {
fprintf(stderr,
"%s: invalid stripe count '%s'\n",
dash += 4;
*idx = strtoul(dash, &endp, 16);
- if (*idx > LOV_V1_INSANE_STRIPE_COUNT) {
+ if (*idx > LOV_V1_INSANE_STRIPE_INDEX) {
fprintf(stderr, "wrong index %s\n", tgtname);
return -ERANGE;
}
case 'm':
errno = 0;
idx = strtol(optarg, &endp, 0);
- if (errno != 0 || idx > LOV_V1_INSANE_STRIPE_COUNT ||
+ if (errno != 0 || idx > LOV_V1_INSANE_STRIPE_INDEX ||
idx < 0 || *endp != '\0') {
fprintf(stderr,
"%s quota: invalid MDT index '%s'\n",
idx = strtol(optarg, &endp, 0);
/* simple digit, treat it as a numerical OST index */
if (*endp == '\0') {
- if (idx > LOV_V1_INSANE_STRIPE_COUNT ||
+ if (idx > LOV_V1_INSANE_STRIPE_INDEX ||
idx < 0) {
fprintf(stderr,
"%s quota: invalid OST index '%s'\n",
else
comp->llc_stripe_size = v1->lmm_stripe_size;
- if (v1->lmm_stripe_count >= (typeof(v1->lmm_stripe_count))
- LOV_ALL_STRIPES_MIN && v1->lmm_stripe_count <=
- (typeof(v1->lmm_stripe_count)) LOV_ALL_STRIPES_MAX)
- comp->llc_stripe_count =
- LLAPI_LAYOUT_WIDE_MIN +
- (v1->lmm_stripe_count - LOV_ALL_STRIPES_MIN);
+ if (v1->lmm_stripe_count >= LOV_ALL_STRIPES_WIDE &&
+ v1->lmm_stripe_count <= LOV_ALL_STRIPES)
+ comp->llc_stripe_count = LLAPI_LAYOUT_WIDE_MIN +
+ (LOV_ALL_STRIPES -
+ v1->lmm_stripe_count);
else if (v1->lmm_stripe_count == 0)
comp->llc_stripe_count = LLAPI_LAYOUT_DEFAULT;
else
blob->lmm_stripe_count = 0;
else if (comp->llc_stripe_count >= LLAPI_LAYOUT_WIDE_MIN &&
comp->llc_stripe_count <= LLAPI_LAYOUT_WIDE_MAX) {
- blob->lmm_stripe_count = LOV_ALL_STRIPES_MIN +
- (comp->llc_stripe_count - LLAPI_LAYOUT_WIDE_MIN);
+ blob->lmm_stripe_count = LOV_ALL_STRIPES -
+ (comp->llc_stripe_count -
+ LLAPI_LAYOUT_WIDE_MIN);
}
else
blob->lmm_stripe_count = comp->llc_stripe_count;
return stripe_count == LLAPI_LAYOUT_DEFAULT ||
(stripe_count >= LLAPI_LAYOUT_WIDE_MIN &&
stripe_count <= LLAPI_LAYOUT_WIDE_MAX) ||
- (stripe_count != 0 && !(stripe_count <=
- LLAPI_MIN_STRIPE_COUNT &&
- stripe_count >= LLAPI_MAX_STRIPE_COUNT) &&
+ (stripe_count > 0 &&
llapi_stripe_count_is_valid(stripe_count));
}
#include <linux/lustre/lustre_ioctl.h>
#include <linux/lustre/lustre_kernelcomm.h>
+#include <lustre/lustreapi.h>
+
#define MAX_IOC_BUFLEN 8192
#define MAX_LINE_LEN 256
#define MAX_INSTANCE_LEN 32
static inline bool llapi_stripe_count_is_valid(int64_t count)
{
- return (count >= LOV_ALL_STRIPES_MIN && count <= LOV_ALL_STRIPES_MAX) ||
- count <= LOV_MAX_STRIPE_COUNT;
+ return count >= LLAPI_OVERSTRIPE_COUNT_MAX &&
+ count <= LOV_MAX_STRIPE_COUNT;
}
static inline bool llapi_stripe_index_is_valid(int64_t index)
{
- return index >= -1 && index <= LOV_V1_INSANE_STRIPE_COUNT;
+ return index >= -1 && index <= LOV_V1_INSANE_STRIPE_INDEX;
}
static inline bool llapi_pool_name_is_valid(const char **pool_name)