Re: [PATCH v2 2/7] iomap: factor out iomap length helper

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

 



On Mon, Jan 27, 2025 at 09:26:15PM -0800, Christoph Hellwig wrote:
> > +static inline u64 iomap_length_trim(const struct iomap_iter *iter, loff_t pos,
> > +		u64 len)
> > +{
> > +	u64 end = iter->iomap.offset + iter->iomap.length;
> > +
> > +	if (iter->srcmap.type != IOMAP_HOLE)
> > +		end = min(end, iter->srcmap.offset + iter->srcmap.length);
> > +	return min(len, end - pos);
> 
> Does this helper warrant a kerneldoc comment similar to iomap_length?
> 

Can't hurt I suppose. I'll add one.

> Otherwise looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 

Thanks.

Brian





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux