public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH 07/12] btrfs: rename the this_bio_flag variable in btrfs_do_readpage
Date: Thu, 16 Feb 2023 17:34:32 +0100	[thread overview]
Message-ID: <20230216163437.2370948-8-hch@lst.de> (raw)
In-Reply-To: <20230216163437.2370948-1-hch@lst.de>

Rename this_bio_flag to compress_type to match the surrounding code
and better document the intent.  Also use the proper enum type instead
of unsigned long.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/btrfs/extent_io.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4fe128d2895f88..24a1e988dd0fab 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1213,7 +1213,7 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
 	bio_ctrl->end_io_func = end_bio_extent_readpage;
 	begin_page_read(fs_info, page);
 	while (cur <= end) {
-		unsigned long this_bio_flag = 0;
+		enum btrfs_compression_type compress_type = BTRFS_COMPRESS_NONE;
 		bool force_bio_submit = false;
 		u64 disk_bytenr;
 
@@ -1238,11 +1238,11 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
 		BUG_ON(end < cur);
 
 		if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
-			this_bio_flag = em->compress_type;
+			compress_type = em->compress_type;
 
 		iosize = min(extent_map_end(em) - cur, end - cur + 1);
 		iosize = ALIGN(iosize, blocksize);
-		if (this_bio_flag != BTRFS_COMPRESS_NONE)
+		if (compress_type != BTRFS_COMPRESS_NONE)
 			disk_bytenr = em->block_start;
 		else
 			disk_bytenr = em->block_start + extent_offset;
@@ -1314,13 +1314,13 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
 			continue;
 		}
 
-		if (bio_ctrl->compress_type != this_bio_flag)
+		if (bio_ctrl->compress_type != compress_type)
 			submit_one_bio(bio_ctrl);
 	
 		if (force_bio_submit)
 			submit_one_bio(bio_ctrl);
 		ret = submit_extent_page(bio_ctrl, disk_bytenr, page, iosize,
-					 pg_offset, this_bio_flag);
+					 pg_offset, compress_type);
 		if (ret) {
 			/*
 			 * We have to unlock the remaining range, or the page
-- 
2.39.1


  parent reply	other threads:[~2023-02-16 16:35 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:34 cleanup submit_extent_page and friends Christoph Hellwig
2023-02-16 16:34 ` [PATCH 01/12] btrfs: remove the force_bio_submit to submit_extent_page Christoph Hellwig
2023-02-20  9:43   ` Johannes Thumshirn
2023-02-21 11:15   ` Qu Wenruo
2023-02-16 16:34 ` [PATCH 02/12] btrfs: remove a bogus submit_one_bio call in read_extent_buffer_subpage Christoph Hellwig
2023-02-20  9:45   ` Johannes Thumshirn
2023-02-21 11:14   ` Qu Wenruo
2023-02-21 14:31     ` Christoph Hellwig
2023-02-16 16:34 ` [PATCH 03/12] btrfs: store the bio opf in struct btrfs_bio_ctrl Christoph Hellwig
2023-02-20  9:52   ` Johannes Thumshirn
2023-02-21 11:17   ` Qu Wenruo
2023-02-16 16:34 ` [PATCH 04/12] btrfs: remove the sync_io flag " Christoph Hellwig
2023-02-20  9:54   ` Johannes Thumshirn
2023-02-16 16:34 ` [PATCH 05/12] btrfs: add a wbc pointer to " Christoph Hellwig
2023-02-20  9:59   ` Johannes Thumshirn
2023-02-21 11:18   ` Qu Wenruo
2023-02-21 14:31     ` Christoph Hellwig
2023-02-16 16:34 ` [PATCH 06/12] btrfs: move the compress_type check out of btrfs_bio_add_page Christoph Hellwig
2023-02-17 12:04   ` Johannes Thumshirn
2023-02-16 16:34 ` Christoph Hellwig [this message]
2023-02-20 11:39   ` [PATCH 07/12] btrfs: rename the this_bio_flag variable in btrfs_do_readpage Johannes Thumshirn
2023-02-21 11:21   ` Qu Wenruo
2023-02-16 16:34 ` [PATCH 08/12] btrfs: remove the compress_type argument to submit_extent_page Christoph Hellwig
2023-02-20 11:58   ` Johannes Thumshirn
2023-02-21 11:32   ` Qu Wenruo
2023-02-21 14:34     ` Christoph Hellwig
2023-02-16 16:34 ` [PATCH 09/12] btrfs: remove the submit_extent_page return value Christoph Hellwig
2023-02-20 12:12   ` Johannes Thumshirn
2023-02-16 16:34 ` [PATCH 10/12] btrfs: simplify the error handling in __extent_writepage_io Christoph Hellwig
2023-02-20 12:16   ` Johannes Thumshirn
2023-02-16 16:34 ` [PATCH 11/12] btrfs: check for contiguity in submit_extent_page Christoph Hellwig
2023-02-21 13:03   ` Johannes Thumshirn
2023-02-16 16:34 ` [PATCH 12/12] btrfs: simplify submit_extent_page Christoph Hellwig
2023-02-21 13:14   ` Johannes Thumshirn
2023-02-21 14:34     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-02-27 15:16 cleanup submit_extent_page and friends v2 Christoph Hellwig
2023-02-27 15:16 ` [PATCH 07/12] btrfs: rename the this_bio_flag variable in btrfs_do_readpage Christoph Hellwig

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=20230216163437.2370948-8-hch@lst.de \
    --to=hch@lst.de \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@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