/* Bits for the extent state */ enum {
ENUM_BIT(EXTENT_DIRTY),
ENUM_BIT(EXTENT_LOCKED),
ENUM_BIT(EXTENT_DIO_LOCKED),
ENUM_BIT(EXTENT_DIRTY_LOG1),
ENUM_BIT(EXTENT_DIRTY_LOG2),
ENUM_BIT(EXTENT_DELALLOC),
ENUM_BIT(EXTENT_DEFRAG),
ENUM_BIT(EXTENT_BOUNDARY),
ENUM_BIT(EXTENT_NODATASUM),
ENUM_BIT(EXTENT_CLEAR_META_RESV),
ENUM_BIT(EXTENT_NEED_WAIT),
ENUM_BIT(EXTENT_NORESERVE),
ENUM_BIT(EXTENT_QGROUP_RESERVED),
ENUM_BIT(EXTENT_CLEAR_DATA_RESV), /* * Must be cleared only during ordered extent completion or on error * paths if we did not manage to submit bios and create the ordered * extents for the range. Should not be cleared during page release * and page invalidation (if there is an ordered extent in flight), * that is left for the ordered extent completion.
*/
ENUM_BIT(EXTENT_DELALLOC_NEW), /* * Mark that a range is being locked for finishing an ordered extent. * Used together with EXTENT_LOCKED.
*/
ENUM_BIT(EXTENT_FINISHING_ORDERED), /* * When an ordered extent successfully completes for a region marked as * a new delalloc range, use this flag when clearing a new delalloc * range to indicate that the VFS' inode number of bytes should be * incremented and the inode's new delalloc bytes decremented, in an * atomic way to prevent races with stat(2).
*/
ENUM_BIT(EXTENT_ADD_INODE_BYTES), /* * Set during truncate when we're clearing an entire range and we just * want the extent states to go away.
*/
ENUM_BIT(EXTENT_CLEAR_ALL_BITS),
/* * This must be last. * * Bit not representing a state but a request for NOWAIT semantics, * e.g. when allocating memory, and must be masked out from the other * bits.
*/
ENUM_BIT(EXTENT_NOWAIT)
};
/* * Redefined bits above which are used only in the device allocation tree, * shouldn't be using EXTENT_LOCKED / EXTENT_BOUNDARY / EXTENT_CLEAR_META_RESV * / EXTENT_CLEAR_DATA_RESV because they have special meaning to the bit * manipulation functions
*/ #define CHUNK_ALLOCATED EXTENT_DIRTY #define CHUNK_TRIMMED EXTENT_DEFRAG #define CHUNK_STATE_MASK (CHUNK_ALLOCATED | \
CHUNK_TRIMMED)
struct extent_io_tree { struct rb_root state; /* * The fs_info is needed for trace points, a tree attached to an inode * needs the inode. * * owner == IO_TREE_INODE_IO - then inode is valid and fs_info can be * accessed as inode->root->fs_info
*/ union { struct btrfs_fs_info *fs_info; struct btrfs_inode *inode;
};
/* Who owns this io tree, should be one of IO_TREE_* */
u8 owner;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.