Policy ID will be stored in INodeFile header with 4 bits which can support 16 different storage policies. The number of bits for replication will be reduced from 16 bits to 12 bits which is still able to support up to 4095 replicas. The number of bits for block size remains 48 bits. The memory usage of INodeFile remains unchanged.
The storage policy IDs assigned to Hot, Warm and Cold policies are respectively 12, 8 and 4. These numbers are chosen with gaps so that future policies can be added in-between.
We should make a corresponding change in FSImage.