Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/fs/bcachefs/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 15 kB image not shown  

Quelle  sb-errors_format.h

  Sprache: C
 

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

enum bch_fsck_flags {
 FSCK_CAN_FIX  = BIT(0),
 FSCK_CAN_IGNORE  = BIT(1),
 FSCK_AUTOFIX  = BIT(2),
 FSCK_ERR_NO_LOG  = BIT(3),
};

#define BCH_SB_ERRS()         \
 x(clean_but_journal_not_empty,      00)  \
 x(dirty_but_no_journal_entries,      10)  \
 x(dirty_but_no_journal_entries_post_drop_nonflushes,   20)  \
 x(sb_clean_journal_seq_mismatch,     30)  \
 x(sb_clean_btree_root_mismatch,      40)  \
 x(sb_clean_missing,       50)  \
 x(jset_unsupported_version,      60)  \
 x(jset_unknown_csum,       70)  \
 x(jset_last_seq_newer_than_seq,      80)  \
 x(jset_past_bucket_end,       90)  \
 x(jset_seq_blacklisted,      100)  \
 x(journal_entries_missing,     110)  \
 x(journal_entry_replicas_not_marked,    12, FSCK_AUTOFIX) \
 x(journal_entry_past_jset_end,     130)  \
 x(journal_entry_replicas_data_mismatch,    140)  \
 x(journal_entry_bkey_u64s_0,     150)  \
 x(journal_entry_bkey_past_end,     160)  \
 x(journal_entry_bkey_bad_format,    170)  \
 x(journal_entry_bkey_invalid,     180)  \
 x(journal_entry_btree_root_bad_size,    190)  \
 x(journal_entry_blacklist_bad_size,    200)  \
 x(journal_entry_blacklist_v2_bad_size,    210)  \
 x(journal_entry_blacklist_v2_start_past_end,   220)  \
 x(journal_entry_usage_bad_size,     230)  \
 x(journal_entry_data_usage_bad_size,    240)  \
 x(journal_entry_clock_bad_size,     250)  \
 x(journal_entry_clock_bad_rw,     260)  \
 x(journal_entry_dev_usage_bad_size,    270)  \
 x(journal_entry_dev_usage_bad_dev,    280)  \
 x(journal_entry_dev_usage_bad_pad,    290)  \
 x(btree_node_unreadable,     300)  \
 x(btree_node_fault_injected,     310)  \
 x(btree_node_bad_magic,      320)  \
 x(btree_node_bad_seq,      330)  \
 x(btree_node_unsupported_version,    340)  \
 x(btree_node_bset_older_than_sb_min,    350)  \
 x(btree_node_bset_newer_than_sb,    360)  \
 x(btree_node_data_missing,     37, FSCK_AUTOFIX) \
 x(btree_node_bset_after_end,     380)  \
 x(btree_node_replicas_sectors_written_mismatch,   390)  \
 x(btree_node_replicas_data_mismatch,    400)  \
 x(bset_unknown_csum,      410)  \
 x(bset_bad_csum,      420)  \
 x(bset_past_end_of_btree_node,     430)  \
 x(bset_wrong_sector_offset,     440)  \
 x(bset_empty,       450)  \
 x(bset_bad_seq,       460)  \
 x(bset_blacklisted_journal_seq,     47, FSCK_AUTOFIX) \
 x(first_bset_blacklisted_journal_seq,    48, FSCK_AUTOFIX) \
 x(btree_node_bad_btree,      490)  \
 x(btree_node_bad_level,      500)  \
 x(btree_node_bad_min_key,     510)  \
 x(btree_node_bad_max_key,     520)  \
 x(btree_node_bad_format,     530)  \
 x(btree_node_bkey_past_bset_end,    540)  \
 x(btree_node_bkey_bad_format,     550)  \
 x(btree_node_bad_bkey,      560)  \
 x(btree_node_bkey_out_of_order,     57, FSCK_AUTOFIX) \
 x(btree_root_bkey_invalid,     58, FSCK_AUTOFIX) \
 x(btree_root_read_error,     59, FSCK_AUTOFIX) \
 x(btree_root_bad_min_key,     600)  \
 x(btree_root_bad_max_key,     610)  \
 x(btree_node_read_error,     62, FSCK_AUTOFIX) \
 x(btree_node_topology_bad_min_key,    63, FSCK_AUTOFIX) \
 x(btree_node_topology_bad_max_key,    64, FSCK_AUTOFIX) \
 x(btree_node_topology_overwritten_by_prev_node,   65, FSCK_AUTOFIX) \
 x(btree_node_topology_overwritten_by_next_node,   66, FSCK_AUTOFIX) \
 x(btree_node_topology_interior_node_empty,   67, FSCK_AUTOFIX) \
 x(fs_usage_hidden_wrong,     68, FSCK_AUTOFIX) \
 x(fs_usage_btree_wrong,      69, FSCK_AUTOFIX) \
 x(fs_usage_data_wrong,      70, FSCK_AUTOFIX) \
 x(fs_usage_cached_wrong,     71, FSCK_AUTOFIX) \
 x(fs_usage_reserved_wrong,     72, FSCK_AUTOFIX) \
 x(fs_usage_persistent_reserved_wrong,    73, FSCK_AUTOFIX) \
 x(fs_usage_nr_inodes_wrong,     74, FSCK_AUTOFIX) \
 x(fs_usage_replicas_wrong,     75, FSCK_AUTOFIX) \
 x(dev_usage_buckets_wrong,     76, FSCK_AUTOFIX) \
 x(dev_usage_sectors_wrong,     77, FSCK_AUTOFIX) \
 x(dev_usage_fragmented_wrong,     78, FSCK_AUTOFIX) \
 x(dev_usage_buckets_ec_wrong,     79, FSCK_AUTOFIX) \
 x(bkey_version_in_future,     800)  \
 x(bkey_u64s_too_small,      810)  \
 x(bkey_invalid_type_for_btree,     820)  \
 x(bkey_extent_size_zero,     830)  \
 x(bkey_extent_size_greater_than_offset,    840)  \
 x(bkey_size_nonzero,      850)  \
 x(bkey_snapshot_nonzero,     860)  \
 x(bkey_snapshot_zero,      870)  \
 x(bkey_at_pos_max,      880)  \
 x(bkey_before_start_of_btree_node,    890)  \
 x(bkey_after_end_of_btree_node,     900)  \
 x(bkey_val_size_nonzero,     910)  \
 x(bkey_val_size_too_small,     920)  \
 x(alloc_v1_val_size_bad,     930)  \
 x(alloc_v2_unpack_error,     940)  \
 x(alloc_v3_unpack_error,     950)  \
 x(alloc_v4_val_size_bad,     960)  \
 x(alloc_v4_backpointers_start_bad,    970)  \
 x(alloc_key_data_type_bad,     980)  \
 x(alloc_key_empty_but_have_data,    990)  \
 x(alloc_key_dirty_sectors_0,    1000)  \
 x(alloc_key_data_type_inconsistency,   1010)  \
 x(alloc_key_to_missing_dev_bucket,   1020)  \
 x(alloc_key_cached_inconsistency,   1030)  \
 x(alloc_key_cached_but_read_time_zero,   104, FSCK_AUTOFIX) \
 x(alloc_key_to_missing_lru_entry,   105, FSCK_AUTOFIX) \
 x(alloc_key_data_type_wrong,    106, FSCK_AUTOFIX) \
 x(alloc_key_gen_wrong,     107, FSCK_AUTOFIX) \
 x(alloc_key_dirty_sectors_wrong,   108, FSCK_AUTOFIX) \
 x(alloc_key_cached_sectors_wrong,   109, FSCK_AUTOFIX) \
 x(alloc_key_stripe_wrong,    110, FSCK_AUTOFIX) \
 x(alloc_key_stripe_redundancy_wrong,   111, FSCK_AUTOFIX) \
 x(alloc_key_journal_seq_in_future,   298, FSCK_AUTOFIX) \
 x(bucket_sector_count_overflow,    1120)  \
 x(bucket_metadata_type_mismatch,   1130)  \
 x(need_discard_key_wrong,    114, FSCK_AUTOFIX) \
 x(freespace_key_wrong,     115, FSCK_AUTOFIX) \
 x(freespace_hole_missing,    116, FSCK_AUTOFIX) \
 x(bucket_gens_val_size_bad,    1170)  \
 x(bucket_gens_key_wrong,    118, FSCK_AUTOFIX) \
 x(bucket_gens_hole_wrong,    119, FSCK_AUTOFIX) \
 x(bucket_gens_to_invalid_dev,    120, FSCK_AUTOFIX) \
 x(bucket_gens_to_invalid_buckets,   121, FSCK_AUTOFIX) \
 x(bucket_gens_nonzero_for_invalid_buckets,  122, FSCK_AUTOFIX) \
 x(need_discard_freespace_key_to_invalid_dev_bucket, 1230)  \
 x(need_discard_freespace_key_bad,   124, FSCK_AUTOFIX) \
 x(discarding_bucket_not_in_need_discard_btree,  2910)  \
 x(backpointer_bucket_offset_wrong,   1250)  \
 x(backpointer_level_bad,    2940)  \
 x(backpointer_dev_bad,     2970)  \
 x(backpointer_to_missing_device,   126, FSCK_AUTOFIX) \
 x(backpointer_to_missing_alloc,    127, FSCK_AUTOFIX) \
 x(backpointer_to_missing_ptr,    128, FSCK_AUTOFIX) \
 x(lru_entry_at_time_0,     129, FSCK_AUTOFIX) \
 x(lru_entry_to_invalid_bucket,    130, FSCK_AUTOFIX) \
 x(lru_entry_bad,     131, FSCK_AUTOFIX) \
 x(btree_ptr_val_too_big,    1320)  \
 x(btree_ptr_v2_val_too_big,    1330)  \
 x(btree_ptr_has_non_ptr,    1340)  \
 x(extent_ptrs_invalid_entry,    1350)  \
 x(extent_ptrs_no_ptrs,     1360)  \
 x(extent_ptrs_too_many_ptrs,    1370)  \
 x(extent_ptrs_redundant_crc,    1380)  \
 x(extent_ptrs_redundant_stripe,    1390)  \
 x(extent_ptrs_unwritten,    1400)  \
 x(extent_ptrs_written_and_unwritten,   1410)  \
 x(ptr_to_invalid_device,    1420)  \
 x(ptr_to_duplicate_device,    1430)  \
 x(ptr_after_last_bucket,    1440)  \
 x(ptr_before_first_bucket,    1450)  \
 x(ptr_spans_multiple_buckets,    1460)  \
 x(ptr_to_missing_backpointer,    147, FSCK_AUTOFIX) \
 x(ptr_to_missing_alloc_key,    148, FSCK_AUTOFIX) \
 x(ptr_to_missing_replicas_entry,   149, FSCK_AUTOFIX) \
 x(ptr_to_missing_stripe,    1500)  \
 x(ptr_to_incorrect_stripe,    1510)  \
 x(ptr_gen_newer_than_bucket_gen,   152, FSCK_AUTOFIX)  \
 x(ptr_too_stale,     1530)  \
 x(stale_dirty_ptr,     154, FSCK_AUTOFIX) \
 x(ptr_bucket_data_type_mismatch,   1550)  \
 x(ptr_cached_and_erasure_coded,    1560)  \
 x(ptr_crc_uncompressed_size_too_small,   1570)  \
 x(ptr_crc_uncompressed_size_too_big,   1610)  \
 x(ptr_crc_uncompressed_size_mismatch,   3000)  \
 x(ptr_crc_csum_type_unknown,    1580)  \
 x(ptr_crc_compression_type_unknown,   1590)  \
 x(ptr_crc_redundant,     1600)  \
 x(ptr_crc_nonce_mismatch,    1620)  \
 x(ptr_stripe_redundant,     1630)  \
 x(extent_flags_not_at_start,    3060)  \
 x(reservation_key_nr_replicas_invalid,   1640)  \
 x(reflink_v_refcount_wrong,    165, FSCK_AUTOFIX) \
 x(reflink_v_pos_bad,     2920)  \
 x(reflink_p_to_missing_reflink_v,   166, FSCK_AUTOFIX) \
 x(reflink_refcount_underflow,    2930)  \
 x(stripe_pos_bad,     1670)  \
 x(stripe_val_size_bad,     1680)  \
 x(stripe_csum_granularity_bad,    2900)  \
 x(stripe_sector_count_wrong,    1690)  \
 x(snapshot_tree_pos_bad,    1700)  \
 x(snapshot_tree_to_missing_snapshot,   1710)  \
 x(snapshot_tree_to_missing_subvol,   1720)  \
 x(snapshot_tree_to_wrong_subvol,   1730)  \
 x(snapshot_tree_to_snapshot_subvol,   1740)  \
 x(snapshot_pos_bad,     1750)  \
 x(snapshot_parent_bad,     1760)  \
 x(snapshot_children_not_normalized,   1770)  \
 x(snapshot_child_duplicate,    1780)  \
 x(snapshot_child_bad,     1790)  \
 x(snapshot_skiplist_not_normalized,   1800)  \
 x(snapshot_skiplist_bad,    1810)  \
 x(snapshot_should_not_have_subvol,   1820)  \
 x(snapshot_to_bad_snapshot_tree,   183, FSCK_AUTOFIX) \
 x(snapshot_bad_depth,     1840)  \
 x(snapshot_bad_skiplist,    1850)  \
 x(subvol_pos_bad,     1860)  \
 x(subvol_not_master_and_not_snapshot,   187, FSCK_AUTOFIX) \
 x(subvol_to_missing_root,    1880)  \
 x(subvol_root_wrong_bi_subvol,    189, FSCK_AUTOFIX) \
 x(bkey_in_missing_snapshot,    1900)  \
 x(bkey_in_deleted_snapshot,    315, FSCK_AUTOFIX) \
 x(inode_pos_inode_nonzero,    1910)  \
 x(inode_pos_blockdev_range,    1920)  \
 x(inode_alloc_cursor_inode_bad,    3010)  \
 x(inode_unpack_error,     1930)  \
 x(inode_str_hash_invalid,    1940)  \
 x(inode_v3_fields_start_bad,    1950)  \
 x(inode_snapshot_mismatch,    1960)  \
 x(snapshot_key_missing_inode_snapshot,   314, FSCK_AUTOFIX) \
 x(inode_unlinked_but_clean,    1970)  \
 x(inode_unlinked_but_nlink_nonzero,   1980)  \
 x(inode_unlinked_and_not_open,    2810)  \
 x(inode_unlinked_but_has_dirent,   2850)  \
 x(inode_checksum_type_invalid,    1990)  \
 x(inode_compression_type_invalid,   2000)  \
 x(inode_subvol_root_but_not_dir,   2010)  \
 x(inode_i_size_dirty_but_clean,    202, FSCK_AUTOFIX) \
 x(inode_i_sectors_dirty_but_clean,   203, FSCK_AUTOFIX) \
 x(inode_i_sectors_wrong,    204, FSCK_AUTOFIX) \
 x(inode_dir_wrong_nlink,    205, FSCK_AUTOFIX) \
 x(inode_dir_multiple_links,    206, FSCK_AUTOFIX) \
 x(inode_dir_missing_backpointer,   284, FSCK_AUTOFIX) \
 x(inode_dir_unlinked_but_not_empty,   286, FSCK_AUTOFIX) \
 x(inode_dir_has_nonzero_i_size,    319, FSCK_AUTOFIX) \
 x(inode_multiple_links_but_nlink_0,   207, FSCK_AUTOFIX) \
 x(inode_wrong_backpointer,    208, FSCK_AUTOFIX) \
 x(inode_wrong_nlink,     209, FSCK_AUTOFIX) \
 x(inode_has_child_snapshots_wrong,   287, FSCK_AUTOFIX) \
 x(inode_unreachable,     210, FSCK_AUTOFIX) \
 x(inode_journal_seq_in_future,    299, FSCK_AUTOFIX) \
 x(inode_i_sectors_underflow,    312, FSCK_AUTOFIX) \
 x(inode_has_case_insensitive_not_set,   316, FSCK_AUTOFIX) \
 x(inode_parent_has_case_insensitive_not_set,  317, FSCK_AUTOFIX) \
 x(vfs_inode_i_blocks_underflow,    311, FSCK_AUTOFIX) \
 x(vfs_inode_i_blocks_not_zero_at_truncate,  313, FSCK_AUTOFIX) \
 x(vfs_bad_inode_rm,     3200)  \
 x(deleted_inode_but_clean,    211, FSCK_AUTOFIX) \
 x(deleted_inode_missing,    212, FSCK_AUTOFIX) \
 x(deleted_inode_is_dir,     213, FSCK_AUTOFIX) \
 x(deleted_inode_not_unlinked,    214, FSCK_AUTOFIX) \
 x(deleted_inode_has_child_snapshots,   288, FSCK_AUTOFIX) \
 x(extent_overlapping,     2150)  \
 x(key_in_missing_inode,     216, FSCK_AUTOFIX) \
 x(key_in_wrong_inode_type,    2170)  \
 x(extent_past_end_of_inode,    218, FSCK_AUTOFIX) \
 x(dirent_empty_name,     2190)  \
 x(dirent_val_too_big,     2200)  \
 x(dirent_name_too_long,     2210)  \
 x(dirent_name_embedded_nul,    2220)  \
 x(dirent_name_dot_or_dotdot,    2230)  \
 x(dirent_name_has_slash,    2240)  \
 x(dirent_d_type_wrong,     225, FSCK_AUTOFIX) \
 x(inode_bi_parent_wrong,    2260)  \
 x(dirent_in_missing_dir_inode,    2270)  \
 x(dirent_in_non_dir_inode,    2280)  \
 x(dirent_to_missing_inode,    229, FSCK_AUTOFIX) \
 x(dirent_to_overwritten_inode,    3020)  \
 x(dirent_to_missing_subvol,    2300)  \
 x(dirent_to_itself,     2310)  \
 x(dirent_casefold_mismatch,    318, FSCK_AUTOFIX) \
 x(quota_type_invalid,     2320)  \
 x(xattr_val_size_too_small,    2330)  \
 x(xattr_val_size_too_big,    2340)  \
 x(xattr_invalid_type,     2350)  \
 x(xattr_name_invalid_chars,    2360)  \
 x(xattr_in_missing_inode,    2370)  \
 x(root_subvol_missing,     2380)  \
 x(root_dir_missing,     2390)  \
 x(root_inode_not_dir,     2400)  \
 x(dir_loop,      2410)  \
 x(hash_table_key_duplicate,    242, FSCK_AUTOFIX) \
 x(hash_table_key_wrong_offset,    243, FSCK_AUTOFIX) \
 x(unlinked_inode_not_on_deleted_list,   244, FSCK_AUTOFIX) \
 x(reflink_p_front_pad_bad,    2450)  \
 x(journal_entry_dup_same_device,   2460)  \
 x(inode_bi_subvol_missing,    2470)  \
 x(inode_bi_subvol_wrong,    2480)  \
 x(inode_points_to_missing_dirent,   249, FSCK_AUTOFIX) \
 x(inode_points_to_wrong_dirent,    250, FSCK_AUTOFIX) \
 x(inode_bi_parent_nonzero,    2510)  \
 x(dirent_to_missing_parent_subvol,   2520)  \
 x(dirent_not_visible_in_parent_subvol,   2530)  \
 x(subvol_fs_path_parent_wrong,    2540)  \
 x(subvol_root_fs_path_parent_nonzero,   2550)  \
 x(subvol_children_not_set,    2560)  \
 x(subvol_children_bad,     2570)  \
 x(subvol_loop,      2580)  \
 x(subvol_unreachable,     259, FSCK_AUTOFIX) \
 x(btree_node_bkey_bad_u64s,    2600)  \
 x(btree_node_topology_empty_interior_node,  2610)  \
 x(btree_ptr_v2_min_key_bad,    2620)  \
 x(btree_root_unreadable_and_scan_found_nothing,  2630)  \
 x(snapshot_node_missing,    264, FSCK_AUTOFIX) \
 x(dup_backpointer_to_bad_csum_extent,   2650)  \
 x(btree_bitmap_not_marked,    266, FSCK_AUTOFIX) \
 x(sb_clean_entry_overrun,    2670)  \
 x(btree_ptr_v2_written_0,    2680)  \
 x(subvol_snapshot_bad,     2690)  \
 x(subvol_inode_bad,     2700)  \
 x(subvol_missing,     308, FSCK_AUTOFIX) \
 x(alloc_key_stripe_sectors_wrong,   271, FSCK_AUTOFIX) \
 x(accounting_mismatch,     272, FSCK_AUTOFIX) \
 x(accounting_replicas_not_marked,   2730)  \
 x(accounting_to_invalid_device,    2890)  \
 x(invalid_btree_id,     274, FSCK_AUTOFIX)  \
 x(alloc_key_io_time_bad,    2750)  \
 x(alloc_key_fragmentation_lru_wrong,   276, FSCK_AUTOFIX) \
 x(accounting_key_junk_at_end,    277, FSCK_AUTOFIX) \
 x(accounting_key_replicas_nr_devs_0,   278, FSCK_AUTOFIX) \
 x(accounting_key_replicas_nr_required_bad,  279, FSCK_AUTOFIX) \
 x(accounting_key_replicas_devs_unsorted,  280, FSCK_AUTOFIX) \
 x(accounting_key_version_0,    282, FSCK_AUTOFIX) \
 x(accounting_key_nr_counters_wrong,   307, FSCK_AUTOFIX) \
 x(logged_op_but_clean,     283, FSCK_AUTOFIX) \
 x(compression_opt_not_marked_in_sb,   295, FSCK_AUTOFIX) \
 x(compression_type_not_marked_in_sb,   296, FSCK_AUTOFIX) \
 x(directory_size_mismatch,    303, FSCK_AUTOFIX) \
 x(dirent_cf_name_too_big,    3040)  \
 x(dirent_stray_data_after_cf_name,   3050)  \
 x(rebalance_work_incorrectly_set,   309, FSCK_AUTOFIX) \
 x(rebalance_work_incorrectly_unset,   310, FSCK_AUTOFIX) \
 x(MAX,       3210)

enum bch_sb_error_id {
#define x(t, n, ...) BCH_FSCK_ERR_##t = n,
 BCH_SB_ERRS()
#undef x
};

struct bch_sb_field_errors {
 struct bch_sb_field field;
 struct bch_sb_field_error_entry {
  __le64  v;
  __le64  last_error_time;
 }   entries[];
};

LE64_BITMASK(BCH_SB_ERROR_ENTRY_ID, struct bch_sb_field_error_entry, v,  016);
LE64_BITMASK(BCH_SB_ERROR_ENTRY_NR, struct bch_sb_field_error_entry, v, 1664);

#endif /* _BCACHEFS_SB_ERRORS_FORMAT_H */

Messung V0.5 in Prozent
C=96 H=92 G=93

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.