linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs-progs: Use already defined BTRFS_BLOCK_GROUP_PROFILE_MASK
@ 2017-07-27  8:16 Nikolay Borisov
  2017-07-27  8:17 ` [PATCH 2/2] btrfs-progs: Use named constants for common sizes Nikolay Borisov
  0 siblings, 1 reply; 5+ messages in thread
From: Nikolay Borisov @ 2017-07-27  8:16 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-22 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27  8:16 [PATCH 1/2] btrfs-progs: Use already defined BTRFS_BLOCK_GROUP_PROFILE_MASK Nikolay Borisov
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

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).