search for: btrfs_i_size_writ

Displaying 10 results from an estimated 10 matches for "btrfs_i_size_writ".

Did you mean: btrfs_i_size_write
2010 Jun 12
0
[PATCH] Btrfs: fix CLONE ioctl destination file size expansion to block boundary
..., slot); read_extent_buffer(leaf, buf, @@ -1712,9 +1713,18 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, btrfs_release_path(root, path); inode->i_mtime = inode->i_ctime = CURRENT_TIME; - if (new_key.offset + datal > inode->i_size) - btrfs_i_size_write(inode, - new_key.offset + datal); + + /* + * we round up to the block size at eof when + * determining which extents to clone above, + * but shouldn''t round up the file size + */ + endoff = new_key.offset + datal; + if (endoff > off+olen) + endoff = off+ole...
2011 Jun 08
1
[PATCH] Btrfs: use join_transaction in btrfs_evict_inode()
...lizf@cn.fujitsu.com> --- fs/btrfs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 02ff4a1..4e9aa28 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3646,7 +3646,7 @@ void btrfs_evict_inode(struct inode *inode) btrfs_i_size_write(inode, 0); while (1) { - trans = btrfs_start_transaction(root, 0); + trans = btrfs_join_transaction(root); BUG_ON(IS_ERR(trans)); trans->block_rsv = root->orphan_block_rsv; -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the bo...
2011 Aug 08
0
[PATCH] Btrfs: fix how we reserve space for deleting inodes
...fs/inode.c | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 54b11ad..4aa4ea9 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3552,18 +3552,24 @@ void btrfs_evict_inode(struct inode *inode) btrfs_i_size_write(inode, 0); + /* + * This is a bit simpler than btrfs_truncate since + * + * 1) We''ve already reserved our space for our orphan item in the + * unlink. + * 2) We''re going to delete the inode item, so we don''t need to update + * it at all. + * + * So we jus...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
....objectid + ins.offset; - btrfs_unreserve_metadata_space(root, 1); - } -out: - if (cur_offset > start) { + inode->i_ctime = CURRENT_TIME; BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; if (!(mode & FALLOC_FL_KEEP_SIZE) && - cur_offset > i_size_read(inode)) - btrfs_i_size_write(inode, cur_offset); + cur_offset > inode->i_size) { + i_size_write(inode, cur_offset); + btrfs_ordered_update_i_size(inode, cur_offset, NULL); + } + ret = btrfs_update_inode(trans, root, inode); BUG_ON(ret); + + btrfs_end_transaction(trans, root); + btrfs_unreserve_metada...
2012 Jul 31
0
[PATCH V2 1/2] Btrfs: fix error path in create_pending_snapshot()
...gt;dentry; @@ -980,17 +979,16 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, BTRFS_FT_DIR, index); if (ret == -EEXIST) { pending->error = -EEXIST; - dput(parent); goto fail; } else if (ret) { - goto abort_trans_dput; + goto abort_trans; } btrfs_i_size_write(parent_inode, parent_inode->i_size + dentry->d_name.len * 2); ret = btrfs_update_inode(trans, parent_root, parent_inode); if (ret) - goto abort_trans_dput; + goto abort_trans; /* * pull in the delayed directory update @@ -999,10 +997,8 @@ static noinline int create_pendin...
2012 Sep 06
2
[PATCH V4 01/12] Btrfs: fix error path in create_pending_snapshot()
...t;dentry; @@ -1018,10 +1016,9 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, BTRFS_FT_DIR, index); if (ret == -EEXIST) { pending->error = -EEXIST; - dput(parent); goto fail; } else if (ret) { - goto abort_trans_dput; + goto abort_trans; } btrfs_i_size_write(parent_inode, parent_inode->i_size + @@ -1029,7 +1026,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, parent_inode->i_mtime = parent_inode->i_ctime = CURRENT_TIME; ret = btrfs_update_inode(trans, parent_root, parent_inode); if (ret) - goto abort_t...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...++++++++++---------- fs/btrfs/xattr.c | 6 +- 15 files changed, 347 insertions(+), 341 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 6ad63f1..8a6a2d9 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -173,4 +173,10 @@ static inline void btrfs_i_size_write(struct inode *inode, u64 size) BTRFS_I(inode)->disk_i_size = size; } +/* + * This macro documents all the places in the btrfs code where we''re failing + * to correctly handle a recoverable error condition. + */ +#define btrfs_fixable_bug_on(_err) BUG_ON(_err) + #endif diff --git...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/ctree.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git
2012 Feb 13
23
Set nodatacow per file?
Hello, is it possible to set nodatacow on a per-file basis? I couldn''t find anything. If not, wouldn''t that be a great feature to get around the performance issues with VM and database storage? Of course cloning should still cause COW. Thanks, Ralf-Peter -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...gt;= block_end) break; + /* 1 item for the file extent */ + err = btrfs_extend_transaction(trans, root, 1); + if (err) + break; } btrfs_end_transaction(trans, root); @@ -3009,7 +3040,17 @@ void btrfs_delete_inode(struct inode *inode) btrfs_wait_ordered_range(inode, 0, (u64)-1); btrfs_i_size_write(inode, 0); - trans = btrfs_join_transaction(root, 1); + + /* + * 1 for the orphan entry + * 1 for the inode + */ + trans = btrfs_join_transaction(root, 2); + if (IS_ERR(trans)) { + WARN_ON(1); + btrfs_orphan_del(NULL, inode); + goto no_delete; + } btrfs_set_trans_block_group(trans, inode...