Re: [PATCH v15 09/17] iomap: Use folio offsets instead of page offsets

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

 



On Tue, Jul 20, 2021 at 08:59:45AM +0200, Christoph Hellwig wrote:
> > +	size_t poff = offset_in_folio(folio, *pos);
> > +	size_t plen = min_t(loff_t, folio_size(folio) - poff, length);
> 
> These variables are a little misnamed now.  But I'm not sure what a
> better name would be.

Yes, foff and flen would be ambiguous -- is f folio or file?  I tend
to prefer 'offset' and 'length', but we already have a loff_t length
and having both a len and a length isn't conducive to understanding.
Maybe rename loff_t length to extent_len?

I'm going to leave it for now unless we have a really good suggestion.

> > +		size_t off = (page - &folio->page) * PAGE_SIZE +
> > +				bvec->bv_offset;
> 
> Another use case for the helper I suggested earlier.

Deleted in the very next patch, alas.



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

  Powered by Linux