hello,<br><br>Im trying to understand the dm-snapshot target, but Im not sure how it uses the size, mask and shift of the chunks, not sure if I understand it correctly.<br><br>Can anyone give an overall idea of why they are initialized this way <br>
<br>store->chunk_size = chunk_size_ulong;<br>store->chunk_mask = chunk_size_ulong - 1;<br>store->chunk_shift = ffs(chunk_size_ulong) - 1;<br><br>and why use this to translate sector to chunks <br><br>static inline chunk_t sector_to_chunk(struct dm_exception_store *store,<br>
                      sector_t sector)<br>{<br>    return (sector & ~store->chunk_mask) >> store->chunk_shift;<br>}<br><br>thanks,<br><br>Guilherme Moro<br>