Update key type value format change

Adding file data items changed the item key values.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-03-26 14:00:19 -04:00
parent 339c719e4e
commit 10cf83ffc5

View File

@@ -100,8 +100,14 @@ struct scoutfs_key {
#define SCOUTFS_ROOT_INO 1
#define SCOUTFS_INODE_KEY 128
#define SCOUTFS_DIRENT_KEY 192
/*
* Currently we sort keys by the numeric value of the types, but that
* isn't necessary. We could have an arbitrary sort order. So we don't
* have to stress about cleverly allocating the types.
*/
#define SCOUTFS_INODE_KEY 1
#define SCOUTFS_DIRENT_KEY 2
#define SCOUTFS_DATA_KEY 3
struct scoutfs_ring_map_block {
struct scoutfs_block_header hdr;
@@ -203,6 +209,13 @@ struct scoutfs_item {
__le32 skip_next[0];
} __packed;
/*
* Item size caps item file data item length so that they fit in checksummed
* 4k blocks with a bit of expansion room.
*/
#define SCOUTFS_MAX_ITEM_LEN \
(SCOUTFS_BLOCK_SIZE - sizeof(struct scoutfs_block_header) - 32)
struct scoutfs_timespec {
__le64 sec;
__le32 nsec;