4 #include "fsck_helper.h"
7 testresult_t
test_sbfctablesize (void)
11 int fctshortage
, fctexcess
;
13 fetch_superblock(&sb
);
15 /* ceil(a/b) = (a + b - 1)/b */
19 if (sb
->fctable_size
< ((sb
->dzone_size
-1)+RPB
-1)/RPB
) {
20 fctshortage
= (sb
->dzone_size
+RPB
-1)/RPB
- (sb
->fctable_size
);
21 printf("FCT too small (even considering that the root directory block "
22 "will never be there) by %d blocks.\n", fctshortage
);
26 if (sb
->fctable_size
> (sb
->dzone_size
+RPB
-1)/RPB
) {
27 fctexcess
= (sb
->fctable_size
) - (sb
->dzone_size
+RPB
-1)/RPB
;
28 printf("FCT too big by %d blocks.\n", fctexcess
);