Displaying 14 results from an estimated 14 matches for "dev_root".
2010 Dec 29
0
[PATCH] btrfs: Require CAP_SYS_ADMIN for filesystem rebalance
...6 +22,7 @@
#include <linux/blkdev.h>
#include <linux/random.h>
#include <linux/iocontext.h>
+#include <linux/capability.h>
#include <asm/div64.h>
#include "compat.h"
#include "ctree.h"
@@ -1905,6 +1906,9 @@ int btrfs_balance(struct btrfs_root *dev_root)
if (dev_root->fs_info->sb->s_flags & MS_RDONLY)
return -EROFS;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
mutex_lock(&dev_root->fs_info->volume_mutex);
dev_root = dev_root->fs_info->dev_root;
--
1.7.2.3
--
To unsubscribe from this list: send the...
2011 Nov 09
6
[PATCH 0/5] Btrfs: mount error handling fixes
A bunch of fixes (memory leaks, NULL pointer dereferences and devices
hanging in busy state) to sanitize error handling during mount sequence.
This is on top of for-linus + slyfox''s double-free fix.
Thanks,
Ilya
Ilya Dryomov (5):
Btrfs: fix memory leak in btrfs_parse_early_options()
Btrfs: fix subvol_name leak on error in btrfs_mount()
Btrfs: avoid null dereference and leaks
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
...eneration(&info->chunk_root->root_item);
+ if (generation != trans->transid) {
+ ret = __btrfs_cow_block(trans, info->chunk_root,
+ info->chunk_root->node, NULL, 0, &tmp, 0, 0);
+ BUG_ON(ret);
+ free_extent_buffer(tmp);
+ }
- ret = __btrfs_cow_block(trans, info->dev_root, info->dev_root->node,
- NULL, 0, &tmp, 0, 0);
- BUG_ON(ret);
- free_extent_buffer(tmp);
+ generation = btrfs_root_generation(&info->dev_root->root_item);
+ if (generation != trans->transid) {
+ ret = __btrfs_cow_block(trans, info->dev_root,
+ info->dev_root->...
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 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
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite
straightforward. The usermode issues an ioctl for each device in the
fs. For each device, it enumerates the allocated device chunks. For
each chunk, the contained extents are enumerated and the data checksums
fetched. The extents are read sequentially and the checksums verified.
If an error occurs (checksum or EIO), a good copy
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
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible
to limit subvolumes and any group of subvolumes and also to track the amount
of space that will get freed when deleting snapshots.
The current version is functionally incomplete, with the main missing feature
being the initial scan and rescan of an existing filesystem.
I put some effort into writing an introduction into
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
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found
the very last bug in my current scrub patch series:
Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end
Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...ck_rsv.space_info = space_info;
fs_info->empty_block_rsv.space_info = space_info;
fs_info->empty_block_rsv.priority = 10;
+ fs_info->extent_root->block_rsv = &fs_info->global_block_rsv;
+ fs_info->csum_root->block_rsv = &fs_info->global_block_rsv;
+ fs_info->dev_root->block_rsv = &fs_info->global_block_rsv;
+ fs_info->tree_root->block_rsv = &fs_info->global_block_rsv;
fs_info->chunk_root->block_rsv = &fs_info->chunk_block_rsv;
+
+ btrfs_add_durable_block_rsv(fs_info, &fs_info->global_block_rsv);
+
+ btrfs_add_durable...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...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_tree, em);
@@ -1924,13 +1924,13 @@ int btrfs_balance(struct btrfs_root *dev_root)
ret = btrfs_shrink_device(device, old_size - size_to_free);
if (ret == -ENOSPC)
break;
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
trans = btrfs_start_transaction(dev_root, 0);
BUG_ON(!trans);
ret = btrfs_grow_device(trans, device, old_size);
- BUG_ON(ret);
+ btrfs_fixab...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
...+ b/fs/btrfs/extent-tree.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/u...
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