Displaying 20 results from an estimated 85 matches for "btrfs_fs_info".
2013 May 07
2
[PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode
...fs/btrfs/ctree.c | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index de6de8e..33c9061 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -553,7 +553,7 @@ static inline int tree_mod_alloc(struct btrfs_fs_info *fs_info, gfp_t flags,
* once we switch from spin locks to something different, we should
* honor the flags parameter here.
*/
- tm = *tm_ret = kzalloc(sizeof(*tm), GFP_ATOMIC);
+ tm = *tm_ret = kzalloc(sizeof(*tm), flags);
if (!tm)
return -ENOMEM;
@@ -591,14 +591,14 @@ __tree_mod_l...
2013 Apr 25
10
[PATCH v4 0/3] Btrfs: quota rescan for 3.10
The kernel side for rescan, which is needed if you want to enable qgroup
tracking on a non-empty volume. The first patch splits
btrfs_qgroup_account_ref into readable ans reusable units. The second
patch adds the rescan implementation (refer to its commit message for a
description of the algorithm). The third patch starts an automatic
rescan when qgroups are enabled. It is only separated to
2012 May 24
2
[PATCH] Btrfs: fix the same inode id problem when doing auto defragment
...> 0)
p = &parent->rb_right;
else {
/* if we''re reinserting an entry for
@@ -159,28 +174,33 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
/*
* must be called with the defrag_inodes lock held
*/
-struct inode_defrag *btrfs_find_defrag_inode(struct btrfs_fs_info *info, u64 ino,
+struct inode_defrag *btrfs_find_defrag_inode(struct btrfs_fs_info *info,
+ u64 root, u64 ino,
struct rb_node **next)
{
struct inode_defrag *entry = NULL;
+ struct inode_defrag tmp;
struct rb_node *p;
struct rb_node *parent = NULL;
+ tmp.ino = ino;
+ tmp...
2013 Apr 11
2
[PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block
...flags(); |
|flags = btrfs_super_incompat_flags();
flags |= new_flag1; |
|flags |= new_flag2;
btrfs_set_super_incompat_flags(flags); |
|btrfs_set_super_incompat_flags(flags);
the new_flag1 is recovered.
In order to avoid this problem, we introduce a lock named super_lock into
the btrfs_fs_info structure. If we want to update incompat/compat flags
of the super block, we must hold it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/btrfs/ctree.h | 22 ++++++++++++++++++++--
fs/btrfs/disk-io.c | 5 +++++
fs/btrfs/volumes.c | 10 +---------
3 files changed, 26 insertions(+),...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...pin_unlock(&delayed_refs->lock);
return 0;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 94ecac3..2d96241 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -50,10 +50,10 @@ static void free_fs_root(struct btrfs_root *root);
static void btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
int read_only);
static int btrfs_destroy_ordered_operations(struct btrfs_root *root);
-static int btrfs_destroy_ordered_extents(struct btrfs_root *root);
-static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
- struct btrfs_root *root);
-static int btrf...
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 Apr 11
0
[PATCH 1/2] Btrfs: fix unblocked autodefraggers when remount
...cn.fujitsu.com>
---
fs/btrfs/super.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 68a29a1..0f03569 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1202,11 +1202,14 @@ static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
new_pool_size);
}
-static inline void btrfs_remount_prepare(struct btrfs_fs_info *fs_info,
- unsigned long old_opts, int flags)
+static inline void btrfs_remount_prepare(struct btrfs_fs_info *fs_info)
{
set_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state);
+}...
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...-
extent-tree.c | 9 +++++++++
2 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index da7086f..72b33da 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1269,23 +1269,38 @@ int write_ctree_super(struct btrfs_trans_handle *trans,
static int close_all_devices(struct btrfs_fs_info *fs_info)
{
struct list_head *list;
- struct list_head *next;
struct btrfs_device *device;
- return 0;
-
list = &fs_info->fs_devices->devices;
- list_for_each(next, list) {
- device = list_entry(next, struct btrfs_device, dev_list);
+ while (!list_empty(list)) {
+ device = list...
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
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...@ void btrfs_block_rsv_release(struct btrf
block_rsv_release_bytes(block_rsv, num_bytes);
}
+/*
+ * helper to calculate size of global block reservation.
+ * the desired value is sum of space used by extent tree,
+ * checksum tree and root tree
+ */
+static u64 calc_global_metadata_size(struct btrfs_fs_info *fs_info)
+{
+ struct btrfs_space_info *sinfo;
+ u64 num_bytes;
+ u64 meta_used;
+ u64 data_used;
+ int csum_size = btrfs_super_csum_size(&fs_info->super_copy);
+#if 0
+ /*
+ * per tree used space accounting can be inaccuracy, so we
+ * can''t rely on it.
+ */
+ spin_lock(&fs_...
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 Jun 29
14
[PATCH v4 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees.
The intention is to use it to speed up scrub in a first run, but balance
is another hot candidate. In general, every tree walk could be accompanied
by a readahead. Deletion of large files comes to mind, where the fetching
of the csums takes most of the time.
Also the initial build-ups of free-space-caches and
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
...index b40dfe4..663d360 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -43,6 +43,8 @@
static struct extent_io_ops btree_extent_io_ops;
static void end_workqueue_fn(struct btrfs_work *work);
static void free_fs_root(struct btrfs_root *root);
+static void btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
+ int read_only);
/*
* end_io_wq structs are used to do processing in task context when an IO is
@@ -1700,6 +1702,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
if (!btrfs_super_root(disk_super))
goto fail_iput;
+ /* check filesystem state */
+ fs_info->...
2011 Jun 10
6
[PATCH v2 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees.
The intention is to use it to speed up scrub in a first run, but balance
is another hot candidate. In general, every tree walk could be accompanied
by a readahead. Deletion of large files comes to mind, where the fetching
of the csums takes most of the time.
Also the initial build-ups of free-space-caches and
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 Sep 25
3
[PATCH] Btrfs: limit thread pool size when remounting
...acle.com>
---
fs/btrfs/super.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 83d6f9f..a58e834 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1158,17 +1158,20 @@ static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
printk(KERN_INFO "btrfs: resize thread pool %d -> %d\n",
old_pool_size, new_pool_size);
- btrfs_set_max_workers(&fs_info->generic_worker, new_pool_size);
+ btrfs_set_max_workers(&fs_info->generic_worker, min(1, new_pool_size));
btrfs_set_max_worke...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
..., last);
- if (!cache)
- goto out;
-
- *cache_ret = cache;
- goto again;
-
-out:
- return -ENOSPC;
-}
-
-static u64 div_factor(u64 num, int factor)
-{
- if (factor == 10)
- return num;
- num *= factor;
- do_div(num, 10);
- return num;
-}
-
static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info,
u64 flags)
{
@@ -384,6 +331,15 @@ static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info,
return NULL;
}
+static u64 div_factor(u64 num, int factor)
+{
+ if (factor == 10)
+ return num;
+ num *= factor;
+ do_div(num, 10);
+ return num;
+}
+
static struc...
2013 Oct 16
3
trivial cleanups
Hi gang,
Here''s some trivial cleanups that I''ve built up while reading through
the code. They''ve been run through xfstests -g quick.
- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
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
2012 Nov 19
4
btrfs crash - Null dereference - 3.7.0-rc5-00068-gc5e35d6
Hi,
my system suddenly crashed and gave me this dump:
http://imgur.com/oO6S0
I checked and there is not btrfs commit in linus'' tree since I compiled this
kernel.
Gustavo