Displaying 18 results from an estimated 18 matches for "btrfs_block_group_system".
2011 Jan 05
1
[PATCH V3 1/6] btrfs: fix wrong data space statistics
...dex 61bd79a..1d21208 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -768,11 +768,10 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
rcu_read_lock();
list_for_each_entry_rcu(found, head, list) {
- if (found->flags & (BTRFS_BLOCK_GROUP_METADATA |
- BTRFS_BLOCK_GROUP_SYSTEM))
- total_used_data += found->disk_total;
- else
+ if (found->flags & BTRFS_BLOCK_GROUP_DATA)
total_used_data += found->disk_used;
+ else
+ total_used_data += found->disk_total;
total_used += found->disk_used;
}
rcu_read_unlock();
--
1.7.2.3
--
To unsubscribe f...
2013 Jun 08
0
[PATCH] Btrfs-progs: elaborate error handling of mkfs
...c | 23 +++++++++++++++--------
volumes.c | 16 +++++++++++-----
2 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 7ff60e5..e3789cc 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -74,31 +74,36 @@ static int make_root_dir(struct btrfs_root *root, int mixed)
BTRFS_BLOCK_GROUP_SYSTEM,
BTRFS_FIRST_CHUNK_TREE_OBJECTID,
0, BTRFS_MKFS_SYSTEM_GROUP_SIZE);
- BUG_ON(ret);
+ if (ret)
+ goto err;
if (mixed) {
ret = btrfs_alloc_chunk(trans, root->fs_info->extent_root,
&chunk_start, &chunk_size,
BTRFS_BLOCK_GROUP_METADATA |
BTRFS...
2009 Aug 05
3
RAID[56] with arbitrary numbers of "parity" stripes.
...TRFS_BLOCK_GROUP_RAID10 |
BTRFS_BLOCK_GROUP_DUP);
if (extra_flags) {
if (flags & BTRFS_BLOCK_GROUP_DATA)
- fs_info->avail_data_alloc_bits |= extra_flags;
- if (flags & BTRFS_BLOCK_GROUP_METADATA)
- fs_info->avail_metadata_alloc_bits |= extra_flags;
- if (flags & BTRFS_BLOCK_GROUP_SYSTEM)
- fs_info->avail_system_alloc_bits |= extra_flags;
+ avail = &fs_info->avail_data_alloc_bits;
+ else if (flags & BTRFS_BLOCK_GROUP_METADATA)
+ avail = &fs_info->avail_metadata_alloc_bits;
+ else if (flags & BTRFS_BLOCK_GROUP_SYSTEM)
+ avail = &fs_info->ava...
2010 Dec 22
0
[PATCH 1/6] btrfs: fix wrong data space statistics
...dex 61bd79a..1d21208 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -768,11 +768,10 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
rcu_read_lock();
list_for_each_entry_rcu(found, head, list) {
- if (found->flags & (BTRFS_BLOCK_GROUP_METADATA |
- BTRFS_BLOCK_GROUP_SYSTEM))
- total_used_data += found->disk_total;
- else
+ if (found->flags & BTRFS_BLOCK_GROUP_DATA)
total_used_data += found->disk_used;
+ else
+ total_used_data += found->disk_total;
total_used += found->disk_used;
}
rcu_read_unlock();
--
1.7.0.1
--
To unsubscribe f...
2010 Dec 29
0
[PATCH V2 1/6] btrfs: fix wrong data space statistics
...dex 61bd79a..1d21208 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -768,11 +768,10 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
rcu_read_lock();
list_for_each_entry_rcu(found, head, list) {
- if (found->flags & (BTRFS_BLOCK_GROUP_METADATA |
- BTRFS_BLOCK_GROUP_SYSTEM))
- total_used_data += found->disk_total;
- else
+ if (found->flags & BTRFS_BLOCK_GROUP_DATA)
total_used_data += found->disk_used;
+ else
+ total_used_data += found->disk_total;
total_used += found->disk_used;
}
rcu_read_unlock();
--
1.7.0.1
--
To unsubscribe f...
2012 Mar 15
0
[PATCH] Btrfs: fix deadlock during allocating chunks
...chunk tree */
+ return btrfs_calc_trans_metadata_size(root, num_dev + 1);
+}
+
+static void check_system_chunk(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root, u64 type)
+{
+ struct btrfs_space_info *info;
+ u64 left;
+ u64 thresh;
+
+ info = __find_space_info(root->fs_info, BTRFS_BLOCK_GROUP_SYSTEM);
+ spin_lock(&info->lock);
+ left = info->total_bytes - info->bytes_used - info->bytes_pinned -
+ info->bytes_reserved - info->bytes_readonly;
+ spin_unlock(&info->lock);
+
+ thresh = get_system_chunk_thresh(root, type);
+ if (left < thresh && btrfs_test_op...
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello,
This patch series adds an initial implementation of restriper (it''s a
clever name for relocation framework that allows to do selective profile
changing and selective balancing with some goodies like pausing/resuming
and reporting progress to the user.
Profile changing is global (per-FS) so far, per-subvolume profiles
require some discussion and can be implemented in future.
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates
chunks on the devices in the same order. This leads to a very uneven
distribution, especially with RAID1 or RAID10 and an uneven number of
devices.
This patch always sorts the devices before allocating, and allocates the
stripes on the devices with the most available space, as long as there
is enough space available. In a low
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates
chunks on the devices in the same order. This leads to a very uneven
distribution, especially with RAID1 or RAID10 and an uneven number of
devices.
This patch always sorts the devices before allocating, and allocates the
stripes on the devices with the most available space, as long as there
is enough space available. In a low
2013 Sep 05
3
[PATCH v2 0/3] btrfs-progs: prevent mkfs from aborting with small volume
Here are 3 patches to avoid undesired aborts of mkfs.btrfs.
These are based on top of Chris''s btrfs-progs.git:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
Thanks,
H.Seto
Hidetoshi Seto (3):
btrfs-progs: error if device for mkfs is too small
btrfs-progs: error if device have no space to make primary chunks
btrfs-progs: calculate available
2012 Feb 03
10
[PATCH 0/3] Btrfs-progs: restriper interface
Hello,
This is the userspace part of restriper, rebased onto the new progs
infrastructure. Restriper commands are located under ''balance'' prefix,
which is now the top level command group. However to not confuse
existing users ''balance'' prefix is also available under ''filesystem'':
btrfs [filesystem] balance start
btrfs [filesystem] balance
2012 Oct 04
8
[PATCH][BTRFS-PROGS][V3] btrfs filesystem df
Hi Chris,
this serie of patches updated the command "btrfs filesystem
df". I update this command because it is not so easy to get
the information about the disk usage from the command "fi df" and "fi show".
This patch was the result of some discussions on the btrfs
mailing list. Many thanks to all the contributors.
From the man page (see 2nd patch):
[...]
The
2011 Dec 09
10
[PATCH 0/3] Btrfs: add IO error device stats
The goal is to detect when drives start to get an increased error rate,
when drives should be replaced soon. Therefore statistic counters are
added that count IO errors (read, write and flush). Additionally, the
software detected errors like checksum errors and corrupted blocks are
counted.
An ioctl interface is added to get the device statistic counters.
A second ioctl is added to atomically get
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk
free space cache. Others are small fixes and cleanups.
The last three have been sent weeks ago.
The patchset is also available in this repo:
git://repo.or.cz/linux-btrfs-devel.git for-chris
Note there''s a small confict with Al Viro''s vfs changes.
Li Zefan (11):
Btrfs: add pinned extents to
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ripes[i].dev) {
ret = btrfs_update_device(trans, map->stripes[i].dev);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
}
ret = btrfs_free_chunk(trans, root, chunk_tree, chunk_objectid,
chunk_offset);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
ret = btrfs_del_sys_chunk(root, chunk_objectid, chunk_offset);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
ret = btrfs_remove_block_group(trans, extent_root, chunk_offset);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
write_lock(&em_tree->lock);
remove_extent_mapping(em_...
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2:
- Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged
operation
- Cast u64 to unsigned long long for printf()
Changes v2-v3:
- Rebased on Chris'' current master
Changes v3-v4:
- Add padding at end of ioctl structure
Changes v4-v5:
- The statistic members in the ioctl are now organized as an array of
64 bit values. Symbolic names for the array indexes
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
...ree.c
@@ -3346,7 +3346,8 @@ u64 btrfs_get_alloc_profile(struct btrfs_root *root, int data)
if (data)
flags = BTRFS_BLOCK_GROUP_DATA;
- else if (root == root->fs_info->chunk_root)
+ else if (root == root->fs_info->chunk_root ||
+ root == root->fs_info->dev_root)
flags = BTRFS_BLOCK_GROUP_SYSTEM;
else
flags = BTRFS_BLOCK_GROUP_METADATA;
@@ -3534,7 +3535,8 @@ static u64 get_system_chunk_thresh(struct btrfs_root *root, u64 type)
else
num_dev = 1; /* DUP or single */
- /* metadata for updaing devices and chunk tree */
+ /* metadata for adding/updating devices and chunk tree */
+ n...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi,
The following patches add support for ext4 and btrfs to
PV-GRUB. These patches are taken nearly verbatim from those provided
by Fedora and Gentoo.
We''ve been using these patches for the PV-GRUB images available in EC2
for some time now with no problems.
Changes from v1:
- Makefile has been changed to check the exit code from patch
- The btrfs patch has been rebased to apply