struct btrfs_delayed_root {
spinlock_t lock; struct list_head node_list; /* * Used for delayed nodes which is waiting to be dealt with by the * worker. If the delayed node is inserted into the work queue, we * drop it from this list.
*/ struct list_head prepare_list;
atomic_t items; /* for delayed items */
atomic_t items_seq; /* for delayed items */ int nodes; /* for delayed nodes */
wait_queue_head_t wait;
};
struct btrfs_delayed_node {
u64 inode_id;
u64 bytes_reserved; struct btrfs_root *root; /* Used to add the node into the delayed root's node list. */ struct list_head n_list; /* * Used to add the node into the prepare list, the nodes in this list * is waiting to be dealt with by the async worker.
*/ struct list_head p_list; struct rb_root_cached ins_root; struct rb_root_cached del_root; struct mutex mutex; struct btrfs_inode_item inode_item;
refcount_t refs; int count;
u64 index_cnt; unsignedlong flags; /* * The size of the next batch of dir index items to insert (if this * node is from a directory inode). Protected by @mutex.
*/
u32 curr_index_batch_size; /* * Number of leaves reserved for inserting dir index items (if this * node belongs to a directory inode). This may be larger then the * actual number of leaves we end up using. Protected by @mutex.
*/
u32 index_item_leaves;
};
struct btrfs_delayed_item { struct rb_node rb_node; /* Offset value of the corresponding dir index key. */
u64 index; struct list_head tree_list; /* used for batch insert/delete items */ struct list_head readdir_list; /* used for readdir items */ /* * Used when logging a directory. * Insertions and deletions to this list are protected by the parent * delayed node's mutex.
*/ struct list_head log_list;
u64 bytes_reserved; struct btrfs_delayed_node *delayed_node;
refcount_t refs; enum btrfs_delayed_item_type type:8; /* * Track if this delayed item was already logged. * Protected by the mutex of the parent delayed inode.
*/ bool logged; /* The maximum leaf size is 64K, so u16 is more than enough. */
u16 data_len; char data[] __counted_by(data_len);
};
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.