Re: [PATCH 22/39] xfs:_introduce xlog_write_partial()

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

 



On Thu, May 27, 2021 at 11:06:59AM -0700, Darrick J. Wong wrote:
> On Wed, May 19, 2021 at 10:13:00PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > Handle writing of a logvec chain into an iclog that doesn't have
> > enough space to fit it all. The iclog has already been changed to
> > WANT_SYNC by xlog_get_iclog_space(), so the entire remaining space
> > in the iclog is exclusively owned by this logvec chain.
> > 
> > The difference between the single and partial cases is that
> > we end up with partial iovec writes in the iclog and have to split
> > a log vec regions across two iclogs. The state handling for this is
> > currently awful and so we're building up the pieces needed to
> > handle this more cleanly one at a time.
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Egad this diff is hard to read.  Brian's right, the patience diff is
> easier to understand and shorter to boot.
> 
> That said, I actually understand what the new code does now, so:
> 
> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Thx!

> Might be nice to hoist:
> 
> 	memcpy(ptr, reg->i_addr + reg_offset, rlen);
> 	xlog_write_adv_cnt(&ptr, len, log_offset, rlen);
> 	(*record_cnt)++;
> 	*data_cnt += rlen;
> 
> into a helper but it's only four lines so I'm not gonna fuss any
> further.

Agreed, there are opportunities for further factoring and
simplification of this code, but I'll leave that for another
patchset rather than risking destabilisation at this late point.

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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