linux/fs/bcachefs/inode_format.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_INODE_FORMAT_H
#define _BCACHEFS_INODE_FORMAT_H

#define BLOCKDEV_INODE_MAX
#define BCACHEFS_ROOT_INO

struct bch_inode {} __packed __aligned();

struct bch_inode_v2 {} __packed __aligned();

struct bch_inode_v3 {} __packed __aligned();

#define INODEv3_FIELDS_START_INITIAL
#define INODEv3_FIELDS_START_CUR

struct bch_inode_generation {} __packed __aligned();

/*
 * bi_subvol and bi_parent_subvol are only set for subvolume roots:
 */

#define BCH_INODE_FIELDS_v2()

#define BCH_INODE_FIELDS_v3()

/* subset of BCH_INODE_FIELDS */
#define BCH_INODE_OPTS()

enum inode_opt_id {};

#define BCH_INODE_FLAGS()

/* bits 20+ reserved for packed fields below: */

enum bch_inode_flags {};

enum __bch_inode_flags {};

LE32_BITMASK(INODE_STR_HASH,	struct bch_inode, bi_flags, 20, 24);
LE32_BITMASK(INODE_NR_FIELDS,	struct bch_inode, bi_flags, 24, 31);
LE32_BITMASK(INODE_NEW_VARINT,	struct bch_inode, bi_flags, 31, 32);

LE64_BITMASK(INODEv2_STR_HASH,	struct bch_inode_v2, bi_flags, 20, 24);
LE64_BITMASK(INODEv2_NR_FIELDS,	struct bch_inode_v2, bi_flags, 24, 31);

LE64_BITMASK(INODEv3_STR_HASH,	struct bch_inode_v3, bi_flags, 20, 24);
LE64_BITMASK(INODEv3_NR_FIELDS,	struct bch_inode_v3, bi_flags, 24, 31);

LE64_BITMASK(INODEv3_FIELDS_START,
				struct bch_inode_v3, bi_flags, 31, 36);
LE64_BITMASK(INODEv3_MODE,	struct bch_inode_v3, bi_flags, 36, 52);

#endif /* _BCACHEFS_INODE_FORMAT_H */