search for: btrfs_root_backref_key

Displaying 5 results from an estimated 5 matches for "btrfs_root_backref_key".

2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...0x9123683E #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 @@ -8,6 +11,40 @@ #define BTRFS_CSUM_SIZE 32 #define BTRFS_FSID_SIZE 16 +typedef __u64 u64; +typedef __u32 u32; +typedef __u16 u16; +typedef __u8 u8; +typedef u64 __le64; +typedef u16 __le16; + +#define BTRFS_ROOT_BACKREF_KEY 144 +#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL +#define BTRFS_DIR_ITEM_KEY 84 + +/* + * * this is used for both forward and backward root refs + * */ +struct btrfs_root_ref { + __le64 dirid; + __le64 sequence; + __le16 name_len; +} __attribute__ ((__packed__)); + +stru...
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com> This patch adds creation-time to the snapshot list display, which would help user to better manage the snapshots when number of snapshots grow substantially. This patch is developed and on top of the send/receive btrfs and btrfs-progs repo at git://github.com/ablock84/linux-btrfs.git (send-v2) git://github.com/ablock84/btrfs-progs.git (send-v2)
2013 Jun 04
0
[PATCH] Btrfs-progs: fix incorrect root backref errors in fsck
...backref->found_dir_index = 1; } else if (item_type == BTRFS_ROOT_REF_KEY) { if (backref->found_forward_ref) backref->errors |= REF_ERR_DUP_ROOT_REF; + else if (backref->found_dir_item) + rec->found_ref++; backref->found_forward_ref = 1; } else if (item_type == BTRFS_ROOT_BACKREF_KEY) { if (backref->found_back_ref) @@ -1524,6 +1526,8 @@ static int add_root_backref(struct cache_tree *root_cache, BUG_ON(1); } + if (backref->found_forward_ref && backref->found_dir_item) + backref->reachable = 1; return 0; } -- 1.7.7.6 -- To unsubscribe from th...
2010 Nov 17
0
[PATCH] Btrfs: handle NFS lookups properly
...return -EINVAL; + + if (!S_ISDIR(dir->i_mode)) + return -EINVAL; + + path = btrfs_alloc_path(); + if (!path) + return -ENOMEM; + path->leave_spinning = 1; + + if (inode->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); + ret...
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