|
|
Subscribe / Log in / New account

simplify extent_buffer reading and writing v2

From:  Christoph Hellwig <hch-AT-lst.de>
To:  Chris Mason <clm-AT-fb.com>, Josef Bacik <josef-AT-toxicpanda.com>, David Sterba <dsterba-AT-suse.com>
Subject:  simplify extent_buffer reading and writing v2
Date:  Tue, 14 Mar 2023 07:16:34 +0100
Message-ID:  <20230314061655.245340-1-hch@lst.de>
Cc:  linux-btrfs-AT-vger.kernel.org
Archive-link:  Article

Hi all,

currently reading and writing of extent_buffers is very complicated as it
tries to work in a page oriented way.  Switch as much as possible to work
based on the extent_buffer object to simplify the code.

I suspect in the long run switching to dedicated object based writeback
and reclaim similar to the XFS buffer cache would be a good idea, but as
that involves pretty big behavior changes that's better left for a
separate series.

Changes since v1:
 - fix a pre-existing bug clearing the uptodate bit for subpage eb
   write errors
 - clean up extent_buffer_write_end_io a bit more

Diffstat:
 compression.c |    4 
 compression.h |    2 
 disk-io.c     |  276 +++-----------------------
 disk-io.h     |    5 
 extent_io.c   |  605 ++++++++++++++--------------------------------------------
 extent_io.h   |    3 
 6 files changed, 197 insertions(+), 698 deletions(-)


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds