/* Fast commit on disk tag length structure */ struct ext4_fc_tl {
__le16 fc_tag;
__le16 fc_len;
};
/* Value structure for tag EXT4_FC_TAG_HEAD. */ struct ext4_fc_head {
__le32 fc_features;
__le32 fc_tid;
};
/* Value structure for EXT4_FC_TAG_ADD_RANGE. */ struct ext4_fc_add_range {
__le32 fc_ino;
__u8 fc_ex[12];
};
/* Value structure for tag EXT4_FC_TAG_DEL_RANGE. */ struct ext4_fc_del_range {
__le32 fc_ino;
__le32 fc_lblk;
__le32 fc_len;
};
/* * This is the value structure for tags EXT4_FC_TAG_CREAT, EXT4_FC_TAG_LINK * and EXT4_FC_TAG_UNLINK.
*/ struct ext4_fc_dentry_info {
__le32 fc_parent_ino;
__le32 fc_ino;
__u8 fc_dname[];
};
/* Value structure for EXT4_FC_TAG_INODE. */ struct ext4_fc_inode {
__le32 fc_ino;
__u8 fc_raw_inode[];
};
/* Value structure for tag EXT4_FC_TAG_TAIL. */ struct ext4_fc_tail {
__le32 fc_tid;
__le32 fc_crc;
};
/* Tag base length */ #define EXT4_FC_TAG_BASE_LEN (sizeof(struct ext4_fc_tl))
/* * Fast commit status codes
*/ enum {
EXT4_FC_STATUS_OK = 0,
EXT4_FC_STATUS_INELIGIBLE,
EXT4_FC_STATUS_SKIPPED,
EXT4_FC_STATUS_FAILED,
};
#ifdef __KERNEL__ /* * In memory list of dentry updates that are performed on the file * system used by fast commit code.
*/ struct ext4_fc_dentry_update { int fcd_op; /* Type of update create / unlink / link */ int fcd_parent; /* Parent inode number */ int fcd_ino; /* Inode number */ struct name_snapshot fcd_name; /* Dirent name */ struct list_head fcd_list; struct list_head fcd_dilist;
};
/* * Physical block regions added to different inodes due to fast commit * recovery. These are set during the SCAN phase. During the replay phase, * our allocator excludes these from its allocation. This ensures that * we don't accidentally allocating a block that is going to be used by * another inode.
*/ struct ext4_fc_alloc_region {
ext4_lblk_t lblk;
ext4_fsblk_t pblk; int ino, len;
};
/* * Fast commit replay state.
*/ struct ext4_fc_replay_state { int fc_replay_num_tags; int fc_replay_expected_off; int fc_current_pass; int fc_cur_tag; int fc_crc; struct ext4_fc_alloc_region *fc_regions; int fc_regions_size, fc_regions_used, fc_regions_valid; int *fc_modified_inodes; int fc_modified_inodes_used, fc_modified_inodes_size;
};
staticinlineconstchar *tag2str(__u16 tag)
{ switch (tag) { case EXT4_FC_TAG_LINK: return"ADD_ENTRY"; case EXT4_FC_TAG_UNLINK: return"DEL_ENTRY"; case EXT4_FC_TAG_ADD_RANGE: return"ADD_RANGE"; case EXT4_FC_TAG_CREAT: return"CREAT_DENTRY"; case EXT4_FC_TAG_DEL_RANGE: return"DEL_RANGE"; case EXT4_FC_TAG_INODE: return"INODE"; case EXT4_FC_TAG_PAD: return"PAD"; case EXT4_FC_TAG_TAIL: return"TAIL"; case EXT4_FC_TAG_HEAD: return"HEAD"; default: return"ERROR";
}
}
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.