search for: dir_item

Displaying 10 results from an estimated 10 matches for "dir_item".

2012 Feb 10
13
can't read superblock (but could mount)
Hi! I used to have arch linux running on 1 btrfs partition (sda1, incl. /boot). When switching to 3.2.5 recently the system fails to boot: (after udevd) /etc/rc.sysinit: line 15: 117 Bus error mountpoint -q /proc and so on, no idea. It used to boot with 3.2.4, but 1) I obviously had some corruption in the tree, when I tried to delete a certain file I hit e.g. "kernel BUG at
2013 Mar 04
2
[PATCH 1/2] Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
...jectid, + objectid, pending->inherit); + if (pending->error) goto no_free_objectid; - } key.objectid = objectid; key.offset = (u64)-1; @@ -1142,7 +1143,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, dentry->d_name.len, 0); if (dir_item != NULL && !IS_ERR(dir_item)) { pending->error = -EEXIST; - goto fail; + goto dir_item_existed; } else if (IS_ERR(dir_item)) { ret = PTR_ERR(dir_item); btrfs_abort_transaction(trans, root, ret); @@ -1273,6 +1274,8 @@ static noinline int create_pending_snapshot(struct btrfs_t...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...;m doing is ok for now. I''ve added an ORPHAN_DIR item key to have a hidden dir per root. Right now it just does it for whatever the default root is on mount, but I''m going to fix that to do the orphan dir check/creation on 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...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...E 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__)); + +struct btrfs_disk_key { + __le64 objectid; + u8 type; +...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
..._insert_empty_items_for_inode(trans, root, inode, path, + key, &data_size, 1); +} + int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, u64 time_seq); @@ -2829,7 +2853,8 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_key *location, u8 type, u64 index); struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct btrfs_path *path, u64 dir, + struct inode *dir, + struct b...
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix file descriptors leak
...free(c32file); @@ -778,7 +779,7 @@ static char * get_default_subvol(char * rootdir, char * subvol) struct btrfs_ioctl_search_key *sk = &args.key; struct btrfs_ioctl_search_header *sh; int ret, i; - int fd; + int fd = -1; struct btrfs_root_ref *ref; struct btrfs_dir_item *dir_item; unsigned long off = 0; @@ -797,6 +798,8 @@ static char * get_default_subvol(char * rootdir, char * subvol) } if (ret <= 0) { subvol[0] = '\0'; + if (fd >= 0) + close(fd); return NULL; } @@ -831,6 +834,8 @@ static cha...
2013 Jun 04
0
[PATCH] Btrfs-progs: fix incorrect root backref errors in fsck
...ectory since we can''t hardlink directories. This makes the check in btrfsck bogus, when we delete a we remove the ref key for it so any lookups into /mnt/b/a will just give a blank directory as it''s supposed to. Fix this by only saying the backref is reachable if there is both a DIR_ITEM and a REF_KEY for the given root. With this patch I no longer see errors when running this reproducer. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- cmds-check.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c inde...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...b/extlinux/main.c @@ -779,7 +779,7 @@ static char * get_default_subvol(char * rootdir, char * subvol) struct btrfs_ioctl_search_key *sk = &args.key; struct btrfs_ioctl_search_header *sh; int ret, i; - int fd; + int fd = -1; struct btrfs_root_ref *ref; struct btrfs_dir_item *dir_item; unsigned long off = 0; @@ -1044,12 +1044,12 @@ err: } #ifndef __KLIBC__ -static const char *find_device(const char *mtab_file, dev_t dev) +static char *find_device(const char *mtab_file, dev_t dev) { struct mntent *mnt; struct stat dst; FILE *mtab; - const cha...
2013 Oct 18
11
[GIT PULL] Btrfs
Hi Linus, My for-linus branch has a one line fix: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a regression in our initial rc1 pull. When doing nocow writes we were sometimes starting a transaction with locks held. Josef Bacik (1) commits (+1/-0): Btrfs: release path before starting
2013 Aug 14
23
[RFC] btrfs-progs: fix sparse checking and warnings
Hi gang, I was a little surprised to see that patch go by recently which fixed an endian bug. I went to see how sparse checking looked and it was.. broken. I got it going again in my Fedora environment. Most of the patches are just cleanups, but there *were* three real bugs lurking in all that sparse warning spam. So I maintain that it''s worth our time to keep it going and fix