- Vanilla 2.4.29 support
- increase maximum number of obd devices to 520 (6242)
- remove the tcp-zero-copy patch from the suse-2.4 series (5902)
+ - limit stripes per file to 160 (the maximum EA size) (6093)
2005-03-22 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.4.1
* LOV data structures
*/
-#define LOV_MIN_STRIPE_SIZE 65536UL /* maximum PAGE_SIZE (ia64), power of 2 */
+#define LOV_MIN_STRIPE_SIZE 65536 /* maximum PAGE_SIZE (ia64), power of 2 */
+#define LOV_MAX_STRIPE_COUNT 160 /* until bug 4424 is fixed */
#define LOV_MAX_UUID_BUFFER_SIZE 8192
/* The size of the buffer the lov/mdc reserves for the
desc->ld_default_stripe_size = PTLRPC_MAX_BRW_SIZE;
} else if (desc->ld_default_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) {
- CWARN("default_stripe_size "LPU64" isn't a multiple of %lu\n",
+ CWARN("default_stripe_size "LPU64" isn't a multiple of %u\n",
desc->ld_default_stripe_size, LOV_MIN_STRIPE_SIZE);
CWARN("Please update config and run --write-conf on MDS\n");
stripe_count = lov->desc.ld_default_stripe_count;
if (!stripe_count || stripe_count > lov->desc.ld_active_tgt_count)
stripe_count = lov->desc.ld_active_tgt_count;
+ /* for now, we limit the stripe count directly, when bug 4424 is
+ * fixed this needs to be somewhat dynamic based on whether ext3
+ * can handle larger EA sizes. */
+ if (stripe_count > LOV_MAX_STRIPE_COUNT)
+ stripe_count = LOV_MAX_STRIPE_COUNT;
return stripe_count;
}
/* 64kB is the largest common page size we see (ia64), and matches the
* check in lfs */
if (lum.lmm_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) {
- CDEBUG(D_IOCTL, "stripe size %u not multiple of %lu, fixing\n",
+ CDEBUG(D_IOCTL, "stripe size %u not multiple of %u, fixing\n",
lum.lmm_stripe_size, LOV_MIN_STRIPE_SIZE);
lum.lmm_stripe_size = LOV_MIN_STRIPE_SIZE;
}
/* 64 KB is the largest common page size I'm aware of (on ia64), but
* check the local page size just in case. */
- page_size = 65536;
+ page_size = LOV_MIN_STRIPE_SIZE;
if (getpagesize() > page_size) {
page_size = getpagesize();
- fprintf(stderr, "WARNING: your page size (%d) is larger than "
- "expected.\n", page_size);
+ fprintf(stderr, "WARNING: your page size (%u) is larger than "
+ "expected (%u).\n", page_size, LOV_MIN_STRIPE_SIZE);
}
- if ((stripe_size < 0 || stripe_size % 65536) &&
+ if ((stripe_size < 0 || (stripe_size & (LOV_MIN_STRIPE_SIZE - 1))) &&
!(isdir && stripe_size == -1)) {
rc = -EINVAL;
err_msg("error: stripe_size must be an even "
"multiple of %d bytes.\n", page_size);
goto out;
}
- if (stripe_offset < -1 || stripe_offset > 65534) {
+ if (stripe_offset < -1 || stripe_offset > LOV_MAX_STRIPE_COUNT) {
errno = rc = -EINVAL;
err_msg("error: bad stripe offset %d\n", stripe_offset);
goto out;
}
- if (stripe_count < -1 || stripe_count > 65534) {
+ if (stripe_count < -1 || stripe_count > LOV_MAX_STRIPE_COUNT) {
errno = rc = -EINVAL;
err_msg("error: bad stripe count %d\n", stripe_count);
goto out;