From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 1/6] btrfs: switch btrfs_trans_handle::adding_csums to bool
Date: Wed, 15 Nov 2017 18:41:54 +0100 [thread overview]
Message-ID: <bac1a66da076f7af878c9e83641da93d4d2dd80f.1510767175.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1510767175.git.dsterba@suse.com>
The semantics of adding_csums matches bool, 'short' was most likely used
to save space in a698d0755adb6f2 ("Btrfs: add a type field for the
transaction handle").
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/inode.c | 4 ++--
fs/btrfs/transaction.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f352662e066f..3a32e782ccc4 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2036,10 +2036,10 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
struct btrfs_ordered_sum *sum;
list_for_each_entry(sum, list, list) {
- trans->adding_csums = 1;
+ trans->adding_csums = true;
btrfs_csum_file_blocks(trans,
BTRFS_I(inode)->root->fs_info->csum_root, sum);
- trans->adding_csums = 0;
+ trans->adding_csums = false;
}
return 0;
}
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index c55e44560103..a673142c003e 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -118,7 +118,7 @@ struct btrfs_trans_handle {
struct btrfs_block_rsv *block_rsv;
struct btrfs_block_rsv *orig_rsv;
short aborted;
- short adding_csums;
+ bool adding_csums;
bool allocating_chunk;
bool can_flush_pending_bgs;
bool reloc_reserved;
--
2.14.3
next prev parent reply other threads:[~2017-11-15 17:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 17:41 [PATCH 0/6] Shrink some data structures David Sterba
2017-11-15 17:41 ` David Sterba [this message]
2017-11-15 17:41 ` [PATCH 2/6] btrfs: remove unused member of btrfs_trans_handle David Sterba
2017-11-15 17:41 ` [PATCH 3/6] btrfs: switch to refcount_t type for btrfs_trans_handle::use_count David Sterba
2017-11-15 17:42 ` [PATCH 4/6] btrfs: reoder btrfs_trans_handle members for better packing David Sterba
2017-11-15 17:42 ` [PATCH 5/6] btrfs: use narrower type for btrfs_transaction::num_dirty_bgs David Sterba
2017-11-15 17:42 ` [PATCH 6/6] btrfs: reoder btrfs_transaction members for better packing David Sterba
2017-11-16 23:29 ` Liu Bo
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=bac1a66da076f7af878c9e83641da93d4d2dd80f.1510767175.git.dsterba@suse.com \
--to=dsterba@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.