Loading fs/xfs/libxfs/xfs_rtbitmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,15 @@ xfs_rtb_to_rtx( return div_u64(rtbno, mp->m_sb.sb_rextsize); } /* Return the offset of a rtgroup block number within an rt extent. */ static inline xfs_extlen_t xfs_rgbno_to_rtxoff( struct xfs_mount *mp, xfs_rgblock_t rgbno) { return rgbno % mp->m_sb.sb_rextsize; } /* Return the offset of an rt block number within an rt extent. */ static inline xfs_extlen_t xfs_rtb_to_rtxoff( Loading fs/xfs/scrub/common.h +6 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,12 @@ int xchk_metadata_inode_forks(struct xfs_scrub *sc); (sc)->mp->m_super->s_id, \ (sc)->ip ? (sc)->ip->i_ino : (sc)->sm->sm_ino, \ ##__VA_ARGS__) #define xchk_xfile_rtgroup_descr(sc, fmt, ...) \ kasprintf(XCHK_GFP_FLAGS, "XFS (%s): rtgroup 0x%x " fmt, \ (sc)->mp->m_super->s_id, \ (sc)->sa.pag ? \ rtg_rgno((sc)->sr.rtg) : (sc)->sm->sm_agno, \ ##__VA_ARGS__) /* * Setting up a hook to wait for intents to drain is costly -- we have to take Loading fs/xfs/scrub/repair.c +1 −1 Original line number Diff line number Diff line Loading @@ -959,7 +959,7 @@ xrep_ag_init( #ifdef CONFIG_XFS_RT /* Initialize all the btree cursors for a RT repair. */ static void void xrep_rtgroup_btcur_init( struct xfs_scrub *sc, struct xchk_rt *sr) Loading fs/xfs/scrub/repair.h +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ int xrep_ag_init(struct xfs_scrub *sc, struct xfs_perag *pag, #ifdef CONFIG_XFS_RT int xrep_rtgroup_init(struct xfs_scrub *sc, struct xfs_rtgroup *rtg, struct xchk_rt *sr, unsigned int rtglock_flags); void xrep_rtgroup_btcur_init(struct xfs_scrub *sc, struct xchk_rt *sr); int xrep_require_rtext_inuse(struct xfs_scrub *sc, xfs_rgblock_t rgbno, xfs_filblks_t len); #else Loading fs/xfs/scrub/rtbitmap.c +4 −1 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ #include "xfs_sb.h" #include "xfs_rmap.h" #include "xfs_rtrmap_btree.h" #include "xfs_exchmaps.h" #include "scrub/scrub.h" #include "scrub/common.h" #include "scrub/repair.h" #include "scrub/tempexch.h" #include "scrub/rtbitmap.h" #include "scrub/btree.h" Loading @@ -38,7 +40,8 @@ xchk_setup_rtbitmap( if (xchk_need_intent_drain(sc)) xchk_fsgates_enable(sc, XCHK_FSGATES_DRAIN); rtb = kzalloc(sizeof(struct xchk_rtbitmap), XCHK_GFP_FLAGS); rtb = kzalloc(struct_size(rtb, words, xchk_rtbitmap_wordcnt(sc)), XCHK_GFP_FLAGS); if (!rtb) return -ENOMEM; sc->buf = rtb; Loading Loading
fs/xfs/libxfs/xfs_rtbitmap.h +9 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,15 @@ xfs_rtb_to_rtx( return div_u64(rtbno, mp->m_sb.sb_rextsize); } /* Return the offset of a rtgroup block number within an rt extent. */ static inline xfs_extlen_t xfs_rgbno_to_rtxoff( struct xfs_mount *mp, xfs_rgblock_t rgbno) { return rgbno % mp->m_sb.sb_rextsize; } /* Return the offset of an rt block number within an rt extent. */ static inline xfs_extlen_t xfs_rtb_to_rtxoff( Loading
fs/xfs/scrub/common.h +6 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,12 @@ int xchk_metadata_inode_forks(struct xfs_scrub *sc); (sc)->mp->m_super->s_id, \ (sc)->ip ? (sc)->ip->i_ino : (sc)->sm->sm_ino, \ ##__VA_ARGS__) #define xchk_xfile_rtgroup_descr(sc, fmt, ...) \ kasprintf(XCHK_GFP_FLAGS, "XFS (%s): rtgroup 0x%x " fmt, \ (sc)->mp->m_super->s_id, \ (sc)->sa.pag ? \ rtg_rgno((sc)->sr.rtg) : (sc)->sm->sm_agno, \ ##__VA_ARGS__) /* * Setting up a hook to wait for intents to drain is costly -- we have to take Loading
fs/xfs/scrub/repair.c +1 −1 Original line number Diff line number Diff line Loading @@ -959,7 +959,7 @@ xrep_ag_init( #ifdef CONFIG_XFS_RT /* Initialize all the btree cursors for a RT repair. */ static void void xrep_rtgroup_btcur_init( struct xfs_scrub *sc, struct xchk_rt *sr) Loading
fs/xfs/scrub/repair.h +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ int xrep_ag_init(struct xfs_scrub *sc, struct xfs_perag *pag, #ifdef CONFIG_XFS_RT int xrep_rtgroup_init(struct xfs_scrub *sc, struct xfs_rtgroup *rtg, struct xchk_rt *sr, unsigned int rtglock_flags); void xrep_rtgroup_btcur_init(struct xfs_scrub *sc, struct xchk_rt *sr); int xrep_require_rtext_inuse(struct xfs_scrub *sc, xfs_rgblock_t rgbno, xfs_filblks_t len); #else Loading
fs/xfs/scrub/rtbitmap.c +4 −1 Original line number Diff line number Diff line Loading @@ -20,9 +20,11 @@ #include "xfs_sb.h" #include "xfs_rmap.h" #include "xfs_rtrmap_btree.h" #include "xfs_exchmaps.h" #include "scrub/scrub.h" #include "scrub/common.h" #include "scrub/repair.h" #include "scrub/tempexch.h" #include "scrub/rtbitmap.h" #include "scrub/btree.h" Loading @@ -38,7 +40,8 @@ xchk_setup_rtbitmap( if (xchk_need_intent_drain(sc)) xchk_fsgates_enable(sc, XCHK_FSGATES_DRAIN); rtb = kzalloc(sizeof(struct xchk_rtbitmap), XCHK_GFP_FLAGS); rtb = kzalloc(struct_size(rtb, words, xchk_rtbitmap_wordcnt(sc)), XCHK_GFP_FLAGS); if (!rtb) return -ENOMEM; sc->buf = rtb; Loading