Re: [PATCH 3/6] iomap: refactor the writeback interface

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

 



On Mon, Jun 16, 2025 at 03:41:12PM -0700, Joanne Koong wrote:
> I'm not acquainted with the block io / bio layer so please do ignore
> this if my analysis here is wrong, but AFAICT we do still need to add
> this range to the ioend in the case where the mapping is already
> valid? Should this be "return iomap_add_to_ioend(wpc, folio, offset,
> end_pos, len)" instead of return 0?

Yes, absolutely.  That's what the XFS code does, which is the only thing
I tested at this point.  All the other conversion look pretty broken
right now, and I'm glad you spotted this before I'd run into when testing.

> > -       } while (dirty_len && !error);
> > +               ret = wpc->ops->writeback_range(wpc, folio, pos, rlen, end_pos);
> > +               if (WARN_ON_ONCE(ret == 0))
> > +                       return -EIO;
> > +               if (ret < 0)
> > +                       return ret;
> 
> Should we also add a warn check here for if ret > rlen?

Yes, that's a good idea.





[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