Re: [PATCH 1/2] iomap: Add iomap_iter API

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

 



On Wed, Apr 01, 2020 at 12:20:38PM -0700, Matthew Wilcox wrote:
> On Wed, Apr 01, 2020 at 08:42:48AM -0700, Christoph Hellwig wrote:
> > OTOH the len argument / return value seems like something that would
> > seems useful in the iter structure.  That would require renaming the
> > current len to something like total_len..
> 
> Ah, I remembered why I didn't do it that way.  For more complicated
> users (eg readahead ...), we want to be able to pass an errno here.
> Then iomap_iter() will call ops->iomap_end() and return the errno
> you passed in, and we can terminate the loop.

Once we have the iter struct we can and should separate the written
counter from the errno, as that is a much cleaner interface.  The prime
reason I avoided that earlier was to keep the number of arguments down,
and even that was a bad reason in retrospective.



[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