4 #include "fsck_helper.h"
7 testresult_t
test_sbciutablesize (void)
11 int ciutshortage
, ciutexcess
;
13 fetch_superblock(&sb
);
15 /* ceil(a/b) = (a + b - 1)/b */
19 if (sb
->ciutable_size
< (sb
->dzone_size
+RPB
-1)/RPB
) {
20 ciutshortage
= (sb
->dzone_size
+RPB
-1)/RPB
- (sb
->ciutable_size
);
21 printf("CIUT too small by %d blocks.\n", ciutshortage
);
25 if (sb
->ciutable_size
> (sb
->dzone_size
+RPB
-1)/RPB
) {
26 ciutexcess
= (sb
->ciutable_size
) - (sb
->dzone_size
+RPB
-1)/RPB
;
27 printf("CIUT too big by %d blocks.\n", ciutexcess
);