linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-block@vger.kernel.org,
	gfs2@lists.linux.dev
Subject: Re: [PATCH 3/6] iomap: refactor the writeback interface
Date: Tue, 17 Jun 2025 06:42:15 +0200	[thread overview]
Message-ID: <20250617044215.GA1824@lst.de> (raw)
In-Reply-To: <CAJnrk1bFxRj=CF7g0YswktsPS=2oSBuHX6T3cyvTRRJjuAFyfw@mail.gmail.com>

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.


  reply	other threads:[~2025-06-17  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 12:59 refactor the iomap writeback code Christoph Hellwig
2025-06-16 12:59 ` [PATCH 1/6] iomap: pass more arguments using struct iomap_writepage_ctx Christoph Hellwig
2025-06-16 12:59 ` [PATCH 2/6] iomap: cleanup the pending writeback tracking in iomap_writepage_map_blocks Christoph Hellwig
2025-06-16 12:59 ` [PATCH 3/6] iomap: refactor the writeback interface Christoph Hellwig
2025-06-16 22:41   ` Joanne Koong
2025-06-17  4:42     ` Christoph Hellwig [this message]
2025-06-16 12:59 ` [PATCH 4/6] iomap: hide ioends from the generic writeback code Christoph Hellwig
2025-06-16 12:59 ` [PATCH 5/6] iomap: add public helpers for uptodate state manipulation Christoph Hellwig
2025-06-16 12:59 ` [PATCH 6/6] iomap: move all ioend handling to ioend.c Christoph Hellwig
2025-06-16 14:56   ` Johannes Thumshirn
2025-06-16 20:52   ` Joanne Koong
2025-06-17  4:44     ` Christoph Hellwig
2025-06-17 19:32       ` Joanne Koong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250617044215.GA1824@lst.de \
    --to=hch@lst.de \
    --cc=brauner@kernel.org \
    --cc=djwong@kernel.org \
    --cc=gfs2@lists.linux.dev \
    --cc=joannelkoong@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).