Displaying 19 results from an estimated 19 matches for "disk_key".
2011 Jan 28
0
[PATCH] ctree code cleanups
...e block, it returns -1, but continues
- * fixing up the blocks in ram so the tree is consistent.
*/
-static int fixup_low_keys(struct btrfs_trans_handle *trans,
+static void fixup_low_keys(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key *key, int level)
{
int i;
- int ret = 0;
struct extent_buffer *t;
for (i = level; i < BTRFS_MAX_LEVEL; i++) {
@@ -1910,7 +1891,6 @@ static int fixup_low_keys(struct
btrfs_trans_handle *trans,
if (tslot != 0)
break;
}
- return ret;
}
/*
@@ -2567,7 +2547,6 @@ static noinline in...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...table/ctree.c btrfs-progs-2/ctree.c
--- btrfs-progs-unstable/ctree.c 2009-01-08 08:30:09.752081135 +0800
+++ btrfs-progs-2/ctree.c 2009-05-01 14:07:13.000000000 +0800
@@ -85,6 +85,7 @@ int btrfs_copy_root(struct btrfs_trans_h
int ret = 0;
int level;
struct btrfs_root *new_root;
+ struct btrfs_disk_key disk_key;
new_root = kmalloc(sizeof(*new_root), GFP_NOFS);
if (!new_root)
@@ -98,8 +99,12 @@ int btrfs_copy_root(struct btrfs_trans_h
WARN_ON(root->ref_cows && trans->transid != root->last_trans);
level = btrfs_header_level(buf);
- cow = btrfs_alloc_free_block(trans, ne...
2014 Sep 16
0
3.14.18 btrfs_set_item_key_safe BUG
On 3.14.18 with a BTRFS partition mounted
noatime,autodefrag,compress=lzo, I see the second assertion in
btrfs_set_item_key_safe() trip:
void btrfs_set_item_key_safe(struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_key *new_key)
{
struct btrfs_disk_key disk_key;
struct extent_buffer *eb;
int slot;
eb = path->nodes[0];
slot = path->slots[0];
if (slot > 0) {
btrfs_item_key(eb, &disk_key, slot - 1);
BUG_ON(comp_keys(&disk_key, new_key) >= 0);
}...
2013 May 07
2
[PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode
...nt ret;
ret = tree_mod_log_insert_root(root->fs_info, root->node,
- new_root_node, GFP_NOFS, log_removal);
+ new_root_node, log_removal);
BUG_ON(ret < 0);
}
@@ -1886,7 +1885,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
struct btrfs_disk_key right_key;
btrfs_node_key(right, &right_key, 0);
tree_mod_log_set_node_key(root->fs_info, parent,
- pslot + 1, 0);
+ pslot + 1);
btrfs_set_node_key(parent, &right_key, pslot + 1);
btrfs_mark_buffer_dirty(parent);
}
@@ -1931,7 +1930,7 @@ static noinline in...
2013 Aug 29
23
[PATCH] Btrfs: optimize key searches in btrfs_search_slot
...t key_search(struct extent_buffer *b, struct btrfs_key *key,
+ int level, int *prev_cmp, int *slot)
+{
+ unsigned long eb_offset = 0;
+ unsigned long len_left = b->len;
+ char *kaddr = NULL;
+ unsigned long map_start = 0;
+ unsigned long map_len = 0;
+ unsigned long offset;
+ struct btrfs_disk_key *k = NULL;
+ struct btrfs_disk_key unaligned;
+
+ if (*prev_cmp != 0) {
+ *prev_cmp = bin_search(b, key, level, slot);
+ return *prev_cmp;
+ }
+
+ if (level == 0)
+ offset = offsetof(struct btrfs_leaf, items);
+ else
+ offset = offsetof(struct btrfs_node, ptrs);
+
+ /*
+ * Map the entire exten...
2014 Mar 05
0
[PATCH] Btrfs-progs: remove unused variable and update btrfs-image man page
...btrfs-image.c
+++ b/btrfs-image.c
@@ -1373,7 +1373,6 @@ static int update_super(u8 *buffer)
u32 new_array_size = 0;
u32 array_size;
u32 cur = 0;
- u32 new_cur = 0;
u8 *ptr, *write_ptr;
int old_num_stripes;
@@ -1390,7 +1389,6 @@ static int update_super(u8 *buffer)
write_ptr += sizeof(*disk_key);
ptr += sizeof(*disk_key);
cur += sizeof(*disk_key);
- new_cur += sizeof(*disk_key);
if (key.type == BTRFS_CHUNK_ITEM_KEY) {
chunk = (struct btrfs_chunk *)ptr;
@@ -1406,7 +1404,6 @@ static int update_super(u8 *buffer)
memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid,...
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 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all -
Here''s my current error handling patchset, against 3.1-rc8. Almost all of
this patchset is preparing for actual error handling. Before we start in
on that work, I''m trying to reduce the surface we need to worry about. It
turns out that there is a ton of code that returns an error code but never
actually reports an error.
The patchset has grown to 65 patches. 46 of them
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
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...t == root->fs_info->tree_root || !index) {
ret = 0;
goto out;
}
@@ -179,6 +179,87 @@ out:
if (ret2)
return ret2;
return 0;
+}
+
+int btrfs_insert_orphan_dir_item(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root,
+ struct btrfs_key *location)
+{
+ struct btrfs_disk_key disk_key;
+ struct btrfs_dir_item *dir_item;
+ struct btrfs_path *path;
+ struct btrfs_key key;
+ struct extent_buffer *leaf;
+ unsigned long name_ptr;
+ const char *name = ".orphandir";
+ int name_len = strlen(name);
+ int ret = 0;
+ u32 data_size;
+
+ key.objectid = root->inode->i...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...t = 0;
- cow = btrfs_alloc_free_block(trans, root, buf->len, parent_start,
+ if (root->fs_info->cater_factor > 1) {
+ if (btrfs_cater_factor(btrfs_header_cater(buf)) > 1)
+ cow = btrfs_grab_cater_block(trans, root, buf, parent_start,
+ root->root_key.objectid, &disk_key,
+ level, search_start, empty_size, 1);
+ else
+ cow = btrfs_alloc_free_block_cater(trans, root, buf->len, parent_start,
+ root->root_key.objectid, &disk_key,
+ level, search_start, empty_size, 1);
+ } else {
+ cow = btrfs_alloc_free_block(trans, root, buf->...
2009 Dec 17
0
[PATCH] Btrfs: set a incompat flag when setting default subvol
...find
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 81d8378..9070b86 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1563,6 +1563,8 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
struct btrfs_path *path;
struct btrfs_key location;
struct btrfs_disk_key disk_key;
+ struct btrfs_super_block *disk_super;
+ u64 features;
u64 objectid = 0;
u64 dir_id;
@@ -1610,6 +1612,12 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
btrfs_mark_buffer_dirty(path->nodes[0]);
btrfs_free_path(path);
+ disk_super = &root...
2012 Jul 24
1
[PATCH v4] Btrfs: Check INCOMPAT flags on remount and add helper function
...super_incompat_flags(disk_super, features);
+ btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZO);
}
ret = defrag_count;
@@ -2761,8 +2756,6 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
struct btrfs_path *path;
struct btrfs_key location;
struct btrfs_disk_key disk_key;
- struct btrfs_super_block *disk_super;
- u64 features;
u64 objectid = 0;
u64 dir_id;
@@ -2813,12 +2806,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
btrfs_mark_buffer_dirty(path->nodes[0]);
btrfs_free_path(path);
- disk_super = root->...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...* additional stripes go here */
} __attribute__ ((__packed__));
+#define BTRFS_FREE_SPACE_EXTENT 1
+#define BTRFS_FREE_SPACE_BITMAP 2
+
+struct btrfs_free_space_entry {
+ __le64 offset;
+ __le64 bytes;
+ u8 type;
+} __attribute__ ((__packed__));
+
struct btrfs_free_space_header {
struct btrfs_disk_key location;
__le64 generation;
@@ -866,6 +876,7 @@ struct btrfs_block_group_cache {
struct btrfs_key key;
struct btrfs_block_group_item item;
struct btrfs_space_info *space_info;
+ struct btrfs_free_space_ctl *free_space_ctl;
u64 pinned;
u64 flags;
int cached;
@@ -2055,6 +2066,9 @@ int...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...t; 4; i++) {
- if (blocks[i] < first_free) {
- BUG_ON(i > 0);
- continue;
- }
+ for (i = 1; i < 4; i++) {
+ BUG_ON(blocks[i] < first_free);
+ BUG_ON(blocks[i] < blocks[i - 1]);
+
/* create extent item */
itemoff = itemoff - sizeof(struct btrfs_extent_item);
btrfs_set_disk_key_objectid(&disk_key, blocks[i]);
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...low(trans, root, inode, path, &key,
+ data_size, name, name_len);
if (IS_ERR(dir_item))
return PTR_ERR(dir_item);
memset(&location, 0, sizeof(location));
@@ -144,7 +147,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_cpu_key_to_disk(&disk_key, location);
data_size = sizeof(*dir_item) + name_len;
- dir_item = insert_with_overflow(trans, root, path, &key, data_size,
+ dir_item = insert_with_overflow(trans, root, dir, path, &key, data_size,
name, name_len);
if (IS_ERR(dir_item)) {
ret = PTR_ERR(dir_item);
@@ -184,13...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible
to limit subvolumes and any group of subvolumes and also to track the amount
of space that will get freed when deleting snapshots.
The current version is functionally incomplete, with the main missing feature
being the initial scan and rescan of an existing filesystem.
I put some effort into writing an introduction into
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)
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance,
and I found that the bottleneck addresses in the checksum items,
especially when we want to make a random write on a large file, e.g a 4G file.
Then a idea for this suggested by Chris is to use sub transaction ids and just
to log the part of inode that had changed since either the last log commit or
the last