Re: [PATCH 32/37] xfs: online repair of the realtime rmap btree

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

 



> Repair the realtime rmap btree while mounted.

And actual description of how this repair works, and the changes to the
non-repair code required for it would be kinda useful.

>  xchk_setup_rt(
>  	struct xfs_scrub	*sc)
>  {
> -	return xchk_trans_alloc(sc, 0);
> +	uint			resblks;
> +
> +	resblks = xrep_calc_rtgroup_resblks(sc);
> +	return xchk_trans_alloc(sc, resblks);

This would be a tad cleaner without the local variable.

> +
> +	if (!(sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR))
> +		return 0;
> +
> +	rtg = xfs_rtgroup_get(mp, sm->sm_agno);
> +	usedlen = rtg->rtg_extents * mp->m_sb.sb_rextsize;
> +	xfs_rtgroup_put(rtg);

Couldn't this use xfs_rtgroup_extents to avoid the rtg lookup?
If not it should probable use rtg_blocks().

> +	struct xfs_scrub	*sc,
> +	int64_t			new_blocks)
> +{
> +	int64_t			delta;
> +
> +	delta = new_blocks - sc->ip->i_nblocks;

	int64_6			delta = new_blocks - sc->ip->i_nblocks;

?





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux