When we set the current Io cursor to point at a dquot block, verify
that the dquot CRC is intact. And prior to writing such an IO
cursor, calculate the dquot CRC.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
if (iocur_top->ino_buf)
libxfs_dinode_calc_crc(mp, iocur_top->data);
-
+ if (iocur_top->dquot_buf)
+ xfs_update_cksum(iocur_top->data, sizeof(struct xfs_dqblk),
+ XFS_DQUOT_CRC_OFF);
if (iocur_top->bbmap)
write_cur_bbs();
else
iocur_top->dirino = dirino;
iocur_top->mode = mode;
iocur_top->ino_buf = 0;
+ iocur_top->dquot_buf = 0;
/* store location in ring */
if (ring_flag)
struct xfs_buf *bp; /* underlying buffer */
int ino_crc_ok:1;
int ino_buf:1;
+ int dquot_buf:1;
} iocur_t;
#define DB_RING_ADD 1 /* add to ring on set_cur */