search for: btrfs_inode

Displaying 20 results from an estimated 29 matches for "btrfs_inode".

2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
.../ static void adjust_free_extents(struct convert_fs *fs, struct extent_io_tree *free_tree) @@ -267,113 +171,6 @@ struct btrfs_extent_ops extent_ops = { .free_extent = custom_free_extent, }; -struct dir_iterate_data { - struct btrfs_trans_handle *trans; - struct btrfs_root *root; - struct btrfs_inode_item *inode; - u64 objectid; - u64 index_cnt; - u64 parent; - int errcode; -}; - -static u8 filetype_conversion_table[EXT2_FT_MAX] = { - [EXT2_FT_UNKNOWN] = BTRFS_FT_UNKNOWN, - [EXT2_FT_REG_FILE] = BTRFS_FT_REG_FILE, - [EXT2_FT_DIR] = BTRFS_FT_DIR, - [EXT2_FT_CHRDEV] = BTRFS_FT_CHRDEV, - [EXT2_FT_...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...k) + return -ENOSPC; + if (first == 0) + first = block; + bytenr = block * blocksize; if (!test_range_bit(&root->fs_info->pinned_extents, bytenr, bytenr + blocksize - 1, EXTENT_DIRTY, 0)) @@ -167,7 +172,7 @@ struct dir_iterate_data { struct btrfs_root *root; struct btrfs_inode_item *inode; u64 objectid; - u32 parent; + u64 parent; int errcode; }; @@ -281,10 +286,9 @@ fail: } /* - * record a single file extent. do all required works: - * 1. insert a btrfs_file_extent_item into fs tree. - * 2. compute checksum and insert btrfs_csum_item into fs tree. - * 3. insert...
2011 Aug 23
0
[PATCH] Btrfs: fix an oops when deleting snapshots
...PTY_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 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...
2012 Jun 11
0
[PATCH] Btrfs: call filemap_fdatawrite twice for compression V2
...2: force_compress doesn''t stay set the entire time and even though it should be fine this way I''d rather not having something this fragile in place that can cause corruption it somebody happens to do it wrong, so add a flag so we know we have async extents on this inode. fs/btrfs/btrfs_inode.h | 1 + fs/btrfs/inode.c | 15 +++++++++------ fs/btrfs/ordered-data.c | 22 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index e616f887..12394a9 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/bt...
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 Apr 09
9
[PATCH] Btrfs: use i_version instead of our own sequence
...le actually use i_version which serves the same purpose, so use i_version where we used the incore inode''s sequence number and that way the sequence is updated properly across the board, and not just in file write. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/btrfs_inode.h | 3 --- fs/btrfs/delayed-inode.c | 4 ++-- fs/btrfs/file.c | 1 - fs/btrfs/inode.c | 5 ++--- fs/btrfs/super.c | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 9b9b15f..3771b85...
2012 Dec 18
0
[PATCH] [RFC] Btrfs: Subpagesize blocksize (WIP).
.../* Allocates an array of extent buffers for the specified page. + * Should be called with the mapping''s spin lock set. */ +static struct extent_buffer *__alloc_extent_buffers(struct extent_io_tree *tree, + struct page *page, + gfp_t mask) +{ + u32 blocksize_bits; + struct btrfs_inode *inode; + struct extent_buffer *eb_head; + struct extent_buffer *eb_cur; + u64 start; + unsigned long len; + int i; + + /* Initialize variables. */ + inode = BTRFS_I(tree->mapping->host); + blocksize_bits = inode->vfs_inode.i_sb->s_blocksize_bits; + + /* Calculate extent buffer dimensio...
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
2007 Aug 09
1
[RFC] All my fsync changes
...000 10240 79.8 6321 AVG: 94.32 files/sec Now I'm kind of uncertain about how I track the last_trans for the inode, I think its right but I'm not entirely sure, so if I need to be doing this elsewhere please let me know. Thanks much, Josef diff -r f6da57af2473 btrfs_inode.h --- a/btrfs_inode.h Wed Aug 08 20:17:12 2007 -0400 +++ b/btrfs_inode.h Thu Aug 09 16:04:17 2007 -0400 @@ -25,6 +25,11 @@ struct btrfs_inode { struct btrfs_block_group_cache *block_group; struct btrfs_key location; struct inode vfs_inode; + + /* + * transid of the trans_handle that last mod...
2009 Aug 21
0
[GIT PULL] btrfs rb corruption fix
...ged, 14 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 272b9b2..59cba18 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3099,8 +3099,12 @@ static void inode_tree_add(struct inode *inode) { struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_inode *entry; - struct rb_node **p = &root->inode_tree.rb_node; - struct rb_node *parent = NULL; + struct rb_node **p; + struct rb_node *parent; + +again: + p = &root->inode_tree.rb_node; + parent = NULL; spin_lock(&root->inode_lock); while (*p) { @@ -3108,13 +3112,16 @@ static...
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
...rfs: add checksum check for log Btrfs: fix a bug of log check Btrfs: kick off useless code Btrfs: deal with EEXIST after iput Btrfs: use the right generation number to read log_root_tree Revert "Btrfs: do not flush csum items of unchanged file data during treelog" fs/btrfs/btrfs_inode.h | 12 ++- fs/btrfs/ctree.c | 69 +++++++++--- fs/btrfs/ctree.h | 5 +- fs/btrfs/disk-io.c | 12 +- fs/btrfs/extent-tree.c | 10 +- fs/btrfs/file.c | 22 ++--- fs/btrfs/inode.c | 33 ++++--- fs/btrfs/ioctl.c | 6 +- fs/btrfs/relocation.c | 6...
2011 Jan 04
16
[PATCH v2 0/5] add new ioctls to do metadata readahead in btrfs
Hi, We have file readahead 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
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
...lookup of a subvolume root. I also changed btrfs_insert_dir_item to take an index flag to indicate whether or not we want to add a DIR_INDEX item along with the dir item. Let me know if there are any glaring design problems with what I''ve done. Thanks much, Josef diff -r 99b12e2db0f8 btrfs_inode.h --- a/btrfs_inode.h Wed Jun 18 20:50:41 2008 -0400 +++ b/btrfs_inode.h Tue Jun 24 21:04:39 2008 -0400 @@ -36,6 +36,9 @@ struct btrfs_inode { struct posix_acl *i_acl; struct posix_acl *i_default_acl; + /* for keeping track of orphaned inodes */ + struct list_head i_orphan; + u64 ordered_tr...
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 the...
2011 Apr 27
2
btrfs-convert crashes
...0x7fffffffe1c0, objectid = 37359706, index_cnt = 150, parent = 37359705, errcode = 0} ret =<value optimized out> #9 copy_single_inode (devname=0x7fffffffe897 "/dev/sdc1", datacsum=1, packing=1, noxattr=0) at convert.c:1072 ret =<value optimized out> btrfs_inode = {generation = 1, transid = 140737354044640, size = 4994, nbytes = 0, block_group = 0, nlink = 1, uid = 1000, gid = 1000, mode = 16877, rdev = 0, flags = 0, sequence = 140737351933932, reserved = {0, 140737354040256, 140733193388033, 0}, atime = {sec = 1303466526, nsec = 0}, ctime = {...
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
2011 May 16
0
[PATCH v5 12/21] evm: add evm_inode_post_init call in btrfs
...rfs/xattr.c b/fs/btrfs/xattr.c index cfd6605..df07619 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -22,6 +22,7 @@ #include <linux/rwsem.h> #include <linux/xattr.h> #include <linux/security.h> +#include <linux/evm.h> #include "ctree.h" #include "btrfs_inode.h" #include "transaction.h" @@ -367,31 +368,49 @@ int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, const struct qstr *qstr) { int err; - size_t len; - void *value; - char *suffix; + struct xattr lsm_xattr; + struct xattr evm_xattr; char *name; - err =...
2011 Jun 02
0
[PATCH v6 11/20] evm: add evm_inode_post_init call in btrfs
...fs/xattr.c b/fs/btrfs/xattr.c index f3107e4..8e9afcb2 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -22,6 +22,7 @@ #include <linux/rwsem.h> #include <linux/xattr.h> #include <linux/security.h> +#include <linux/evm.h> #include "ctree.h" #include "btrfs_inode.h" #include "transaction.h" @@ -367,31 +368,49 @@ int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, const struct qstr *qstr) { int err; - size_t len; - void *value; - char *suffix; + struct xattr lsm_xattr; + struct xattr evm_xattr; char *name; - err =...
2009 Jun 13
1
[PATCH 1/3] Add ioctl to set per file 'compress' flag
An ioctl is needed to set compress flag (i.e. clear BTRFS_INODE_NOCOMPRESS flag) on per file basis. This patch adds that. Introduces a generic function to be used by subsequent patches. Signed-off-by: Amit Gud <gud@ksu.edu> Index: newformat2/fs/btrfs/ioctl.c =================================================================== --- newformat2.orig/fs/btr...