Re: [PATCH 21/30] db: verify and calculate dquot CRCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 30, 2013 at 03:31:12PM +1100, Dave Chinner wrote:
> 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@xxxxxxxxxx>
> ---
>  db/io.c | 5 ++++-
>  db/io.h | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/db/io.c b/db/io.c
> index 8ddb5e5..7281148 100644
> --- a/db/io.c
> +++ b/db/io.c
> @@ -464,7 +464,9 @@ write_cur(void)
>  
>  	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);

The patch looks good to get going, but it seems we'd be better off going
through an ops vector here in some form..

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux