projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab59381
)
Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk()
author
Zhao Lei
<
[email protected]
>
Thu, 25 Mar 2010 12:32:59 +0000
(12:32 +0000)
committer
Chris Mason
<
[email protected]
>
Wed, 31 Mar 2010 01:19:09 +0000
(21:19 -0400)
We can use this simple method to make source more readable.
Signed-off-by: Zhao Lei <
[email protected]
>
Signed-off-by: Miao Xie <
[email protected]
>
Signed-off-by: Chris Mason <
[email protected]
>
fs/btrfs/volumes.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index c6c80093eac00d6ae57a84a220c97f42f0a85c23..bf3bec3e4130e045a68b6e45ce1f1a30e1093713 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-2198,9
+2198,9
@@
static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
min_stripes = 2;
}
if (type & (BTRFS_BLOCK_GROUP_RAID1)) {
- num_stripes = min_t(u64, 2, fs_devices->rw_devices);
- if (num_stripes < 2)
+ if (fs_devices->rw_devices < 2)
return -ENOSPC;
+ num_stripes = 2;
min_stripes = 2;
}
if (type & (BTRFS_BLOCK_GROUP_RAID10)) {