search for: btrfs_root_refs

Displaying 16 results from an estimated 16 matches for "btrfs_root_refs".

Did you mean: btrfs_root_ref
2010 Nov 17
0
[PATCH] Btrfs: handle NFS lookups properly
People kept reporting NFS issues, specifically getting ESTALE alot. I figured out how to reproduce the problem SERVER mkfs.btrfs /dev/sda1 mount /dev/sda1 /mnt/btrfs-test <add /mnt/btrfs-test to /etc/exports> btrfs subvol create /mnt/btrfs-test/foo service nfs start CLIENT mount server:/mnt/btrfs /mnt/test cd /mnt/test/foo ls SERVER echo 3 > /proc/sys/vm/drop_caches CLIENT ls
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix file descriptors leak
file descriptors are closed when not in use Signed-off-by: Imran Zaman <imran.zaman at intel.com> --- extlinux/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extlinux/main.c b/extlinux/main.c index 09740bd..55a1495 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -580,6 +580,7 @@ int ext2_fat_install_file(const char *path, int devfd, struct
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
>From 03115f064be2e074d84f4e2105d2cdebde10f6ba Mon Sep 17 00:00:00 2001 From: Yi Yang <yi.y.yang at intel.com> Date: Tue, 12 Jul 2011 14:53:50 +0800 Subject: [PATCH] Use a general way to get the default subvolume for btrfs --- extlinux/btrfs.h | 105 +++++++++++++++++++ extlinux/main.c | 304 ++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 377 insertions(+),
2013 Aug 27
7
[PATCH] Btrfs: fix deadlock in uuid scan kthread
...int slot; struct btrfs_root_item root_item; u32 item_size; - struct btrfs_trans_handle *trans; + struct btrfs_trans_handle *trans = NULL; path = btrfs_alloc_path(); if (!path) { @@ -3509,7 +3509,13 @@ static int btrfs_uuid_scan_kthread(void *data) (int)sizeof(root_item)); if (btrfs_root_refs(&root_item) == 0) goto skip; - if (!btrfs_is_empty_uuid(root_item.uuid)) { + + if (!btrfs_is_empty_uuid(root_item.uuid) || + !btrfs_is_empty_uuid(root_item.received_uuid)) { + if (trans) + goto update_tree; + + btrfs_release_path(path); /* * 1 - subvol uuid item...
2013 Feb 20
1
[PATCH] Btrfs: fix cleaner thread not working with inode cache option
...) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ca7ace7..d9984fa 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7230,8 +7230,9 @@ int btrfs_drop_inode(struct inode *inode) { struct btrfs_root *root = BTRFS_I(inode)->root; + /* the snap/subvol tree is on deleting */ if (btrfs_root_refs(&root->root_item) == 0 && - !btrfs_is_free_space_inode(inode)) + root != root->fs_info->tree_root) return 1; else return generic_drop_inode(inode); diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a31cd93..375f31f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btr...
2011 Dec 02
3
[PATCH] Btrfs: protect orphan block rsv with spin_lock
...} + + if (root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE) { + spin_unlock(&root->orphan_lock); + return; + } + + block_rsv = root->orphan_block_rsv; + root->orphan_block_rsv = NULL; + spin_unlock(&root->orphan_lock); + if (root->orphan_item_inserted && btrfs_root_refs(&root->root_item) > 0) { ret = btrfs_del_orphan_item(trans, root->fs_info->tree_root, @@ -1965,10 +1981,9 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, root->orphan_item_inserted = 0; } - if (root->orphan_block_rsv) { - WARN_ON(root->orphan_b...
2013 Nov 19
6
[PATCH] Btrfs: fix very slow inode eviction and fs unmount
...ode(struct inode *inode) { struct btrfs_trans_handle *trans; @@ -4498,7 +4554,8 @@ void btrfs_evict_inode(struct inode *inode) trace_btrfs_inode_evict(inode); - truncate_inode_pages(&inode->i_data, 0); + evict_inode_truncate_pages(inode); + if (inode->i_nlink && ((btrfs_root_refs(&root->root_item) != 0 && root->root_key.objectid != BTRFS_ROOT_TREE_OBJECTID) || @@ -7379,6 +7436,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned int offset, struct extent_state *cached_state = NULL; u64 page_start = page_offset(page); u64 page_end...
2010 Oct 30
0
[PATCH] Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) - generated by Coccinelle
...super.c +++ b/fs/btrfs/super.c @@ -380,7 +380,7 @@ static struct dentry *get_default_root(struct super_block *sb, find_root: new_root = btrfs_read_fs_root_no_name(root->fs_info, &location); if (IS_ERR(new_root)) - return ERR_PTR(PTR_ERR(new_root)); + return ERR_CAST(new_root); if (btrfs_root_refs(&new_root->root_item) == 0) return ERR_PTR(-ENOENT); -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP
2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
Balance will create reloc_root for each fs root, and it''s going to record last_snapshot to filter shared blocks. The side effect of setting last_snapshot is to break nocow attributes of files. So it turns out that checking last_snapshot does not always ensure that a node/leaf/file_extent is shared. That''s why shared node/leaf needs to search extent tree for number of
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
devname is put on heap for all cases to avoid memory leak, and ease of use in future as well Signed-off-by: Imran Zaman <imran.zaman at intel.com> --- extlinux/main.c | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index bc7ded3..74f8d1f 100644 --- a/extlinux/main.c +++
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com> This patch adds creation-time to the snapshot list display, which would help user to better manage the snapshots when number of snapshots grow substantially. This patch is developed and on top of the send/receive btrfs and btrfs-progs repo at git://github.com/ablock84/linux-btrfs.git (send-v2) git://github.com/ablock84/btrfs-progs.git (send-v2)
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
...{ @@ -3293,6 +3294,11 @@ void btrfs_delete_inode(struct inode *inode) } btrfs_wait_ordered_range(inode, 0, (u64)-1); + if (root->fs_info->log_root_recovering) { + BUG_ON(!list_empty(&BTRFS_I(inode)->i_orphan)); + goto no_delete; + } + if (inode->i_nlink > 0) { BUG_ON(btrfs_root_refs(&root->root_item) != 0); goto no_delete; @@ -3700,6 +3706,13 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) } srcu_read_unlock(&root->fs_info->subvol_srcu, index); + if (root != sub_root) { + down_read(&root->fs_info->cleanup_work...
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
2012 Nov 01
41
[Request for review] [RFC] Add label support for snapshots and subvols
From: Anand Jain <anand.jain@oracle.com> (This patch is for the review/test not yet for the integration). Here is an implementation of the feature to add label to the subvolume and snapshots. Which would help sysadmin to better manager the subvol and snapshots. This can be done in two ways, one - using attr which is user land only changes but drawback is able to change the label
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.
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...); ret = btrfs_insert_orphan_item(trans, root->fs_info->tree_root, snap->root_key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); snap->orphan_item_inserted = 1; #endif } @@ -2108,7 +2108,7 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, btrfs_root_refs(&root->root_item) > 0) { ret = btrfs_del_orphan_item(trans, root->fs_info->tree_root, root->root_key.objectid); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); root->orphan_item_inserted = 0; } @@ -2177,20 +2177,20 @@ int btrfs_orphan_add(struct btrfs_trans_h...