/* * Return this if we need to call truncate_block for the last bit of the * truncate.
*/ #define BTRFS_NEED_TRUNCATE_BLOCK 1
struct btrfs_truncate_control { /* * IN: the inode we're operating on, this can be NULL if * ->clear_extent_range is false.
*/ struct btrfs_inode *inode;
/* IN: the size we're truncating to. */
u64 new_size;
/* OUT: the number of extents truncated. */
u64 extents_found;
/* OUT: the last size we truncated this inode to. */
u64 last_size;
/* OUT: the number of bytes to sub from this inode. */
u64 sub_bytes;
/* IN: the ino we are truncating. */
u64 ino;
/* * IN: minimum key type to remove. All key types with this type are * removed only if their offset >= new_size.
*/
u32 min_type;
/* * IN: true if we don't want to do extent reference updates for any file * extents we drop.
*/ bool skip_ref_updates;
/* * IN: true if we need to clear the file extent range for the inode as * we drop the file extent items.
*/ bool clear_extent_range;
};
/* * btrfs_inode_item stores flags in a u64, btrfs_inode stores them in two * separate u32s. These two functions convert between the two representations.
*/ staticinline u64 btrfs_inode_combine_flags(u32 flags, u32 ro_flags)
{ return (flags | ((u64)ro_flags << 32));
}
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.