search for: close_ctree

Displaying 20 results from an estimated 20 matches for "close_ctree".

2013 Mar 09
4
[PATCH] use rcu_barrier() to wait for bdev puts at unmount
...mpts a get; this is left over from the unmount. Adding an rcu_barrier() to btrfs_close_devices() causes unmount to wait until all blkdev_put()s are done, and the device is truly free once unmount completes. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- p.s. I debated putting it into close_ctree(); I don''t know if there'' anything else to wait for. Thoughts? diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 5cbb7f4..258316a 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -680,6 +680,7 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)...
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
The reason the deadlock is that: Task Btrfs-cleaner umount() down_write(&s->s_umount) sync_filesystem() do auto-defragment and produce lots of dirty pages close_ctree() wait for the end of btrfs-cleaner start_transaction reserve space shrink_delalloc() writeback_inodes_sb_nr_if_idle() down_read(&sb->s_umount) So, the deadlock has happened. We fix it by using try_to_writeback_inodes_sb_nr(), this function...
2013 Aug 19
11
[RFC PATCH] Btrfs: fix memory leak of orphan block rsv
When adding orphans to an inode''s root, we start a transaction for that root that when ended in several places such as for example extent-tree.c:btrfs_remove_block_group(), inode.c:btrfs_unlink() and inode.c:btrfs_evict_node(), doesn''t result in a commit, that is, inode.c:btrfs_orphan_commit_root() doesn''t get called (via transaction.c:commit_fs_roots()). The respective
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...cache_tree *cache_tree = &fs_info->mapping_tree.cache_tree; + struct cache_extent *ce; + struct map_lookup *map; + + while ((ce = find_first_cache_extent(cache_tree, 0))) { + map = container_of(ce, struct map_lookup, ce); + remove_cache_extent(cache_tree, ce); + kfree(map); + } +} + int close_ctree(struct btrfs_root *root) { int ret; @@ -1326,6 +1341,7 @@ int close_ctree(struct btrfs_root *root) } close_all_devices(fs_info); + free_mapping_cache(fs_info); extent_io_tree_cleanup(&fs_info->extent_cache); extent_io_tree_cleanup(&fs_info->free_space_cache); extent_io_...
2013 Sep 05
9
btrfs-convert won't convert ext* - No valid Btrfs found on /dev/sdb1
Hello guys, i try to convert ext4 volume, but btrfs-convert show me error: "No valid Btrfs found on file unable to open ctree conversion aborted." Ubuntu 13.04 Kernel: 3.11 btrfs-progs git version 0.20-git20130822~194aa4a13 way to reproduce error: $ truncate -s 4G file $ mkfs.ext4 file #say yes to create fs on non block device. $ btrfs-convert file No valid Btrfs found on file unable
2012 Mar 08
17
kernel BUG at fs/btrfs/delayed-inode.c:1466!
Hi, this shown up today. I had to do a hard reboot as graceful hanged on sync(). ------------[ cut here ]------------ kernel BUG at fs/btrfs/delayed-inode.c:1466! invalid opcode: 0000 [#1] SMP CPU 10 Modules linked in: btrfs zlib_deflate lzo_compress ipmi_devintf autofs4 be2iscsi iscsi_boot_sysfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_addr iscsi_tcp bnx2i cnic uio ipv6 cxgb3i libcxgbi
2010 Dec 01
2
[RFC PATCH 4/4 v2] Btrfs: deal with filesystem state at mount, umount
...BUG_ON(ret); + /* run commit again to drop the original snapshot */ trans = btrfs_join_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans); + btrfs_commit_transaction(trans, root); ret = btrfs_write_and_wait_transaction(NULL, root); BUG_ON(ret); @@ -2426,8 +2440,28 @@ int close_ctree(struct btrfs_root *root) smp_mb(); btrfs_put_block_group_cache(fs_info); + + /* + * Here come 2 situations when btrfs flips readonly: + * + * 1. when btrfs flips readonly somewhere else before + * btrfs_commit_super, sb->s_flags has MS_RDONLY flag, + * and btrfs will skip to write sb...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...et) { - fprintf(stderr, "failed to update super block\n"); - goto fail; - } - btrfs_free_fs_root(snap_root->fs_info, snap_root); + fprintf(stderr, "error during create_ext2_image %d\n", ret); + goto fail; + } + btrfs_free_fs_root(ext2_root->fs_info, ext2_root); ret = close_ctree(root); if (ret) { fprintf(stderr, "error during close_ctree %d\n", ret); goto fail; } close_ext2fs(ext2_fs); + + /* finally migrate super block to its default postion */ + ret = migrate_super_block(fd, super_bytenr, blocksize); + if (ret) { + fprintf(stderr, "unable to m...
2013 Feb 07
1
[PATCH] Btrfs: cleanup orphan reservation if truncate fails
I noticed we were getting lots of warnings with xfstest 83 because we have reservations outstanding. This is because we moved the orphan add outside of the truncate, but we don''t actually cleanup our reservation if something fails. This fixes the problem and I no longer see warnings. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- fs/btrfs/inode.c | 2 ++ 1
2012 Sep 17
2
'umount' of multi-device volume hangs until the device is physically un-plugged
...on+0x59d/0xac0 [btrfs] [ 469.038105] [<ffffffff8107f610>] ? wake_up_bit+0x40/0x40 [ 469.038134] [<ffffffffa05b4d46>] ? __btrfs_scrub_cancel+0x106/0x110 [btrfs] [ 469.038160] [<ffffffffa0564aa6>] btrfs_commit_super+0x86/0x110 [btrfs] [ 469.038185] [<ffffffffa0566358>] close_ctree+0x2c8/0x320 [btrfs] [ 469.038191] [<ffffffff811aa067>] ? evict_inodes+0xb7/0x100 [ 469.038208] [<ffffffffa053d4b9>] btrfs_put_super+0x19/0x20 [btrfs] [ 469.038215] [<ffffffff81191611>] generic_shutdown_super+0x61/0xe0 [ 469.038222] [<ffffffff81191726>] kill_anon_supe...
2011 Jun 30
9
btrfs-progs: integration branch updated
After a reorganisation of patches, and sending a bunch of them to Chris, I''ve also updated the integration branch to match that. It''s available from: http://git.darksatanic.net/repo/btrfs-progs-unstable.git/ integration-20110630 The shortlog of 17 patches in this branch beyond the ones I''ve sent to Chris is below. Hugo. Andreas Philipp (1): print parent
2011 Feb 09
1
warning in btrfs_free_block_groups
...d: 13197, comm: umount Tainted: G W 2.6.37-rc8 #54 Call Trace: [<ffffffff810398d3>] warn_slowpath_common+0x80/0x98 [<ffffffff81039900>] warn_slowpath_null+0x15/0x17 [<ffffffff81155aec>] btrfs_free_block_groups+0x218/0x275 [<ffffffff81164597>] close_ctree+0x183/0x344 [<ffffffff810bc2c5>] ? destroy_inode+0x38/0x4e [<ffffffff810bc385>] ? dispose_list+0xaa/0xc0 [<ffffffff8114a040>] btrfs_put_super+0x18/0x27 [<ffffffff810ac3a2>] generic_shutdown_super+0x66/0xe1 [<ffffffff810ac468>] kill_anon_super+0...
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...root *open_ctree(const char *filename, u64 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 A...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...info->metadata_alloc_profile = (u64)-1; - fs_info->system_alloc_profile = fs_info->metadata_alloc_profile; fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, "btrfs-cleaner"); if (IS_ERR(fs_info->cleaner_kthread)) @@ -2439,15 +2437,15 @@ int close_ctree(struct btrfs_root *root) fs_info->closing = 1; smp_mb(); - kthread_stop(root->fs_info->transaction_kthread); - kthread_stop(root->fs_info->cleaner_kthread); - if (!(fs_info->sb->s_flags & MS_RDONLY)) { ret = btrfs_commit_super(root); if (ret) printk(KERN_...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...@ int btrfs_free_fs_root(struct btrfs_fs_i (unsigned long)root->root_key.objectid); if (root->in_sysfs) btrfs_sysfs_del_root(root); + if (root->orphan_dir) + iput(root->orphan_dir); if (root->inode) iput(root->inode); if (root->node) @@ -1603,6 +1608,7 @@ int close_ctree(struct btrfs_root *root) btrfs_stop_workers(&fs_info->submit_workers); iput(fs_info->btree_inode); + #if 0 while(!list_empty(&fs_info->hashers)) { struct btrfs_hasher *hasher; diff -r 99b12e2db0f8 inode.c --- a/inode.c Wed Jun 18 20:50:41 2008 -0400 +++ b/inode.c Tue Ju...
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
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 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
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