Displaying 8 results from an estimated 8 matches for "btrfs_inode_ref_key".
2008 Jul 20
26
[PATCH] NFS support for btrfs - v2
...return len;
+
+}
+
+static struct dentry * btrfs_get_dentry(struct super_block *sb,
+ u64 objectid, u64 root_objectid, u32 generation)
+{
+ struct btrfs_root *root;
+ struct inode *inode;
+ struct dentry *result;
+ struct btrfs_key key;
+
+ key.objectid = objectid;
+ btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY);
+ key.offset = 0;
+
+ root = btrfs_lookup_fs_root(btrfs_sb(sb)->fs_info, root_objectid);
+ inode = btrfs_iget(sb, &key, root, NULL);
+ if (IS_ERR(inode))
+ return (void *)inode;
+
+ if(generation != inode->i_generation) {
+ iput(inode);
+ return ERR_PTR(-ESTALE);
+ }
+
+ result = d_a...
2010 Nov 17
0
[PATCH] Btrfs: handle NFS lookups properly
...;i_ino == BTRFS_FIRST_FREE_OBJECTID) {
+ key.objectid = BTRFS_I(inode)->root->root_key.objectid;
+ key.type = BTRFS_ROOT_BACKREF_KEY;
+ key.offset = (u64)-1;
+ root = root->fs_info->tree_root;
+ } else {
+ key.objectid = inode->i_ino;
+ key.offset = dir->i_ino;
+ key.type = BTRFS_INODE_REF_KEY;
+ }
+
+ ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
+ if (ret < 0) {
+ btrfs_free_path(path);
+ return ret;
+ } else if (ret > 0) {
+ if (inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) {
+ path->slots[0]--;
+ } else {
+ btrfs_free_path(path);
+ return -ENOENT;
+ }...
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
...;
+ sctx->cur_inode_last_extent = (u64)-1;
/*
* Set send_progress to current inode. This will tell all get_cur_xxx
@@ -4508,14 +4648,18 @@ static int changed_cb(struct btrfs_root *left_root,
struct send_ctx *sctx = ctx;
if (result == BTRFS_COMPARE_TREE_SAME) {
- if (key->type != BTRFS_INODE_REF_KEY &&
- key->type != BTRFS_INODE_EXTREF_KEY)
- return 0;
- ret = compare_refs(sctx, left_path, key);
- if (!ret)
+ if (key->type == BTRFS_INODE_REF_KEY ||
+ key->type == BTRFS_INODE_EXTREF_KEY) {
+ ret = compare_refs(sctx, left_path, key);
+ if (!ret)
+ return 0;...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...10 @@ struct btrfs_root {
/* the dirty list is only used by non-reference counted roots */
struct list_head dirty_list;
+
+ /* orphan crap */
+ struct inode *orphan_dir;
+ struct list_head orphan_list;
};
/*
@@ -624,6 +629,7 @@ struct btrfs_root {
#define BTRFS_INODE_ITEM_KEY 1
#define BTRFS_INODE_REF_KEY 2
#define BTRFS_XATTR_ITEM_KEY 8
+#define BTRFS_ORPHAN_DIR_ITEM_KEY 9
/* reserve 2-15 close to the inode for later flexibility */
/*
@@ -1485,7 +1491,7 @@ int btrfs_find_dead_roots(struct btrfs_r
/* dir-item.c */
int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...btrfs_path *path;
struct btrfs_key key;
@@ -93,7 +93,7 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
int ret;
int del_len = name_len + sizeof(*ref);
- key.objectid = inode_objectid;
+ key.objectid = btrfs_ino(inode);
key.offset = ref_objectid;
btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY);
@@ -103,7 +103,8 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
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) {
ret = -E...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi,
The following patches add support for ext4 and btrfs to
PV-GRUB. These patches are taken nearly verbatim from those provided
by Fedora and Gentoo.
We''ve been using these patches for the PV-GRUB images available in EC2
for some time now with no problems.
Changes from v1:
- Makefile has been changed to check the exit code from patch
- The btrfs patch has been rebased to apply
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found
the very last bug in my current scrub patch series:
Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end
Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...;
@@ -1642,7 +1642,7 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
if (key.type == BTRFS_XATTR_ITEM_KEY) {
ret = overwrite_item(wc->trans, root, path,
eb, i, &key);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
} else if (key.type == BTRFS_INODE_REF_KEY) {
ret = add_inode_ref(wc->trans, root, log, path,
eb, i, &key);
@@ -1650,12 +1650,12 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
} else if (key.type == BTRFS_EXTENT_DATA_KEY) {
ret = replay_one_extent(wc->trans, root, path,...