search for: btrfs_root

Displaying 20 results from an estimated 185 matches for "btrfs_root".

2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...- root = open_ctree(av[optind], 0, 0); + root = open_ctree(av[optind], 0, 0, 0); if (!root) { fprintf(stderr, "unable to open %s\n", av[optind]); exit(1); diff --git a/disk-io.c b/disk-io.c index addebe1..f8e623b 100644 --- a/disk-io.c +++ b/disk-io.c @@ -570,7 +570,7 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, return root; } -struct btrfs_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) { int fp; struct btrfs_root *root; @@ -584,14...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...RFS_UPDATE_DELAYED_HEAD, + extent_op->is_data); spin_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_transac...
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
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...u64 bytes_delalloc; /* number of bytes reserved for allocation, @@ -744,6 +745,7 @@ struct btrfs_block_group_cache { spinlock_t lock; u64 pinned; u64 reserved; + u64 bytes_super; u64 flags; u64 sectorsize; int extents_thresh; @@ -2012,7 +2014,7 @@ u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags); void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); void btrfs_clear_space_info_full(struct btrfs_fs_info *info); -int btrfs_check_metadata_free_space(struct btrfs_root *root); +u64 btrfs_metadata_free_space(struct btrfs_root *root); int btrfs_chec...
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
...| 3 +++ fs/btrfs/extent-tree.c | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 20196f4..59b566d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3056,6 +3056,9 @@ int close_ctree(struct btrfs_root *root) /* clear out the rbtree of defraggable inodes */ btrfs_run_defrag_inodes(fs_info); + /* sync all the dirty pages which are made by auto defrag */ + sync_filesystem(fs_info->sb); + /* * Here come 2 situations when btrfs is broken to flip readonly: * diff --git a/fs/btrfs/exte...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ad28922..8b9e1f9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2198,8 +2198,6 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, u64 root_objectid, u64 owner, u64 offset); int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); -int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache, - u64 num_bytes, int reserve, int sinfo); int btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_finish_extent_commit(struct btrfs_trans_handl...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
...s_info->btree_inode)->location, 0, sizeof(struct btrfs_key)); diff -r 47aa0c51998a extent-tree.c --- a/extent-tree.c Thu Sep 25 16:00:36 2008 +0800 +++ b/extent-tree.c Thu Sep 25 16:02:11 2008 +0800 @@ -1091,15 +1091,25 @@ int btrfs_cache_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, u32 nr_extents) { - u32 nritems; struct btrfs_key key; struct btrfs_file_extent_item *fi; - int i; - int level; - int ret = 0; + u64 root_gen; + u32 nritems; + int i; + int level; + int ret = 0; + int shared = 0; if (!root->ref_cows) return 0;...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ad28922..8b9e1f9 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2198,8 +2198,6 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, u64 root_objectid, u64 owner, u64 offset); int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); -int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache, - u64 num_bytes, int reserve, int sinfo); int btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_finish_extent_commit(struct btrfs_trans_handl...
2010 Mar 12
2
[PATCH] Btrfs: force delalloc flushing when things get desperate
...ns(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0085dcb..aeef481 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2873,7 +2873,7 @@ static noinline void flush_delalloc_async(struct btrfs_work *work) kfree(async); } -static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info) +static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info, int soft) { DEFINE_WAIT(wait); u64 num_bytes; @@ -2895,6 +2895,12 @@ static void wait_on_flush(struct btrfs_root *root, struct btrfs_space_info *info break; } + if...
2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
...ons(+), 39 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 02369a3..7d84651 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -62,7 +62,7 @@ static void btrfs_destroy_ordered_operations(struct btrfs_transaction *t, static void btrfs_destroy_ordered_extents(struct btrfs_root *root); static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, struct btrfs_root *root); -static void btrfs_destroy_pending_snapshots(struct btrfs_transaction *t); +static void btrfs_evict_pending_snapshots(struct btrfs_transaction *t); static void btrfs_destroy_delallo...
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone, This patchset is the latest approach I''m using for the Ceph storage daemon to keep track of which data has safely committed to disk. The basic idea is to not use the (problematic) user transaction ioctls at all. Instead, the daemon quiesces its own write requests, initiates an async snapshot, and then continues. The snapshot approach is nice because it provides rollback.
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...32c #endif diff -urp btrfs-progs-unstable/ctree.c btrfs-progs-2/ctree.c --- btrfs-progs-unstable/ctree.c 2009-01-08 08:30:09.752081135 +0800 +++ btrfs-progs-2/ctree.c 2009-05-01 14:07:13.000000000 +0800 @@ -85,6 +85,7 @@ int btrfs_copy_root(struct btrfs_trans_h int ret = 0; int level; struct btrfs_root *new_root; + struct btrfs_disk_key disk_key; new_root = kmalloc(sizeof(*new_root), GFP_NOFS); if (!new_root) @@ -98,8 +99,12 @@ int btrfs_copy_root(struct btrfs_trans_h WARN_ON(root->ref_cows && trans->transid != root->last_trans); level = btrfs_header_level(buf); - cow...
2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...ERR "block group %llu has an wrong amount of free " + "space\n", block_group->key.objectid); + ret = 0; + goto free_cache; + } + spin_unlock(&block_group->tree_lock); + ret = 1; out: kfree(checksums); @@ -495,8 +508,11 @@ int btrfs_write_out_cache(struct btrfs_root *root, struct list_head *pos, *n; struct page *page; struct extent_state *cached_state = NULL; + struct btrfs_free_cluster *cluster = NULL; + struct extent_io_tree *unpin = NULL; struct list_head bitmap_list; struct btrfs_key key; + u64 start, end, len; u64 bytes = 0; u32 *crc, *check...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...ned */ + if (first == block) + return -ENOSPC; + if (first == 0) + first = block; + bytenr = block * blocksize; if (!test_range_bit(&root->fs_info->pinned_extents, bytenr, bytenr + blocksize - 1, EXTENT_DIRTY, 0)) @@ -167,7 +172,7 @@ struct dir_iterate_data { struct btrfs_root *root; struct btrfs_inode_item *inode; u64 objectid; - u32 parent; + u64 parent; int errcode; }; @@ -281,10 +286,9 @@ fail: } /* - * record a single file extent. do all required works: - * 1. insert a btrfs_file_extent_item into fs tree. - * 2. compute checksum and insert btrfs_csum_item...
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.
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...kmem_cache *btrfs_path_cac #define BTRFS_FT_SOCK 6 #define BTRFS_FT_SYMLINK 7 #define BTRFS_FT_XATTR 8 -#define BTRFS_FT_MAX 9 +#define BTRFS_FT_ORPHAN_DIR 9 +#define BTRFS_FT_MAX 10 /* * the key defines the order in the tree, and so it also defines (optimal) @@ -613,6 +614,10 @@ struct btrfs_root { /* the dirty list is only used by non-reference counted roots */ struct list_head dirty_list; + + /* orphan crap */ + struct inode *orphan_dir; + struct list_head orphan_list; }; /* @@ -624,6 +629,7 @@ struct btrfs_root { #define BTRFS_INODE_ITEM_KEY 1 #define BTRFS_INODE_REF_KEY 2...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...39;re under a threshold */ struct list_head list; diff -urp 8/fs/btrfs/disk-io.c 9/fs/btrfs/disk-io.c --- 8/fs/btrfs/disk-io.c 2010-04-18 10:24:51.286697000 +0800 +++ 9/fs/btrfs/disk-io.c 2010-04-18 10:47:31.056726210 +0800 @@ -1472,10 +1472,6 @@ static int cleaner_kthread(void *arg) struct btrfs_root *root = arg; do { - smp_mb(); - if (root->fs_info->closing) - break; - vfs_check_frozen(root->fs_info->sb, SB_FREEZE_WRITE); if (!(root->fs_info->sb->s_flags & MS_RDONLY) && @@ -1488,11 +1484,9 @@ static int cleaner_kthread(void *arg) if (freezing...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...root, mid); + mid->root_objectid = 0; btrfs_tree_unlock(mid); del_ptr(trans, root, path, level + 1, pslot, 1); root_sub_used(root, mid->len); @@ -2270,6 +2278,22 @@ read_block_for_search(struct btrfs_trans_handle *trans, return ret; } +static int check_nodes_need_balance(struct btrfs_root *root, + struct btrfs_path *p, + struct extent_buffer *b, + int level, int ins_len) +{ + if ((p->search_for_split || ins_len > 0) && btrfs_header_nritems(b) >= + BTRFS_NODEPTRS_PER_BLOCK(root) - 3) + return 1; + + if (ins_len < 0 && + btrfs_...
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 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