Displaying 13 results from an estimated 13 matches for "write_ctree_sup".
Did you mean:
write_ctree_super
2013 Oct 19
13
[PATCH] Btrfs: fix race condition between writting and scrubing supers
...2 files changed, 4 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 419968e..0debb19 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3582,7 +3582,9 @@ int btrfs_commit_super(struct btrfs_root *root)
return ret;
}
+ btrfs_scrub_pause_super(root);
ret = write_ctree_super(NULL, root, 0);
+ btrfs_scrub_continue_super(root);
return ret;
}
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 277fe81..3ebcbbd 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1892,7 +1892,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle...
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
...tly write sb.
+ */
if (!(fs_info->sb->s_flags & MS_RDONLY)) {
- ret = btrfs_commit_super(root);
+ ret = btrfs_commit_super(root);
+ if (ret)
+ printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
+ }
+
+ if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) {
+ ret = write_ctree_super(NULL, root, 0);
if (ret)
printk(KERN_ERR "btrfs: commit super ret %d\n", ret);
}
@@ -2603,6 +2637,17 @@ out:
return 0;
}
+static void btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
+ int read_only)
+{
+ if (read_only)
+ return;
+
+ if (fs_info->fs_state...
2012 Apr 17
2
Kernel bug in BTRFS (kernel 3.3.0)
...90210b ffff88100ef81ec0 0000000052f63ba8
0000000100000001
[370517.205716] ffff881010d59000 ffff881000000001 ffff880811d87400
ffff88100ef81f38
[370517.205849] 00000013c4a03fff ffff880ff058d000 ffff880811d87400
ffff881002a915a0
[370517.205984] Call Trace:
[370517.206049] [<ffffffff81389e7e>] write_ctree_super+0xe/0x10
[370517.206119] [<ffffffff813c24b4>] btrfs_sync_log+0x424/0x5c0
[370517.206190] [<ffffffff8139e9cb>] btrfs_sync_file+0x17b/0x1e0
[370517.206260] [<ffffffff81160703>] vfs_fsync_range+0x23/0x30
[370517.206329] [<ffffffff8116076c>] generic_write_sync+0x3c/0x40
[3...
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...sef Bacik <jbacik@fusionio.com>
---
disk-io.c | 26 +++++++++++++++++++++-----
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_ent...
2012 Jan 25
0
[3.2.1] kernel BUG at fs/btrfs/disk-io.c:2835!
...fff88011198c000, task ffff880106eb4940)
Stack:
ffff8800b4b37840 0000000000000000 0000000100000000 ffff880100000001
0000000000000001 ffff8800b4b378b8 ffff88011198dd08 ffff88011263fe80
ffff8801046a7400 ffff880105618540 ffff88011198dd78 ffff88011263fef8
Call Trace:
[<ffffffff811b469e>] write_ctree_super+0xe/0x10
[<ffffffff811b9778>] btrfs_commit_transaction+0x6a8/0x870
[<ffffffff811b8a8a>] ? join_transaction+0x24a/0x280
[<ffffffff810611f0>] ? wake_up_bit+0x40/0x40
[<ffffffff81195a57>] btrfs_sync_fs+0x47/0x70
[<ffffffff811029be>] __sync_filesystem+0x5e/0x90...
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...sb_bytenr, int writes);
+struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes, int check_mount);
struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr,
- int writes);
+ int writes, int check_mount);
int close_ctree(struct btrfs_root *root);
int write_ctree_super(struct btrfs_trans_handle *trans,
struct btrfs_root *root);
diff --git a/kerncompat.h b/kerncompat.h
index e4c8ce0..46236cd 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -42,7 +42,11 @@
#define GFP_NOFS 0
#define __read_mostly
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#i...
2013 Aug 29
4
[PATCH] Notify caching_thread()s to give up on extent_commit_sem when needed.
caching_thread()s do all their work under read access to extent_commit_sem.
They give up on this read access only when need_resched() tells them, or
when they exit. As a result, somebody that wants a WRITE access to this sem,
might wait for a long time. Especially this is problematic in
cache_block_group(),
which can be called on critical paths like find_free_extent() and in commit
path via
2009 Jun 09
4
[PATCH] btrfs: fix write_dev_supers
...19
1dacbb
Jun 9 00:41:32 dl580 kernel: Call Trace:
Jun 9 00:41:33 dl580 kernel: [<ffffffffa02d9979>] write_dev_supers+0x1eb/0x258 [btrfs]
Jun 9 00:41:33 dl580 kernel: [<ffffffffa02d9b6d>] write_all_supers+0x187/0x1c8 [btrfs]
Jun 9 00:41:33 dl580 kernel: [<ffffffffa02d9bbc>] write_ctree_super+0xe/0x10 [btrfs]
Jun 9 00:41:33 dl580 kernel: [<ffffffffa02de39f>] btrfs_commit_transaction+0x6bb/0x841 [bt
rfs]
Jun 9 00:41:33 dl580 kernel: [<ffffffff80246914>] ? autoremove_wake_function+0x0/0x38
Jun 9 00:41:33 dl580 kernel: [<ffffffffa02c14ed>] btrfs_sync_fs+0x67/0x72...
2013 Oct 18
11
[GIT PULL] Btrfs
Hi Linus,
My for-linus branch has a one line fix:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a
regression in our initial rc1 pull. When doing nocow writes we were
sometimes starting a transaction with locks held.
Josef Bacik (1) commits (+1/-0):
Btrfs: release path before starting
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...esize, u32 leafsize, u32 sectorsize,
INIT_LIST_HEAD(&root->anon_super.s_list);
INIT_LIST_HEAD(&root->anon_super.s_instances);
init_rwsem(&root->anon_super.s_umount);
-
- return 0;
}
static int find_and_setup_root(struct btrfs_root *tree_root,
@@ -2412,7 +2410,7 @@ int write_ctree_super(struct btrfs_trans_handle *trans,
return ret;
}
-int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)
+void btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)
{
spin_lock(&fs_info->fs_roots_radix_lock);
radix_tree_delete(&fs_i...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
..., root);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
/* run commit again to drop the original snapshot */
trans = btrfs_join_transaction(root, 1);
btrfs_commit_transaction(trans, root);
ret = btrfs_write_and_wait_transaction(NULL, root);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
ret = write_ctree_super(NULL, root, 0);
return ret;
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 32d0940..801db4e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -209,7 +209,7 @@ static int exclude_super_stripes(struct btrfs_root *root,
cache->bytes_super += stripe_len;...
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
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...efs(&new_root->root_item, 0);
ret = btrfs_update_root(trans, root->fs_info->tree_root,
- &new_root->root_key, &new_root->root_item);
- BUG_ON(ret);
-
- ret = commit_tree_roots(trans, fs_info);
- BUG_ON(ret);
- ret = __commit_transaction(trans, root);
- BUG_ON(ret);
- write_ctree_super(trans, root);
- btrfs_finish_extent_commit(trans, fs_info->extent_root,
- &fs_info->pinned_extents);
- btrfs_free_transaction(root, trans);
- fs_info->running_transaction = NULL;
-
- trans = btrfs_start_transaction(root, 1);
- ret = btrfs_drop_snapshot(trans, new_root);...