mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
Rewrite nilfs_get_segment() and nilfs_put_segment() so that nilfs_get_segment() stores related information (segment size, start block number, number of blocks, memory address, etc) in a new data structure, nilfs_segment, and nilfs_put_segment() releases the memory allocated or mapped by nilfs_get_segment() based on the information in nilfs_segment. This also simplifies nilfs_psegment struct and functions wrt iterator for partial segment, that is, nilfs_psegment_init(), nilfs_psegment_is_end(), nilfs_psegment_next(), and nilfs_psegment_for_each(). Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>