search for: btree_inode

Displaying 15 results from an estimated 15 matches for "btree_inode".

2010 May 20
1
[PATCH 01/10] btrfs: add a return value for readahead_tree_block()
...6632e5c..35916d5 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -794,7 +794,7 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, buf = btrfs_find_create_tree_block(root, bytenr, blocksize); if (!buf) return 0; - read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, + ret = read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, buf, 0, 0, btree_get_extent, 0); free_extent_buffer(buf); return ret; -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordo...
2011 Jan 04
16
[PATCH v2 0/5] add new ioctls to do metadata readahead in btrfs
...to do asyn file read, but has no metadata readahead. For a list of files, their metadata is stored in fragmented disk space and metadata read is a sync operation, which impacts the efficiency of readahead much. The patches try to add meatadata readahead for btrfs. In btrfs, metadata is stored in btree_inode. Ideally, if we could hook the inode to a fd so we could use existing syscalls (readahead, mincore or upcoming fincore) to do readahead, but the inode is hidden, there is no easy way for this from my understanding. So we add two ioctls for this. One is like readahead syscall, the other is like mico...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
...t btrfs_leaf_ref_tree { - struct rb_root root; - struct btrfs_leaf_ref *last; - struct list_head list; - spinlock_t lock; }; /* diff -r 47aa0c51998a disk-io.c --- a/disk-io.c Thu Sep 25 16:00:36 2008 +0800 +++ b/disk-io.c Thu Sep 25 16:02:11 2008 +0800 @@ -1430,6 +1430,8 @@ fs_info->btree_inode->i_mapping, GFP_NOFS); fs_info->do_barriers = 1; + btrfs_leaf_ref_tree_init(&fs_info->shared_ref_tree); + BTRFS_I(fs_info->btree_inode)->root = tree_root; memset(&BTRFS_I(fs_info->btree_inode)->location, 0, sizeof(struct btrfs_key)); diff -r 47aa0c51998...
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
2011 Aug 23
0
[PATCH] Btrfs: fix an oops when deleting snapshots
....h b/fs/btrfs/btrfs_inode.h index 502b9e9..d9f99a1 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -176,7 +176,11 @@ static inline u64 btrfs_ino(struct inode *inode) { u64 ino = BTRFS_I(inode)->location.objectid; - if (ino <= BTRFS_FIRST_FREE_OBJECTID) + /* + * !ino: btree_inode + * type == BTRFS_ROOT_ITEM_KEY: subvol dir + */ + if (!ino || BTRFS_I(inode)->location.type == BTRFS_ROOT_ITEM_KEY) ino = inode->i_ino; return ino; } -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo...
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
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...trans = btrfs_start_transaction(root, 1); - ret = btrfs_commit_transaction(trans, root); + ret = btrfs_force_transaction_commit(root, 0); sleep: wake_up_process(root->fs_info->cleaner_kthread); @@ -1574,7 +1572,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->btree_inode = new_inode(sb); fs_info->btree_inode->i_ino = 1; fs_info->btree_inode->i_nlink = 1; - fs_info->metadata_ratio = 8; + fs_info->metadata_ratio = 0; fs_info->thread_pool_size = min_t(unsigned long, num_online_cpus() + 2, 8); @@ -2285,18 +2283,15 @@ int btrfs_clean...
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
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance, and I found that the bottleneck addresses in the checksum items, especially when we want to make a random write on a large file, e.g a 4G file. Then a idea for this suggested by Chris is to use sub transaction ids and just to log the part of inode that had changed since either the last log commit or the last
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...8/fs/btrfs/inode.c 9/fs/btrfs/inode.c --- 8/fs/btrfs/inode.c 2010-04-18 10:58:20.428947616 +0800 +++ 9/fs/btrfs/inode.c 2010-04-18 10:58:08.253708049 +0800 @@ -3885,7 +3885,7 @@ int btrfs_write_inode(struct inode *inod struct btrfs_trans_handle *trans; int ret = 0; - if (root->fs_info->btree_inode == inode) + if (BTRFS_I(inode)->dummy_inode) return 0; if (wait) { @@ -3906,10 +3906,19 @@ void btrfs_dirty_inode(struct inode *ino { struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_trans_handle *trans; + int ret; + + if (BTRFS_I(inode)->dummy_inode) + return;...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...sfs) 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 Jun 24 21:04:39 2008 -0400 @@ -76,6 +76,11 @@ static unsigned char btrfs_type_by_mode[ [S_IFSOCK >> S_SHIFT...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
..._blocks_free(struct btrfs_root *root, u64 start, u64 len, + u8 factor, u8 index) +{ + u8 i; + int ret; + u64 bytenr, cur; + struct extent_io_tree *tree; + struct extent_buffer *eb; + + if (factor < 2 ) + return 0; + + bytenr = start - len * index; + tree = &((BTRFS_I(root->fs_info->btree_inode))->io_tree); + + for (i = 0; i < factor; i++) { + if (i == index) + continue; + cur = bytenr + len * index; + ret = btrfs_lookup_extent(root, cur, len); + BUG_ON(ret); + if (ret == 0) + return 0; + + rcu_read_lock(); + eb = radix_tree_lookup(&tree->buffer, cur >> PAGE_...
2012 Apr 20
44
Ceph on btrfs 3.4rc
After running ceph on XFS for some time, I decided to try btrfs again. Performance with the current "for-linux-min" branch and big metadata is much better. The only problem (?) I''m still seeing is a warning that seems to occur from time to time: [87703.784552] ------------[ cut here ]------------ [87703.789759] WARNING: at fs/btrfs/inode.c:2103
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...;slots[0], num_to_del); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); btrfs_release_path(extent_root, path); if (is_data) { ret = btrfs_del_csums(trans, root, bytenr, num_bytes); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } else { invalidate_mapping_pages(info->btree_inode->i_mapping, bytenr >> PAGE_CACHE_SHIFT, @@ -4255,7 +4255,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, } ret = update_block_group(trans, root, bytenr, num_bytes, 0); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } btrfs_free_path(path); return...