/fs/xfs/scrub/ |
D | scrub.c | 158 if (error == 0 && (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)) in xchk_teardown() 172 if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) in xchk_teardown() 362 struct xfs_scrub_metadata *sm) in xchk_validate_inputs() argument 369 sm->sm_flags &= ~XFS_SCRUB_FLAGS_OUT; in xchk_validate_inputs() 370 if (sm->sm_flags & ~XFS_SCRUB_FLAGS_IN) in xchk_validate_inputs() 373 if (memchr_inv(sm->sm_reserved, 0, sizeof(sm->sm_reserved))) in xchk_validate_inputs() 378 if (sm->sm_type >= XFS_SCRUB_TYPE_NR) in xchk_validate_inputs() 380 ops = &meta_scrub_ops[sm->sm_type]; in xchk_validate_inputs() 392 if (sm->sm_ino || sm->sm_gen || sm->sm_agno) in xchk_validate_inputs() 396 if (sm->sm_ino || sm->sm_gen || in xchk_validate_inputs() [all …]
|
D | common.c | 79 sc->sm, *error); in __xchk_process_error() 84 sc->sm->sm_flags |= errflag; in __xchk_process_error() 132 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_fblock_process_error() 137 sc->sm->sm_flags |= errflag; in __xchk_fblock_process_error() 188 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; in xchk_block_set_preen() 202 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; in xchk_ino_set_preen() 211 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_set_corrupt() 221 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_block_set_corrupt() 231 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; in xchk_block_xref_set_corrupt() 245 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_ino_set_corrupt() [all …]
|
D | health.c | 136 bad = (sc->sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT | in xchk_update_health() 138 switch (type_to_health_flag[sc->sm->sm_type].group) { in xchk_update_health() 140 pag = xfs_perag_get(sc->mp, sc->sm->sm_agno); in xchk_update_health() 191 if (sc->sm->sm_type == XFS_SCRUB_TYPE_BNOBT) in xchk_ag_btree_healthy_enough() 196 if (sc->sm->sm_type == XFS_SCRUB_TYPE_CNTBT) in xchk_ag_btree_healthy_enough() 201 if (sc->sm->sm_type == XFS_SCRUB_TYPE_INOBT) in xchk_ag_btree_healthy_enough() 206 if (sc->sm->sm_type == XFS_SCRUB_TYPE_FINOBT) in xchk_ag_btree_healthy_enough() 211 if (sc->sm->sm_type == XFS_SCRUB_TYPE_RMAPBT) in xchk_ag_btree_healthy_enough() 216 if (sc->sm->sm_type == XFS_SCRUB_TYPE_REFCNTBT) in xchk_ag_btree_healthy_enough() 226 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XFAIL; in xchk_ag_btree_healthy_enough()
|
D | repair.c | 45 trace_xrep_attempt(XFS_I(file_inode(sc->file)), sc->sm, error); in xrep_attempt() 52 trace_xrep_done(XFS_I(file_inode(sc->file)), sc->sm, error); in xrep_attempt() 59 sc->sm->sm_flags &= ~XFS_SCRUB_FLAGS_OUT; in xrep_attempt() 179 struct xfs_scrub_metadata *sm = sc->sm; in xrep_calc_ag_resblks() local 192 if (!(sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)) in xrep_calc_ag_resblks() 195 pag = xfs_perag_get(mp, sm->sm_agno); in xrep_calc_ag_resblks() 201 error = xfs_ialloc_read_agi(mp, NULL, sm->sm_agno, &bp); in xrep_calc_ag_resblks() 209 error = xfs_alloc_read_agf(mp, NULL, sm->sm_agno, 0, &bp); in xrep_calc_ag_resblks() 211 aglen = xfs_ag_block_count(mp, sm->sm_agno); in xrep_calc_ag_resblks() 226 !xfs_verify_agino(mp, sm->sm_agno, icount)) { in xrep_calc_ag_resblks() [all …]
|
D | trace.h | 97 TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm, 99 TP_ARGS(ip, sm, error), 113 __entry->type = sm->sm_type; 114 __entry->agno = sm->sm_agno; 115 __entry->inum = sm->sm_ino; 116 __entry->gen = sm->sm_gen; 117 __entry->flags = sm->sm_flags; 132 TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm, \ 134 TP_ARGS(ip, sm, error)) 156 __entry->type = sc->sm->sm_type; [all …]
|
D | rtbitmap.c | 72 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap_check_extents() 110 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap() 114 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap() 148 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtsummary() 175 if (xchk_skip_xref(sc->sm)) in xchk_xref_is_used_rt_space()
|
D | alloc.c | 47 if (sc->sm->sm_type == XFS_SCRUB_TYPE_BNOBT) in xchk_allocbt_xref_other() 51 if (!*pcur || xchk_skip_xref(sc->sm)) in xchk_allocbt_xref_other() 81 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_allocbt_xref() 150 if (!sc->sa.bno_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_used_space()
|
D | dir.c | 193 if (error == 0 && sdc->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_dir_actor() 260 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_dir_rec() 375 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_data_bestfree() 444 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_data_bestfree() 569 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_leaf1_bestfree() 597 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_leaf1_bestfree() 695 while (found && !(sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) { in xchk_directory_blocks() 725 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_blocks() 743 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_blocks() 749 while (found && !(sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) { in xchk_directory_blocks() [all …]
|
D | bmap.c | 47 sc->sm->sm_type == XFS_SCRUB_TYPE_BMBTD) { in xchk_setup_inode_bmap() 176 if (!info->sc->sa.rmap_cur || xchk_skip_xref(info->sc->sm)) in xchk_bmap_xref_rmap() 371 if (info->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_iextent() 528 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmap() 542 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmap() 590 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_bmap_check_rmaps() 620 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmaps() 698 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap() 711 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_bmap()
|
D | agheader.c | 30 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_superblock_xref() 34 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_superblock_xref() 73 agno = sc->sm->sm_agno; in xchk_superblock() 498 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agf_xref() 525 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_agf() 625 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block_xref() 653 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block() 678 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_xref() 703 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_agfl() 717 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl() [all …]
|
D | xfs_scrub.h | 10 # define xfs_scrub_metadata(file, sm) (-ENOTTY) argument 12 int xfs_scrub_metadata(struct file *file, struct xfs_scrub_metadata *sm);
|
D | quota.c | 25 switch (sc->sm->sm_type) { in xchk_quota_to_dqtype() 163 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_quota_item() 183 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_quota_data_fork() 225 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_quota()
|
D | rmap.c | 46 if (!sc->sa.refc_cur || xchk_skip_xref(sc->sm)) in xchk_rmapbt_xref_refc() 72 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rmapbt_xref() 184 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_check_owner() 227 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_has_no_owner()
|
D | attr.c | 173 if (sx->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_listent() 296 if (!(ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_xattr_entry() 363 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_block() 384 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_block() 425 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_rec() 491 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr()
|
D | refcount.c | 287 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_refcountbt_xref_rmap() 321 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_refcountbt_xref() 379 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_refcount_xref_rmap() 432 if (!sc->sa.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_cow_staging() 476 if (!sc->sa.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_not_shared()
|
D | ialloc.c | 66 if (sc->sm->sm_type == XFS_SCRUB_TYPE_FINOBT) in xchk_iallocbt_chunk_xref_other() 89 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_chunk_xref() 456 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec() 521 xchk_skip_xref(sc->sm)) in xchk_iallocbt_xref_rmap_btreeblks() 557 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_iallocbt_xref_rmap_inodes() 631 if (!(*icur) || xchk_skip_xref(sc->sm)) in xchk_xref_inode_check()
|
D | inode.c | 451 if (!sc->sa.fino_cur || xchk_skip_xref(sc->sm)) in xchk_inode_xref_finobt() 494 if (xchk_skip_xref(sc->sm)) in xchk_inode_xref_bmap() 528 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_inode_xref() 591 xchk_ino_set_corrupt(sc, sc->sm->sm_ino); in xchk_inode() 598 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_inode()
|
D | common.h | 143 static inline bool xchk_skip_xref(struct xfs_scrub_metadata *sm) in xchk_skip_xref() argument 145 return sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT | in xchk_skip_xref()
|
D | dabtree.c | 43 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in xchk_da_process_error() 48 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_da_process_error() 72 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_da_set_corrupt() 539 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_da_btree()
|
D | btree.c | 40 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_btree_process_error() 45 sc->sm->sm_flags |= errflag; in __xchk_btree_process_error() 91 sc->sm->sm_flags |= errflag; in __xchk_btree_set_corrupt() 697 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_btree()
|
/fs/ceph/ |
D | snap.c | 1078 struct ceph_snapid_map *sm, *exist; in ceph_get_snapid_map() local 1104 sm = kmalloc(sizeof(*sm), GFP_NOFS); in ceph_get_snapid_map() 1105 if (!sm) in ceph_get_snapid_map() 1108 ret = get_anon_bdev(&sm->dev); in ceph_get_snapid_map() 1110 kfree(sm); in ceph_get_snapid_map() 1114 INIT_LIST_HEAD(&sm->lru); in ceph_get_snapid_map() 1115 atomic_set(&sm->ref, 1); in ceph_get_snapid_map() 1116 sm->snap = snap; in ceph_get_snapid_map() 1137 rb_link_node(&sm->node, parent, p); in ceph_get_snapid_map() 1138 rb_insert_color(&sm->node, &mdsc->snapid_map_tree); in ceph_get_snapid_map() [all …]
|
/fs/ocfs2/ |
D | slot_map.c | 92 struct ocfs2_slot_map *sm; in ocfs2_update_slot_info_old() local 94 sm = (struct ocfs2_slot_map *)si->si_bh[0]->b_data; in ocfs2_update_slot_info_old() 97 if (le16_to_cpu(sm->sm_slots[i]) == (u16)OCFS2_INVALID_SLOT) in ocfs2_update_slot_info_old() 100 ocfs2_set_slot(si, i, le16_to_cpu(sm->sm_slots[i])); in ocfs2_update_slot_info_old() 170 struct ocfs2_slot_map *sm; in ocfs2_update_disk_slot_old() local 172 sm = (struct ocfs2_slot_map *)si->si_bh[0]->b_data; in ocfs2_update_disk_slot_old() 175 sm->sm_slots[i] = in ocfs2_update_disk_slot_old() 178 sm->sm_slots[i] = cpu_to_le16(OCFS2_INVALID_SLOT); in ocfs2_update_disk_slot_old()
|
/fs/jffs2/ |
D | scan.c | 486 struct jffs2_sum_marker *sm; in jffs2_scan_eraseblock() local 492 sm = (void *)buf + c->sector_size - sizeof(*sm); in jffs2_scan_eraseblock() 493 if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { in jffs2_scan_eraseblock() 494 sumptr = buf + je32_to_cpu(sm->offset); in jffs2_scan_eraseblock() 495 sumlen = c->sector_size - je32_to_cpu(sm->offset); in jffs2_scan_eraseblock() 502 buf_len = sizeof(*sm); in jffs2_scan_eraseblock() 511 sm = (void *)buf + buf_size - sizeof(*sm); in jffs2_scan_eraseblock() 512 if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { in jffs2_scan_eraseblock() 513 sumlen = c->sector_size - je32_to_cpu(sm->offset); in jffs2_scan_eraseblock()
|
D | summary.c | 679 struct jffs2_sum_marker *sm; in jffs2_sum_write_data() local 805 sm = wpage; in jffs2_sum_write_data() 806 sm->offset = cpu_to_je32(c->sector_size - jeb->free_size); in jffs2_sum_write_data() 807 sm->magic = cpu_to_je32(JFFS2_SUM_MAGIC); in jffs2_sum_write_data()
|
/fs/f2fs/ |
D | gc.c | 749 struct sit_info *sm = SIT_I(sbi); in f2fs_get_victim() local 809 last_victim = sm->last_victim[p.gc_mode]; in f2fs_get_victim() 826 if (sm->last_victim[p.gc_mode]) { in f2fs_get_victim() 828 sm->last_victim[p.gc_mode]; in f2fs_get_victim() 829 sm->last_victim[p.gc_mode] = 0; in f2fs_get_victim() 845 if (test_bit(segno, sm->invalid_segmap)) in f2fs_get_victim() 893 if (!sm->last_victim[p.gc_mode] && segno <= last_victim) in f2fs_get_victim() 894 sm->last_victim[p.gc_mode] = in f2fs_get_victim() 897 sm->last_victim[p.gc_mode] = segno + p.ofs_unit; in f2fs_get_victim() 898 sm->last_victim[p.gc_mode] %= in f2fs_get_victim() [all …]
|