Change fs_checksum manually

 
wang, lei
Occasional Contributor

Change fs_checksum manually

I need to change the size and dsize from 204800 to 102400, since we reduced
the size of the logical volume. The checksum must be changed from 0xe7f78ff4
to 0xe7f46ff4, since the checksum is calculated as
#define VX_FSCHECKSUM(fs) (\
...
(fs)->fs_size + \
(fs)->fs_dsize + \...


Thus, our new checksum is 0xe7f78ff4-(204800-102400)*2 = 0xe7f46ff4.

Then mount file system failed and fsck report error:
invalid vxfs super-block checksum

I think my calculation formula is wrong , so which formala of checksum is right on vxfs4.1?