Displaying 10 results from an estimated 10 matches for "insert_ext".
Did you mean:
insert_elt
2013 Oct 16
0
[PATCH] Btrfs: add tests for btrfs_get_extent V2
...+ }
+ return fs_info;
+}
+static void free_dummy_root(struct btrfs_root *root)
+{
+ if (!root)
+ return;
+ if (root->fs_info) {
+ kfree(root->fs_info->fs_devices);
+ kfree(root->fs_info);
+ }
+ if (root->node)
+ free_extent_buffer(root->node);
+ kfree(root);
+}
+
+static void insert_extent(struct btrfs_root *root, u64 start, u64 len,
+ u64 ram_bytes, u64 offset, u64 disk_bytenr,
+ u64 disk_len, u32 type, u8 compression, int slot)
+{
+ struct btrfs_path path;
+ struct btrfs_file_extent_item *fi;
+ struct extent_buffer *leaf = root->node;
+ struct btrfs_key key;
+ u32 val...
2020 Apr 19
0
[PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
...define HOLE (NBDKIT_EXTENT_HOLE|NBDKIT_EXTENT_ZERO)
@@ -56,31 +57,13 @@ struct extent {
uint64_t offset, length;
uint32_t type;
};
-static struct extent *extents;
-static size_t nr_extents, allocated;
-
-/* Insert an extent before i. If i = nr_extents, inserts at the end. */
-static void
-insert_extent (size_t i, struct extent new_extent)
-{
- if (nr_extents >= allocated) {
- allocated = allocated == 0 ? 1 : allocated * 2;
- extents = realloc (extents, (sizeof (struct extent) * allocated));
- if (extents == NULL) {
- nbdkit_error ("realloc: %m");
- exit (EXIT_F...
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
---
plugins/vddk/vddk.c | 41 +++++++++++++++++++++++++----------------
TODO | 1 -
2 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index 87c0d146..d1a3015f 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -51,6 +51,7 @@
#include "isaligned.h"
#include "minmax.h"
#include
2019 Mar 19
0
[PATCH nbdkit 1/9] server: Implement extents/can_extents calls for plugins and filters.
...(&map->extents[i],
+ &map->extents[i+count],
+ (map->nr_extents - (i+count)) * sizeof (struct extent));
+ map->nr_extents -= count;
+}
+
+/* Insert new_extent in the map at index i. Existing extents at index
+ * [i...] are moved up by one.
+ */
+static int
+insert_extent (struct nbdkit_extents_map *map,
+ struct extent new_extent, size_t i)
+{
+ assert (i <= map->nr_extents);
+
+ if (map->nr_extents >= map->allocated) {
+ size_t new_allocated;
+ struct extent *new_extents;
+
+ new_allocated = map->allocated;
+ if (ne...
2019 Mar 20
2
Re: [PATCH nbdkit 1/9] server: Implement extents/can_extents calls for plugins and filters.
...new_extent.offset = offset + length;
> + new_extent.length =
> + map->extents[lo].offset + map->extents[lo].length - new_extent.offset;
> + new_extent.type = map->extents[lo].type;
> + map->extents[lo].length = offset - map->extents[lo].offset;
> + if (insert_extent (map, new_extent, lo+1) == -1)
> + return -1;
> + goto again;
> + }
> +
> + /* We must be in situation A.4 assuming analysis above is exhaustive. */
> + assert (offset > map->extents[lo].offset);
> + assert (offset < map->extents[lo].offset + map->...
2019 Mar 19
15
[PATCH nbdkit 0/9] [mainly for discussion and early review] Implement extents.
I want to post this but mainly for discussion and early review. It's
not safe for these patches to all go upstream yet (because not all
filters have been checked/adjusted), but if any patches were to go
upstream then probably 1 & 2 only are safe.
File, VDDK, memory and data plugins all work, although I have only
done minimal testing on them.
The current tests, such as they are, all
2009 Jul 30
11
[PATCH 0/9] Quota support for ocfs2-tools (version 2)
Hi,
this is the next version of quota support for quota tools. I've addressed all
the comments of Tao, Joel and others. Sparse feature disabling also correctly
updates quota information now and the patch is merged into the tunefs support
patch.
Honza
2009 Feb 13
44
[PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
...ocfs2: ocfs2_truncate_rec() doesn't need struct inode.
ocfs2: Make truncating the extent map an extent_tree_operation.
ocfs2: ocfs2_insert_at_leaf() doesn't need struct inode.
ocfs2: Give ocfs2_split_record() an extent_tree instead of an inode.
ocfs2: ocfs2_do_insert_extent() and ocfs2_insert_path() no longer need an
ocfs2: ocfs2_extent_contig() only requires the superblock.
ocfs2: Swap inode for extent_tree in ocfs2_figure_merge_contig_type().
ocfs2: Remove inode from ocfs2_figure_extent_contig().
ocfs2: ocfs2_figure_insert_type() no longe...
2009 Jul 27
11
[PATCH 0/8] Quota support for ocfs2-tools
Hi,
I'm sending a series of patches implementing quota support into ocfs2-tools.
It's the same as the original huge patch I've sent but now it's split as Joel
asked. I've also realized that when disabling SPARSE feature, we should update
quota information. That piece of code is missing, I'll implement it soon.
Comments welcome.
Honza
2009 Aug 03
9
[PATCH 0/9] Quota support for ocfs2-tools (version 3)
Hi,
below comes a new version of the series of patches implementing quota support
for ocfs2-tools. I've fixed the calls of ocfs2_malloc_blocks() which were given
number of bytes instead of number of blocks. Besides that the series should be
the same.
Honza