snprintf(cmd, cmdsz, "losetup %s %s", l_device,
mop->mo_device);
ret = run_command(cmd, cmdsz);
+ if (ret == 256)
+ /* someone else picked up this loop device
+ * behind our back */
+ continue;
if (ret) {
fprintf(stderr, "%s: error %d on losetup: %s\n",
progname, ret, strerror(ret));
int maj_high, maj_low, min;
int ret;
- strscat(mop->mo_mkfsopts, " -O dir_index", sizeof(mop->mo_mkfsopts));
+ strscat(mop->mo_mkfsopts, " -O dir_index,extents", sizeof(mop->mo_mkfsopts));
/* Upstream e2fsprogs called our uninit_groups feature uninit_bg,
* check for both of them when testing e2fsprogs features. */
if (journal_sz > 1024L)
journal_sz = 1024L;
/* man mkfs.ext3 */
- max_sz = (256000 * L_BLOCK_SIZE) >> 20; /* 1GB */
+ max_sz = (102400 * L_BLOCK_SIZE) >> 20; /* 400MB */
if (journal_sz > max_sz)
journal_sz = max_sz;
if (journal_sz) {
sep = *s2;
*s2 = '\0';
nid = libcfs_str2nid(s1);
-
+
if (nid == LNET_NID_ANY) {
fprintf(stderr, "%s: Can't parse NID '%s'\n", progname, s1);
free(converted);
free(converted);
return NULL;
}
-
+
c += snprintf(c, left, "%s%c", libcfs_nid2str(nid), sep);
left = converted + MAXNIDSTR - c;
s1 = s2 + 1;
return EINVAL;
}
+ /* single argument: <device> */
+ if (argc == 2)
+ ++print_only;
+
return 0;
}