exit(1);
}
+ if (NumVolumes > HAMMER_MAX_VOLUMES) {
+ fprintf(stderr,
+ "newfs_hammer: The maximum number of volumes is %d\n", HAMMER_MAX_VOLUMES);
+ exit(1);
+ }
+
total = 0;
for (i = 0; i < NumVolumes; ++i) {
vol = setup_volume(i, av[i], 1, O_RDWR);
*/
if (BootAreaSize == 0) {
BootAreaSize = HAMMER_BOOT_NOMBYTES;
- while (BootAreaSize > total / NumVolumes / 256)
+ while (BootAreaSize > total / NumVolumes / HAMMER_MAX_VOLUMES)
BootAreaSize >>= 1;
if (BootAreaSize < HAMMER_BOOT_MINBYTES)
BootAreaSize = 0;
}
if (MemAreaSize == 0) {
MemAreaSize = HAMMER_MEM_NOMBYTES;
- while (MemAreaSize > total / NumVolumes / 256)
+ while (MemAreaSize > total / NumVolumes / HAMMER_MAX_VOLUMES)
MemAreaSize >>= 1;
if (MemAreaSize < HAMMER_MEM_MINBYTES)
MemAreaSize = 0;
#define HAMMER_RECOVERY_BND 0x0000000001000000ULL
/*
+ * The current limit of volumes that can make up a HAMMER FS
+ */
+#define HAMMER_MAX_VOLUMES 256
+
+/*
* Hammer transction ids are 64 bit unsigned integers and are usually
* synchronized with the time of day in nanoseconds.
*