From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 1/2] btrfs-progs: Use already defined BTRFS_BLOCK_GROUP_PROFILE_MASK
Date: Thu, 27 Jul 2017 11:16:59 +0300 [thread overview]
Message-ID: <1501143420-28062-1-git-send-email-nborisov@suse.com> (raw)
Instead of opencoding it. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
volumes.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/volumes.c b/volumes.c
index b350e259dded..e60dc0e0dd93 100644
--- a/volumes.c
+++ b/volumes.c
@@ -869,10 +869,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
return -ENOSPC;
}
- if (type & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 |
- BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 |
- BTRFS_BLOCK_GROUP_RAID10 |
- BTRFS_BLOCK_GROUP_DUP)) {
+ if (type & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
calc_size = SZ_8M;
max_chunk_size = calc_size * 2;
--
2.7.4
next reply other threads:[~2017-07-27 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 8:16 Nikolay Borisov [this message]
2017-07-27 8:17 ` [PATCH 2/2] btrfs-progs: Use named constants for common sizes Nikolay Borisov
2017-07-27 21:02 ` Duncan
2017-08-22 14:31 ` David Sterba
2017-08-22 14:31 ` David Sterba
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=1501143420-28062-1-git-send-email-nborisov@suse.com \
--to=nborisov@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 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).