xfs_db: enable blocktrash for checksummed filesystems
RFC 2/2 xfs_db: enable blocktrash for checksummed filesystems
Disable the write verifiers when we're trashing a block.
Signed-off-by Darrick J. Wong <[email protected]>
--- db/check.c | 4 + db/xfsfuzz.sh | 303 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 307 insertions(+) create mode 100755 db/xfsfuzz.sh
db/check.c +4 -0
@@ -949,6 +949,7 @@ blocktrash_b(int mask;int newbit;int offset; +const struct xfs_buf_ops *stashed_ops;static char *modestr[] = {N_ ("zeroed" ),N_ ("set" ),N_ ("flipped" ),N_ ("randomized" ) };
@@ -959,6 +960,8 @@ blocktrash_b(push_cur ();set_cur (&typtab[DBM_UNKNOWN ],XFS_AGB_TO_DADDR (mp, agno, agbno), blkbb,DB_RING_IGN ,NULL ); + stashed_ops = iocur_top->bp->b_ops; + iocur_top->bp->b_ops =NULL ;if ((buf = iocur_top->data) ==NULL ) {dbprintf (_ ("can't read block %u/%u for trashing\n" ), agno, agbno);pop_cur ();
@@ -989,6 +992,7 @@ blocktrash_b( buf[byte] &= ~mask; }write_cur (); + iocur_top->bp->b_ops = stashed_ops;pop_cur (); printf(_("blocktrash: %u/%u %s block %d bit%s starting %d:%d %s\n"), agno, agbno, typename[type], len, len == 1 ? "" : "s",
db/xfsfuzz.sh new file +303 -0
303 lines not on this page · raw message
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs