search for: btrfs_ino

Displaying 20 results from an estimated 24 matches for "btrfs_ino".

2011 Aug 17
2
[PATCH] btrfs: fix d_off in the first dirent
....c b/fs/btrfs/inode.c index 15fceef..9c1297b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4125,7 +4125,8 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, /* special case for "." */ if (filp->f_pos == 0) { - over = filldir(dirent, ".", 1, 1, btrfs_ino(inode), DT_DIR); + over = filldir(dirent, ".", 1, + filp->f_pos, inode->i_ino, DT_DIR); if (over) return 0; filp->f_pos = 1; @@ -4134,7 +4135,7 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, if (filp->f_pos == 1) { u64 pino = parent_...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
This patch introduce extent buffer cache for every i-node. By this way, we can save the search time and reduce the lock contention of the root because we needn''t search the item from the root of b+ tree. Implementation: - add two pointers of extent buffer into btrfs_inode struct, one for nodes/leaves of fs/file tree, the other for nodes/leaves of the log tree. - add a variant to tell us that it is still in the b+ tree. - When we want to search fs/file trees or the relative log trees, we will try to search the cached extent buffer at first, if we can not find t...
2011 Aug 09
2
[PATCH] Btrfs: truncate pages from clone ioctl target range
...file *file, unsigned long srcfd, btrfs_wait_ordered_range(src, off, len); } + /* truncate page cache pages from target inode range */ + truncate_inode_pages_range(&inode->i_data, off, + ((off+len+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)-1); + /* clone data */ key.objectid = btrfs_ino(src); key.type = BTRFS_EXTENT_DATA_KEY; -- 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
2011 Nov 09
12
WARNING: at fs/btrfs/inode.c:2198 btrfs_orphan_commit_root+0xa8/0xc0
Hello, I''m seeing a lot of warnings in dmesg with a BTRFS filesystem. I''m using the 3.1 kernel, I found a patch for these warnings ( http://marc.info/?l=linux-btrfs&m=131547325515336&w=2) <http://marc.info/?l=linux-btrfs&m=131547325515336&w=2>, but that patch has already been included in 3.1. Are there any other patches I can try? I''m using
2012 Oct 01
1
[RFC] [PATCH] Btrfs: rework can_nocow_odirect
...node)->root; - struct btrfs_file_extent_item *fi; - struct btrfs_key key; u64 disk_bytenr; u64 backref_offset; u64 extent_end; u64 num_bytes; - int slot; - int found_type; - - path = btrfs_alloc_path(); - if (!path) - return -ENOMEM; - - ret = btrfs_lookup_file_extent(trans, root, path, btrfs_ino(inode), - offset, 0); - if (ret < 0) - goto out; - slot = path->slots[0]; - if (ret == 1) { - if (slot == 0) { - /* can''t find the item, must cow */ - ret = 0; - goto out; - } - slot--; - } - ret = 0; - leaf = path->nodes[0]; - btrfs_item_key_to_cpu(leaf, &am...
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
....c index b93d1c9..6516739 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1963,11 +1963,13 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, struct btrfs_key key; int ret; + if (btrfs_fs_incompat(root->fs_info, NO_HOLES)) + goto out; + key.objectid = btrfs_ino(inode); key.type = BTRFS_EXTENT_DATA_KEY; key.offset = offset; - ret = btrfs_search_slot(trans, root, &key, path, 0, 1); if (ret < 0) return ret; @@ -2064,8 +2066,10 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) u64 drop_end; int ret = 0; i...
2011 Aug 23
0
[PATCH] Btrfs: fix an oops when deleting snapshots
...lt;ffffffffa054f7b9>] btrfs_orphan_add+0x179/0x1a0 [btrfs] When it comes to btrfs_lookup_dentry, we may set a snapshot''s inode->i_ino to BTRFS_EMPTY_SUBVOL_DIR_OBJECTID instead of BTRFS_FIRST_FREE_OBJECTID, while the snapshot''s location.objectid remains unchanged. However, btrfs_ino() does not take this into account, and returns a wrong ino, and causes the oops. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> --- fs/btrfs/btrfs_inode.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 50...
2012 Sep 13
0
[PATCH] btrfs: return EPERM upon rmdir on a subvolume
...s/btrfs/inode.c index a4167ef..a67dadd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3815,9 +3815,10 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) struct btrfs_trans_handle *trans; unsigned long nr = 0; - if (inode->i_size > BTRFS_EMPTY_DIR_SIZE || - btrfs_ino(inode) == BTRFS_FIRST_FREE_OBJECTID) + if (inode->i_size > BTRFS_EMPTY_DIR_SIZE) return -ENOTEMPTY; + if (btrfs_ino(inode) == BTRFS_FIRST_FREE_OBJECTID) + return -EPERM; trans = __unlink_start_trans(dir, dentry); if (IS_ERR(trans)) -- 1.7.9 -- To unsubscribe from this list: send t...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...s = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto out; } btrfs_orphan_del(trans, inode); @@ -2848,6 +2849,8 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, u64 dir_ino = btrfs_ino(dir); trans = btrfs_start_transaction(root, 10); + if (IS_ERR(trans)) + btrfs_abort_transaction(root, PTR_ERR(trans)); if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC) return trans; @@ -2874,6 +2877,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, if (IS_...
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
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range belongs to defragment so that we can implement snapshow-aware defrag: We set the EXTENT_DEFRAG flag when dirtying the extents that need defragmented, so later on writeback thread can differentiate between normal writeback and writeback started by defragmentation. This patch is used for the latter one. Originally patch
2011 Aug 08
0
[PATCH] Btrfs: fix how we reserve space for deleting inodes
...root->orphan_block_rsv; ret = btrfs_orphan_del(trans, inode); BUG_ON(ret); } + trans->block_rsv = &root->fs_info->trans_block_rsv; if (!(root == root->fs_info->tree_root || root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID)) btrfs_return_ino(root, btrfs_ino(inode)); -- 1.7.5.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
2011 Aug 18
0
[PATCH 3/3] Btrfs: fix unclosed transaction handle in btrfs_cont_expand()
...node *inode, loff_t oldsize, loff_t size) err = btrfs_drop_extents(trans, inode, cur_offset, cur_offset + hole_size, &hint_byte, 1); - if (err) + if (err) { + btrfs_end_transaction(trans, root); break; + } err = btrfs_insert_file_extent(trans, root, btrfs_ino(inode), cur_offset, 0, 0, hole_size, 0, hole_size, 0, 0, 0); - if (err) + if (err) { + btrfs_end_transaction(trans, root); break; + } btrfs_drop_extent_cache(inode, hole_start, last_byte - 1, 0); -- 1.7.4 -- To unsubscribe from this list: send the line "u...
2013 Mar 01
0
[PATCH 1/2] Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails
...flush); + if (ret && root->fs_info->quota_enabled) { + btrfs_qgroup_free(root, num_bytes + + nr_extents * root->leafsize); + } + } if (ret) { u64 to_free = 0; @@ -4805,10 +4810,6 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes) btrfs_ino(inode), to_free, 0); } - if (root->fs_info->quota_enabled) { - btrfs_qgroup_free(root, num_bytes + - nr_extents * root->leafsize); - } if (delalloc_lock) mutex_unlock(&BTRFS_I(inode)->delalloc_mutex); return ret; -- 1.7.7.6 -- To unsubscribe from...
2014 Apr 23
0
[PATCH 001/001] btrfs: Mechanism to modify the permission of a subvolume
...*arg) +{ + struct btrfs_ioctl_vol_args_v2 *vol_args; + struct inode *inode = file_inode(file); + struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_trans_handle *trans; + u64 root_flags; + u64 flags; + int ret = 0; + + ret = mnt_want_write_file(file); + if (ret) + goto out; + + if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) { + ret = -EINVAL; + goto out_drop_write; + } + vol_args = memdup_user(arg, sizeof(*vol_args)); + if (IS_ERR(vol_args)) + goto out_drop_write; + vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; + flags = vol_args->flags; + if (!inode_owner_or_capab...
2011 Nov 30
1
[PATCH] Canonicalise BTRFS: and Btrfs: to btrfs:
...ct inode *inode) spin_lock(&root->orphan_lock); if (!list_empty(&BTRFS_I(inode)->i_orphan)) { - printk(KERN_INFO "BTRFS: inode %llu still on the orphan list\n", + printk(KERN_INFO "btrfs: inode %llu still on the orphan list\n", (unsigned long long)btrfs_ino(inode)); list_del_init(&BTRFS_I(inode)->i_orphan); } -- 1.7.4.1 -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP
2012 Jul 31
0
[PATCH V2 1/2] Btrfs: fix error path in create_pending_snapshot()
...s_tree_unlock(tmp); free_extent_buffer(tmp); if (ret) - goto abort_trans_dput; + goto abort_trans; /* * insert root back/forward references @@ -1053,9 +1049,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, parent_root->root_key.objectid, btrfs_ino(parent_inode), index, dentry->d_name.name, dentry->d_name.len); - dput(parent); if (ret) - goto fail; + goto abort_trans; key.offset = (u64)-1; pending->snap = btrfs_read_fs_root_no_name(root->fs_info, &key); @@ -1067,15 +1062,15 @@ static noinline int create_pending...
2012 Sep 06
2
[PATCH V4 01/12] Btrfs: fix error path in create_pending_snapshot()
...s_tree_unlock(tmp); free_extent_buffer(tmp); if (ret) - goto abort_trans_dput; + goto abort_trans; /* * insert root back/forward references @@ -1106,9 +1101,8 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, parent_root->root_key.objectid, btrfs_ino(parent_inode), index, dentry->d_name.name, dentry->d_name.len); - dput(parent); if (ret) - goto fail; + goto abort_trans; key.offset = (u64)-1; pending->snap = btrfs_read_fs_root_no_name(root->fs_info, &key); @@ -1120,15 +1114,15 @@ static noinline int create_pending...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
..., + struct inode *inode, + u64 new_size, u32 min_type) { struct btrfs_path *path; struct extent_buffer *leaf; @@ -3131,6 +3131,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, struct btrfs_key found_key; u64 mask = root->sectorsize - 1; u64 ino = btrfs_ino(inode); + u64 old_size = i_size_read(inode); u32 found_type; int pending_del_nr = 0; int pending_del_slot = 0; @@ -3138,6 +3139,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, int err = 0; BUG_ON(new_size > 0 && min_type != BTRFS_EXTENT_DATA_KEY); + BUG_...
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
...e access to each file before deduping. For the source, we only check that it is opened for read. Target files have to be open for write. - don''t dedupe on readonly submounts (this is to maintain - check that we don''t dedupe files with different checksumming states (compare BTRFS_INODE_NODATASUM flags) - get and maintain write access to the mount during the extent same operation (mount_want_write()) - allocate our read buffers up front in btrfs_ioctl_file_extent_same() and pass them through for re-use on every call to btrfs_extent_same(). (thanks to David Sterba <dst...