iocur_top->ino_crc_ok = 1;
}
+void
+xfs_verify_recalc_dquot_crc(
+ struct xfs_buf *bp)
+{
+ ASSERT((iocur_top->dquot_buf));
+ ASSERT(iocur_top->bp == bp);
+
+ xfs_update_cksum(iocur_top->data, sizeof(struct xfs_dqblk),
+ XFS_DQUOT_CRC_OFF);
+}
+
void
xfs_verify_recalc_crc(
struct xfs_buf *bp)
extern void set_iocur_type(const struct typ *t);
extern void xfs_dummy_verify(struct xfs_buf *bp);
extern void xfs_verify_recalc_inode_crc(struct xfs_buf *bp);
+extern void xfs_verify_recalc_dquot_crc(struct xfs_buf *bp);
extern void xfs_verify_recalc_crc(struct xfs_buf *bp);
/*
if (invalid_data &&
iocur_top->typ->crc_off == TYP_F_NO_CRC_OFF &&
- !iocur_top->ino_buf) {
+ !iocur_top->ino_buf &&
+ !iocur_top->dquot_buf) {
dbprintf(_("Cannot recalculate CRCs on this type of object\n"));
return 0;
}
} else if (iocur_top->ino_buf) {
local_ops.verify_write = xfs_verify_recalc_inode_crc;
dbprintf(_("Allowing write of corrupted inode with good CRC\n"));
+ } else if (iocur_top->dquot_buf) {
+ local_ops.verify_write = xfs_verify_recalc_dquot_crc;
+ dbprintf(_("Allowing write of corrupted dquot with good CRC\n"));
} else { /* invalid data */
local_ops.verify_write = xfs_verify_recalc_crc;
dbprintf(_("Allowing write of corrupted data with good CRC\n"));