Re: [PATCH V6 08/11] xfs: Check for extent overflow when remapping an extent

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

 



On Fri, Oct 16, 2020 at 04:58:53PM +0530, Chandan Babu R wrote:
> On Friday 16 October 2020 12:34:48 PM IST Christoph Hellwig wrote:
> > On Thu, Oct 15, 2020 at 03:31:26PM +0530, Chandan Babu R wrote:
> > > How about following the traits of XFS_IEXT_WRITE_UNWRITTEN_CNT (writing
> > > to unwritten extent) and XFS_IEXT_REFLINK_END_COW_CNT (moving an extent
> > > from cow fork to data fork) and setting XFS_IEXT_REFLINK_REMAP_CNT to a
> > > worst case value of 2? A write spanning the entirety of an unwritten extent
> > > does not change the extent count. Similarly, If there are no extents in the
> > > data fork spanning the file range mapped by an extent in the cow
> > > fork, moving the extent from cow fork to data fork increases the extent count
> > > by just 1 and not by the worst case count of 2.
> > 
> > No, I think the dynamic value is perfectly fine, as we have all the
> > information trivially available.  I just don't think having a separate
> > macro and the comment explaining it away from the actual functionality
> > is helpful.
> > 
> 
> Darrick, I think using the macros approach is more suitable. But I can go
> ahead and implement the approach decided by the community. Please let me know
> your opinion.

The macro only gets used in one place anyway, so I don't see as strong a
need for it as the other places.  I think this one could be open-coded
next to the places where we decide the values of smap_real and
dmap_written.  (i.e. what Christoph is suggesting)

--D

> -- 
> chandan
> 
> 
> 



[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