[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200320140538.GA27895@infradead.org>
Date: Fri, 20 Mar 2020 07:05:38 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Goldwyn Rodrigues <rgoldwyn@...e.de>
Cc: linux-fsdevel@...r.kernel.org, riteshh@...ux.ibm.com,
linux-ext4@...r.kernel.org, hch@...radead.org,
darrick.wong@...cle.com, willy@...radead.org,
linux-btrfs@...r.kernel.org, Josef Bacik <josef@...icpanda.com>
Subject: Re: [PATCH v2] iomap: return partial I/O count on error in
iomap_dio_bio_actor
I spent a fair amount of time looking over this change, and I am
starting to feel very bad about it. iomap_apply() has pretty clear
semantics of either return an error, or return the bytes processed,
and in general these semantics work just fine.
The thing that breaks this concept is the btrfs submit_bio hook,
which allows the file system to keep state for each bio actually
submitted. But I think you can simply keep the length internally
in btrfs - use the space in iomap->private as a counter of how
much was allocated, pass the iomap to the submit_io hook, and
update it there, and then deal with the rest in ->iomap_end.
That assumes ->iomap_end actually is the right place - can someone
explain what the expected call site for __endio_write_update_ordered
is? It kinda sorta looks to me like something that would want to
be called after I/O completion, not after I/O submission, but maybe
I misunderstand the code.
Powered by blists - more mailing lists