search for: btrfs_update_inode

Displaying 20 results from an estimated 33 matches for "btrfs_update_inode".

2011 Sep 08
1
[PATCH] Btrfs: fix direct-io vs nodatacow
...) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0ccc743..3bd35fe 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5785,8 +5785,7 @@ again: if (test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) { ret = btrfs_ordered_update_i_size(inode, 0, ordered); if (!ret) - ret = btrfs_update_inode(trans, root, inode); - err = ret; + err = btrfs_update_inode(trans, root, inode); goto out; } -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.or...
2007 Aug 23
2
give me some works
hello, Chris In the next several months, I will have a lot of spare time. I will be happy if you assign some work to me. I have learn linux kernel for years but only fix a few small bugs in IP stack. In the past few months, I read some EXT4/VFS codes. I began reading source of btrfs ten days ago and have read it twice now. Regards YZ
2010 Jan 22
2
[PATCH -v2] btrfs: Use correct values when updating inode i_size on fallocate
...LL); + (actual_len > inode->i_size) && + (cur_offset > inode->i_size)) { + + if (cur_offset > actual_len) + i_size = actual_len; + else + i_size = cur_offset; + i_size_write(inode, i_size); + btrfs_ordered_update_i_size(inode, i_size, NULL); } ret = btrfs_update_inode(trans, root, inode); @@ -5930,7 +5937,7 @@ static long btrfs_fallocate(struct inode *inode, int mode, !test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) { ret = prealloc_file_range(inode, cur_offset, last_byte, - alloc_hint, mode); + alloc_hint, mode, offset+len);...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...et); + btrfs_fixable_bug_on(ret); btrfs_free_path(path); return 0; @@ -1677,7 +1677,7 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) btrfs_set_trans_block_group(trans, inode); trans->block_rsv = &root->fs_info->delalloc_block_rsv; ret = btrfs_update_inode(trans, root, inode); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } goto out; } @@ -1698,7 +1698,7 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) ordered_extent->file_offset, ordered_extent->file_offset + ordered_extent->len);...
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
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...phan_dir_item(struct btrfs_trans_handle + *trans, + struct btrfs_root *root, + struct btrfs_path *path, + int mod); + /* inode-map.c */ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, struct btrfs_root *fs_root, @@ -1607,7 +1622,7 @@ int btrfs_update_inode(struct btrfs_tran int btrfs_update_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode); - +struct inode *btrfs_lookup_orphan_dir(struct btrfs_root *root); /* ioctl.c */ long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);...
2010 Nov 19
1
Btrfs_truncate ?
Hi list This happened when running an iozone test over ceph, it was doing lots of random reads. I have no idea how to properly interpret this, I should find it out. Let me know if you need something else. Thanks! [69003.803272] ------------[ cut here ]------------ [69003.807987] kernel BUG at fs/btrfs/inode.c:6230! [69003.807987] invalid opcode: 0000 [#1] SMP [69003.807987] last sysfs file:
2009 Feb 02
5
[PATCH] btrfs: call mark_inode_dirty when i_size is updated
...-rc3/fs/btrfs/file.c --- linux-2.6.29-rc3.org/fs/btrfs/file.c 2009-02-02 16:53:18.000000000 +0900 +++ linux-2.6.29-rc3/fs/btrfs/file.c 2009-02-02 18:21:00.000000000 +0900 @@ -152,7 +152,7 @@ static noinline int dirty_and_release_pa } if (end_pos > isize) { i_size_write(inode, end_pos); - btrfs_update_inode(trans, root, inode); + mark_inode_dirty(inode); } err = btrfs_end_transaction(trans, root); out_unlock: -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/maj...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...@@ -3329,6 +3334,7 @@ again: } ClearPageChecked(page); set_page_dirty(page); + i_size_write(inode, from); unlock_extent_cached(io_tree, page_start, page_end, &cached_state, GFP_NOFS); @@ -3459,7 +3465,9 @@ static int btrfs_setsize(struct inode *inode, loff_t newsize) ret = btrfs_update_inode(trans, root, inode); btrfs_end_transaction_throttle(trans, root); } else { - + btrfs_wait_ordered_range(inode, + newsize & ~(root->sectorsize - 1), + (u64)-1); /* * We''re truncating a file that used to have good data down to * zero. Make sure it gets into...
2013 Oct 16
3
trivial cleanups
Hi gang, Here''s some trivial cleanups that I''ve built up while reading through the code. They''ve been run through xfstests -g quick. - z -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2010 Jun 12
0
[PATCH] Btrfs: fix CLONE ioctl destination file size expansion to block boundary
...e, + * but shouldn''t round up the file size + */ + endoff = new_key.offset + datal; + if (endoff > off+olen) + endoff = off+olen; + if (endoff > inode->i_size) + btrfs_i_size_write(inode, endoff); + BTRFS_I(inode)->flags = BTRFS_I(src)->flags; ret = btrfs_update_inode(trans, root, inode); BUG_ON(ret); -- 1.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2010 Jul 01
0
[PATCH] btrfs: handle errors for FS_IOC_SETFLAGS
...62c2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -200,19 +200,26 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) trans = btrfs_join_transaction(root, 1); - BUG_ON(!trans); + if (IS_ERR(trans)) { + ret = PTR_ERR(trans); + goto out_drop_write; + } ret = btrfs_update_inode(trans, root, inode); - BUG_ON(ret); + if (ret) + goto out_endtrans; btrfs_update_iflags(inode); inode->i_ctime = CURRENT_TIME; - btrfs_end_transaction(trans, root); + ret = 0; +out_endtrans: + btrfs_end_transaction(trans, root); +out_drop_write: mnt_drop_write(file->f_path.mnt); -...
2010 Nov 22
0
[PATCH] Btrfs: fix typo in fallocate to make it honor actual size
...); + i_size = actual_len; else - i_size_write(inode, cur_offset); - i_size_write(inode, cur_offset); - btrfs_ordered_update_i_size(inode, cur_offset, NULL); + i_size = cur_offset; + i_size_write(inode, i_size); + btrfs_ordered_update_i_size(inode, i_size, NULL); } ret = btrfs_update_inode(trans, root, inode); -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2012 Nov 08
0
[PATCH] Btrfs: set hole punching time properly
...ex 110d3cb..15fecc1 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1964,6 +1964,9 @@ out_trans: if (!trans) goto out_free; + inode_inc_iversion(inode); + inode->i_mtime = inode->i_ctime = CURRENT_TIME; + trans->block_rsv = &root->fs_info->trans_block_rsv; ret = btrfs_update_inode(trans, root, inode); nr = trans->blocks_used; -- 1.7.12.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
...k; + } else { + if (!(ip->flags & flag)) + goto out_unlock; + } + + ret = mnt_want_write(file->f_path.mnt); + if (ret) + goto out_unlock; + + if (set) + ip->flags |= flag; + else + ip->flags &= ~flag; + + trans = btrfs_join_transaction(root, 1); + BUG_ON(!trans); + + ret = btrfs_update_inode(trans, root, inode); + BUG_ON(ret); + + inode->i_ctime = CURRENT_TIME; + btrfs_end_transaction(trans, root); + + mnt_drop_write(file->f_path.mnt); + out_unlock: + mutex_unlock(&inode->i_mutex); + return 0; +} + long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...EALLOC; 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_metadata_space(root, 3); } - return ret; } @@ -5641,8 +5705,6 @@ static long btrfs_fallocate(struct inode u64 locked_end; u64 mask = BTRFS_I(inode)->root->sectorsize - 1; struct ext...
2012 Jul 31
0
[PATCH V2 1/2] Btrfs: fix error path in create_pending_snapshot()
...*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_pending_snapshot(struct btrfs_trans_handle *trans, * snapshot */ ret = btrfs_run_delayed_items(trans,...
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...+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; trans = btrfs_join_transaction(root, 1); btrfs_set_trans_block_group(trans, inode); - btrfs_update_inode(trans, root, inode); + + ret = btrfs_update_inode(trans, root, inode); + if (ret) + printk(KERN_ERR"btrfs: fail to dirty inode %lu error %d\n", + inode->i_ino, ret); + btrfs_end_transaction(trans, root); } Only in 9/fs/btrfs: inode.c.rej diff -urp 8/fs/btrfs/ioctl.c 9/fs/btrfs/...
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
...+ if (ret) { + btrfs_abort_transaction(trans, root, ret); + btrfs_end_transaction(trans, root); + return ret; + } + + ret = btrfs_insert_file_extent(trans, root, btrfs_ino(inode), offset, + 0, 0, len, 0, len, 0, 0, 0); + if (ret) + btrfs_abort_transaction(trans, root, ret); + else + btrfs_update_inode(trans, root, inode); + btrfs_end_transaction(trans, root); + return ret; +} + /* * This function puts in dummy file extents for the area we''re creating a hole * for. So if we are truncating this file to a larger size we need to insert @@ -4212,7 +4255,6 @@ out: */ int btrfs_cont_e...
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...ze_write(inode, actual_len); else - i_size = cur_offset; - i_size_write(inode, i_size); - btrfs_ordered_update_i_size(inode, i_size, NULL); + i_size_write(inode, cur_offset); + i_size_write(inode, cur_offset); + btrfs_ordered_update_i_size(inode, cur_offset, NULL); } ret = btrfs_update_inode(trans, root, inode); @@ -6215,16 +6219,16 @@ static long btrfs_fallocate(struct inode if (em->block_start == EXTENT_MAP_HOLE || (cur_offset >= inode->i_size && !test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) { - ret = prealloc_file_range(inode, - cur...