Re: [RFCv3 2/3] iomap: Change uptodate variable name to state

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

 



Matthew Wilcox <willy@xxxxxxxxxxxxx> writes:

> On Mon, Feb 27, 2023 at 01:13:31AM +0530, Ritesh Harjani (IBM) wrote:
>> +static inline bool iop_test_uptodate(struct iomap_page *iop, unsigned int pos,
>> +				unsigned int nrblocks)
>> +{
>> +	return test_bit(pos, iop->state);
>> +}
>
> 'pos' is usually position within file, not within the folio.  That
> should be called 'block' or 'start' like the other accessors.

Agreed. Will make the change in next rev.

>
>> +static inline bool iop_full_uptodate(struct iomap_page *iop,
>> +				unsigned int nrblocks)
>> +{
>> +	return bitmap_full(iop->state, nrblocks);
>> +}
>
> Not sure I like iop_full_uptodate() as a name.  iop_entirely_uptodate()?
> iop_folio_uptodate()?  iop_all_uptodate()?

I can settle for iop_all_uptodate(). But would you rather prefer
iop_uptodate_full() like bitmap_full()?

-ritesh



[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