search for: btrfs_truncate_inode_item

Displaying 8 results from an estimated 8 matches for "btrfs_truncate_inode_item".

2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...Truncate inline items is special, we will do it by * btrfs_truncate_page(); */ if (offset < new_size) @@ -3121,9 +3121,9 @@ static int btrfs_release_and_test_data_extent(struct btrfs_trans_handle *trans, * will kill all the items on this inode, including the INODE_ITEM_KEY. */ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, - struct btrfs_root *root, - struct inode *inode, - u64 new_size, u32 min_type) + struct btrfs_root *root, + struct inode *inode, + u64 new_size, u32 min_type) { struct btrfs_path *path; struct extent_b...
2011 Aug 08
0
[PATCH] Btrfs: fix how we reserve space for deleting inodes
...root); - BUG_ON(ret); - continue; + trans = btrfs_start_transaction(root, 2); + if (IS_ERR(trans)) { + printk(KERN_WARNING "Could not get space for a " + "delete, will truncate on mount\n"); + btrfs_orphan_del(NULL, inode); + goto no_delete; } ret = btrfs_truncate_inode_items(trans, root, inode, 0, 0); @@ -3574,14 +3580,15 @@ void btrfs_evict_inode(struct inode *inode) btrfs_end_transaction(trans, root); trans = NULL; btrfs_btree_balance_dirty(root, nr); - } if (ret == 0) { + trans->block_rsv = root->orphan_block_rsv; ret = btrfs_orphan_del(tra...
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
...s past the new EOF + /* for regular files, make sure corresponding + * orhpan item exist. extents past the new EOF + * will be truncated later by orphan cleanup. */ if (S_ISREG(mode)) { - inode = read_one_inode(root, - key.objectid); - BUG_ON(!inode); - - ret = btrfs_truncate_inode_items(wc->trans, - root, inode, inode->i_size, - BTRFS_EXTENT_DATA_KEY); + ret = insert_orphan_item(wc->trans, root, + key.objectid); BUG_ON(ret); - - /* if the nlink count is zero here, the iput - * will free the inode. We bump it to make - * sure it doesn...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...ir, struct dentry *dentry) return -ENOTEMPTY; } + /* 1 for the orphan item */ trans = btrfs_start_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans); + btrfs_set_trans_block_group(trans, dir); err = btrfs_orphan_add(trans, inode); @@ -2610,12 +2634,15 @@ noinline int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, BUG_ON(!path); path->reada = -1; - /* FIXME, add redo link to tree so we don''t leak on crash */ key.objectid = inode->i_ino; key.offset = (u64)-1; key.type = (u8)-1; search_again: + ret = btrfs_extend_transaction(trans, root, 1); + if...
2010 Mar 02
3
2.6.33 high cpu usage
With the ATI bug I was hitting earlier fixed, only my btrfs partition continues to show high cpu usage for some operations. Rsync, git pull, git checkout and svn up are typicall operations which trigger the high cpu usage. As an example, this perf report is from using git checkout to change to a new branch; the change needed to checkout 208 files out of about 1600 total files. du(1) reports
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
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...rfs_unlink_subvol(struct btrfs_trans_handle *trans, if (!path) return -ENOMEM; - di = btrfs_lookup_dir_item(trans, root, path, dir_ino, + di = btrfs_lookup_dir_item(trans, root, dir, path, dir_ino, name, name_len, -1); if (IS_ERR_OR_NULL(di)) { if (!di) @@ -3281,7 +3282,8 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, search_again: path->leave_spinning = 1; - ret = btrfs_search_slot(trans, root, &key, path, -1, 1); + ret = btrfs_search_slot_for_inode(trans, root, inode, &key, + path, -1, 1); if (ret < 0) { err = ret; goto out; @@ -3296,6 +3298,7...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt