Home
last modified time | relevance | path

Searched refs:sm (Results 1 – 25 of 31) sorted by relevance

12

/fs/xfs/scrub/
Dscrub.c157 if (error == 0 && (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()
397 sm->sm_agno >= mp->m_sb.sb_agcount) in xchk_validate_inputs()
[all …]
Dcommon.c77 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_process_error()
82 sc->sm->sm_flags |= errflag; in __xchk_process_error()
130 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_fblock_process_error()
135 sc->sm->sm_flags |= errflag; in __xchk_fblock_process_error()
186 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; in xchk_block_set_preen()
200 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; in xchk_ino_set_preen()
209 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_set_corrupt()
219 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_block_set_corrupt()
229 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; in xchk_block_xref_set_corrupt()
243 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; in xchk_ino_set_corrupt()
[all …]
Dhealth.c136 bad = (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT); in xchk_update_health()
137 switch (type_to_health_flag[sc->sm->sm_type].group) { in xchk_update_health()
139 pag = xfs_perag_get(sc->mp, sc->sm->sm_agno); in xchk_update_health()
190 if (sc->sm->sm_type == XFS_SCRUB_TYPE_BNOBT) in xchk_ag_btree_healthy_enough()
195 if (sc->sm->sm_type == XFS_SCRUB_TYPE_CNTBT) in xchk_ag_btree_healthy_enough()
200 if (sc->sm->sm_type == XFS_SCRUB_TYPE_INOBT) in xchk_ag_btree_healthy_enough()
205 if (sc->sm->sm_type == XFS_SCRUB_TYPE_FINOBT) in xchk_ag_btree_healthy_enough()
210 if (sc->sm->sm_type == XFS_SCRUB_TYPE_RMAPBT) in xchk_ag_btree_healthy_enough()
215 if (sc->sm->sm_type == XFS_SCRUB_TYPE_REFCNTBT) in xchk_ag_btree_healthy_enough()
225 sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XFAIL; in xchk_ag_btree_healthy_enough()
Drepair.c45 trace_xrep_attempt(ip, sc->sm, error); in xrep_attempt()
52 trace_xrep_done(ip, 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()
222 !xfs_verify_agino(mp, sm->sm_agno, icount)) { in xrep_calc_ag_resblks()
225 xfs_agino_range(mp, sm->sm_agno, &first, &last); in xrep_calc_ag_resblks()
[all …]
Dtrace.h83 TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm,
85 TP_ARGS(ip, sm, error),
99 __entry->type = sm->sm_type;
100 __entry->agno = sm->sm_agno;
101 __entry->inum = sm->sm_ino;
102 __entry->gen = sm->sm_gen;
103 __entry->flags = sm->sm_flags;
118 TP_PROTO(struct xfs_inode *ip, struct xfs_scrub_metadata *sm, \
120 TP_ARGS(ip, sm, error))
142 __entry->type = sc->sm->sm_type;
[all …]
Drtbitmap.c75 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap_check_extents()
113 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
117 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
151 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtsummary()
178 if (xchk_skip_xref(sc->sm)) in xchk_xref_is_used_rt_space()
Dalloc.c47 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()
Ddir.c179 if (error == 0 && sdc->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_dir_actor()
246 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_dir_rec()
361 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_data_bestfree()
430 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_data_bestfree()
555 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_leaf1_bestfree()
583 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_leaf1_bestfree()
681 while (found && !(sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) { in xchk_directory_blocks()
720 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_blocks()
738 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_directory_blocks()
744 while (found && !(sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) { in xchk_directory_blocks()
[all …]
Dbmap.c47 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()
375 if (info->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_iextent()
530 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmap()
544 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmap()
596 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_bmap_check_rmaps()
626 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap_check_rmaps()
708 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_bmap()
721 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_bmap()
Dxfs_scrub.h10 # define xfs_scrub_metadata(ip, sm) (-ENOTTY) argument
12 int xfs_scrub_metadata(struct xfs_inode *ip, struct xfs_scrub_metadata *sm);
Dagheader.c29 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_superblock_xref()
33 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_superblock_xref()
71 agno = sc->sm->sm_agno; in xchk_superblock()
482 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agf_xref()
521 agno = sc->sa.agno = sc->sm->sm_agno; in xchk_agf()
613 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block_xref()
641 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_block()
667 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl_xref()
699 agno = sc->sa.agno = sc->sm->sm_agno; in xchk_agfl()
710 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_agfl()
[all …]
Dquota.c25 switch (sc->sm->sm_type) { in xchk_quota_to_dqtype()
164 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_quota_item()
184 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_quota_data_fork()
226 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_quota()
Drmap.c46 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()
Dattr.c173 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()
362 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_block()
383 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_block()
424 if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr_rec()
490 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_xattr()
Drefcount.c287 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()
Dialloc.c66 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()
457 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_iallocbt_rec()
522 xchk_skip_xref(sc->sm)) in xchk_iallocbt_xref_rmap_btreeblks()
558 if (!sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_iallocbt_xref_rmap_inodes()
632 if (!(*icur) || xchk_skip_xref(sc->sm)) in xchk_xref_inode_check()
Dinode.c443 if (!sc->sa.fino_cur || xchk_skip_xref(sc->sm)) in xchk_inode_xref_finobt()
486 if (xchk_skip_xref(sc->sm)) in xchk_inode_xref_bmap()
520 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_inode_xref()
582 xchk_ino_set_corrupt(sc, sc->sm->sm_ino); in xchk_inode()
589 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_inode()
Dcommon.h141 static inline bool xchk_skip_xref(struct xfs_scrub_metadata *sm) in xchk_skip_xref() argument
143 return sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT | in xchk_skip_xref()
Ddabtree.c43 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()
Dbtree.c39 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_btree_process_error()
44 sc->sm->sm_flags |= errflag; in __xchk_btree_process_error()
90 sc->sm->sm_flags |= errflag; in __xchk_btree_set_corrupt()
670 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_btree()
/fs/ceph/
Dsnap.c1058 struct ceph_snapid_map *sm, *exist; in ceph_get_snapid_map() local
1084 sm = kmalloc(sizeof(*sm), GFP_NOFS); in ceph_get_snapid_map()
1085 if (!sm) in ceph_get_snapid_map()
1088 ret = get_anon_bdev(&sm->dev); in ceph_get_snapid_map()
1090 kfree(sm); in ceph_get_snapid_map()
1094 INIT_LIST_HEAD(&sm->lru); in ceph_get_snapid_map()
1095 atomic_set(&sm->ref, 1); in ceph_get_snapid_map()
1096 sm->snap = snap; in ceph_get_snapid_map()
1117 rb_link_node(&sm->node, parent, p); in ceph_get_snapid_map()
1118 rb_insert_color(&sm->node, &mdsc->snapid_map_tree); in ceph_get_snapid_map()
[all …]
/fs/ocfs2/
Dslot_map.c94 struct ocfs2_slot_map *sm; in ocfs2_update_slot_info_old() local
96 sm = (struct ocfs2_slot_map *)si->si_bh[0]->b_data; in ocfs2_update_slot_info_old()
99 if (le16_to_cpu(sm->sm_slots[i]) == (u16)OCFS2_INVALID_SLOT) in ocfs2_update_slot_info_old()
102 ocfs2_set_slot(si, i, le16_to_cpu(sm->sm_slots[i])); in ocfs2_update_slot_info_old()
172 struct ocfs2_slot_map *sm; in ocfs2_update_disk_slot_old() local
174 sm = (struct ocfs2_slot_map *)si->si_bh[0]->b_data; in ocfs2_update_disk_slot_old()
177 sm->sm_slots[i] = in ocfs2_update_disk_slot_old()
180 sm->sm_slots[i] = cpu_to_le16(OCFS2_INVALID_SLOT); in ocfs2_update_disk_slot_old()
/fs/jffs2/
Dscan.c486 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()
Dsummary.c679 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/
Dgc.c707 struct sit_info *sm = SIT_I(sbi); in get_victim_by_default() local
767 last_victim = sm->last_victim[p.gc_mode]; in get_victim_by_default()
784 if (sm->last_victim[p.gc_mode]) { in get_victim_by_default()
786 sm->last_victim[p.gc_mode]; in get_victim_by_default()
787 sm->last_victim[p.gc_mode] = 0; in get_victim_by_default()
803 if (test_bit(segno, sm->invalid_segmap)) in get_victim_by_default()
851 if (!sm->last_victim[p.gc_mode] && segno <= last_victim) in get_victim_by_default()
852 sm->last_victim[p.gc_mode] = in get_victim_by_default()
855 sm->last_victim[p.gc_mode] = segno + p.ofs_unit; in get_victim_by_default()
856 sm->last_victim[p.gc_mode] %= in get_victim_by_default()
[all …]

12