segment.h: use nilfs_binfo_{v,dat} structs to get binfo sizes

Define NILFS_BINFO_DATA_SIZE and NILFS_BINFO_DAT_NODE_SIZE with
nilfs_binfo_v and nilfs_binfo_dat structs, respectively.  These macros
gives the size of binfo data block in usual files and node blocks in
the DAT file.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
Ryusuke Konishi 2016-09-24 00:20:38 +09:00
parent 8a89320c7a
commit f827e854bc

View File

@ -84,13 +84,13 @@ struct nilfs_block {
};
/* virtual block number and block offset */
#define NILFS_BINFO_DATA_SIZE (sizeof(__le64) + sizeof(__le64))
#define NILFS_BINFO_DATA_SIZE sizeof(struct nilfs_binfo_v)
/* virtual block number */
#define NILFS_BINFO_NODE_SIZE sizeof(__le64)
/* block offset */
#define NILFS_BINFO_DAT_DATA_SIZE sizeof(__le64)
/* block offset and level */
#define NILFS_BINFO_DAT_NODE_SIZE (sizeof(__le64) + sizeof(__le64))
#define NILFS_BINFO_DAT_NODE_SIZE sizeof(struct nilfs_binfo_dat)
struct nilfs;