Displaying 20 results from an estimated 117 matches for "rb_root".
2023 Apr 21
2
[PATCH] ocfs2: Fix wrong search logic in __ocfs2_resv_find_window
...g.
>
> ** analysis **
>
> __ocfs2_resv_find_window should use resv node from rb-tree to do linear
> search. But current code logic uses un-managered area between two resvs.
> The searching logic deviates from this func job, which should only focus
> on reservation areas (when rb_root is non NULL). Another issue of
> __ocfs2_resv_find_window is more inclined to generate inner fragment.
> It doesn't search & consume existing reservations but be apt to create
> new reservation item.
>
> This patch pulls this func (__ocfs2_resv_find_window) to do what it
>...
2023 Apr 06
3
[PATCH] ocfs2: Fix wrong search logic in __ocfs2_resv_find_window
...bitmap
to use, the -ENOSPC is wrong.
** analysis **
__ocfs2_resv_find_window should use resv node from rb-tree to do linear
search. But current code logic uses un-managered area between two resvs.
The searching logic deviates from this func job, which should only focus
on reservation areas (when rb_root is non NULL). Another issue of
__ocfs2_resv_find_window is more inclined to generate inner fragment.
It doesn't search & consume existing reservations but be apt to create
new reservation item.
This patch pulls this func (__ocfs2_resv_find_window) to do what it
should do: search & cons...
2023 Apr 29
1
[PATCH] ocfs2: Fix wrong search logic in __ocfs2_resv_find_window
...alysis **
>>
>> __ocfs2_resv_find_window should use resv node from rb-tree to do linear
>> search. But current code logic uses un-managered area between two resvs.
>> The searching logic deviates from this func job, which should only focus
>> on reservation areas (when rb_root is non NULL). Another issue of
>> __ocfs2_resv_find_window is more inclined to generate inner fragment.
>> It doesn't search & consume existing reservations but be apt to create
>> new reservation item.
>>
>> This patch pulls this func (__ocfs2_resv_find_window...
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
Most fixes are trivial.
The one from Alex is fixing a real bug that several users have reported.
Alex sent the patch half a year ago and it was not yet integrated.
The patch "Use /proc/mounts instead of /etc/mtab" is a repost.
The patch "btrfs-receive optionally honors the end-cmd" is a preparation
step to allow backup tools to multiplex a single communication stream
(e.g. a
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...offset < drop_key->offset)
+ return 1;
+ }
+ }
+ return 0;
+}
+
static int run_next_block(struct btrfs_root *root,
struct block_info *bits,
int bits_nr,
@@ -3612,7 +3633,8 @@ static int run_next_block(struct btrfs_root *root,
struct cache_tree *chunk_cache,
struct rb_root *dev_cache,
struct block_group_tree *block_group_cache,
- struct device_extent_tree *dev_extent_cache)
+ struct device_extent_tree *dev_extent_cache,
+ struct btrfs_root_item *ri)
{
struct extent_buffer *buf;
u64 bytenr;
@@ -3817,6 +3839,15 @@ static int run_next_block(struct...
2006 Aug 02
10
[PATCH 0/6] htb: cleanup
The HTB scheduler code is a mess, this patch set does some basic
house cleaning. The first four should cause no code change, but the
last two need more testing.
--
Stephen Hemminger <shemminger@osdl.org>
"And in the Packet there writ down that doome"
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
2019 Aug 09
6
[RFC PATCH v6 71/92] mm: add support for remote mapping
...ink */
+
+ struct mmu_notifier mn; /* for notifications from mm */
+ struct rcu_head rcu; /* for delayed freeing */
+ refcount_t refcnt;
+
+ struct file_db *pseudo; /* kernel interface */
+};
+
+struct file_db {
+ struct client_db *cdb;
+
+ spinlock_t lock; /* lock for the following */
+ struct rb_root rb_root; /* mappings indexed by map_hva */
+};
+
+static inline void *PageMapping(struct page_db *pdb)
+{
+ return (void *)pdb + (PAGE_MAPPING_ANON | PAGE_MAPPING_REMOTE);
+}
+
+static inline struct page_db *RemoteMapping(struct page *page)
+{
+ VM_BUG_ON_PAGE(!PageRemote(page), page);
+ return (v...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
.../* for space balancing */
+#define BTRFS_TREE_RELOC_OBJECTID -8ULL
+#define BTRFS_DATA_RELOC_TREE_OBJECTID -9ULL
/* dummy objectid represents multiple objectids */
#define BTRFS_MULTIPLE_OBJECTIDS -255ULL
@@ -539,6 +543,12 @@
struct list_head list;
};
+struct btrfs_leaf_ref_tree {
+ struct rb_root root;
+ struct list_head list;
+ spinlock_t lock;
+};
+
struct btrfs_device;
struct btrfs_fs_devices;
struct btrfs_fs_info {
@@ -637,6 +647,8 @@
struct task_struct *cleaner_kthread;
int thread_pool_size;
+ struct btrfs_leaf_ref_tree shared_ref_tree;
+
struct kobject super_kobj;
struct...
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This
2008 Nov 12
15
[PATCH][RFC][12+2][v3] A expanded CFQ scheduler for cgroups
This patchset expands traditional CFQ scheduler in order to support cgroups,
and improves old version.
Improvements are as following.
* Modularizing our new CFQ scheduler.
The expanded CFQ scheduler is registered/unregistered as new I/O
elevator scheduler called "cfq-cgroups". By this, the traditional CFQ
scheduler, which does not handle cgroups, and our new CFQ
2008 Nov 12
15
[PATCH][RFC][12+2][v3] A expanded CFQ scheduler for cgroups
This patchset expands traditional CFQ scheduler in order to support cgroups,
and improves old version.
Improvements are as following.
* Modularizing our new CFQ scheduler.
The expanded CFQ scheduler is registered/unregistered as new I/O
elevator scheduler called "cfq-cgroups". By this, the traditional CFQ
scheduler, which does not handle cgroups, and our new CFQ
2008 Nov 07
0
[PATCH][cfq-cgroups] Introduce ioprio class for top layer.
...((cfqd)->ioprio_class == IOPRIO_CLASS_IDLE)
+#define cfq_data_class_rt(cfqd) \
+ ((cfqd)->ioprio_class == IOPRIO_CLASS_RT)
+
+
+
static struct cfq_ops cfq_cgroup_op;
struct cfq_cgroup {
struct cgroup_subsys_state css;
unsigned int ioprio;
+ unsigned short ioprio_class;
struct rb_root sibling_tree;
unsigned int siblings;
@@ -161,6 +174,7 @@ static void *cfq_cgroup_init_cfq_data(struct cfq_cgroup *cfqc,
cfqc = cgroup_to_cfq_cgroup(get_root_subsys(&cfq_subsys));
cfq_cgroup_sibling_tree_add(cfqc, cfqd);
cfqd->ioprio = cfqc->ioprio;
+ cfqd->ioprio_class = cf...
2008 Nov 07
0
[PATCH][cfq-cgroups] Introduce ioprio class for top layer.
...((cfqd)->ioprio_class == IOPRIO_CLASS_IDLE)
+#define cfq_data_class_rt(cfqd) \
+ ((cfqd)->ioprio_class == IOPRIO_CLASS_RT)
+
+
+
static struct cfq_ops cfq_cgroup_op;
struct cfq_cgroup {
struct cgroup_subsys_state css;
unsigned int ioprio;
+ unsigned short ioprio_class;
struct rb_root sibling_tree;
unsigned int siblings;
@@ -161,6 +174,7 @@ static void *cfq_cgroup_init_cfq_data(struct cfq_cgroup *cfqc,
cfqc = cgroup_to_cfq_cgroup(get_root_subsys(&cfq_subsys));
cfq_cgroup_sibling_tree_add(cfqc, cfqd);
cfqd->ioprio = cfqc->ioprio;
+ cfqd->ioprio_class = cf...
2016 Mar 25
0
[RFC PATCH V2 2/2] vhost: device IOTLB API
...((node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
+ start, end)))
+ vhost_umem_free(umem, node);
+}
+
+static struct vhost_umem *vhost_umem_alloc(void)
+{
+ struct vhost_umem *umem = vhost_kvzalloc(sizeof(*umem));
+
+ if (!umem)
+ return NULL;
+
+ umem->umem_tree = RB_ROOT;
+ umem->numem = 0;
+ INIT_LIST_HEAD(&umem->umem_list);
+
+ return umem;
+}
+
static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m)
{
struct vhost_memory mem, *newmem;
struct vhost_memory_region *region;
- struct vhost_umem_node *node;
struct vhost_umem...
2012 Oct 04
3
[PATCH] btrfs ulist use rbtree instead
...d nodes n in elem)
* ulist_add(ulist, n);
* do something useful with the node;
* }
@@ -51,8 +53,10 @@
void ulist_init(struct ulist *ulist)
{
ulist->nnodes = 0;
- ulist->nodes = ulist->int_nodes;
ulist->nodes_alloced = ULIST_SIZE;
+ ulist->pools = NULL;
+ ulist->root = RB_ROOT;
+
}
EXPORT_SYMBOL(ulist_init);
@@ -65,13 +69,18 @@ EXPORT_SYMBOL(ulist_init);
*/
void ulist_fini(struct ulist *ulist)
{
- /*
- * The first ULIST_SIZE elements are stored inline in struct ulist.
- * Only if more elements are alocated they need to be freed.
- */
- if (ulist->nodes_allo...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...mem->regions, newmem->nregions, sizeof(*newmem->regions),
- vhost_memory_reg_sort_cmp, NULL);
- if (!memory_access_ok(d, newmem, 0)) {
+ newumem = vhost_kvzalloc(sizeof(*newumem));
+ if (!newumem) {
kvfree(newmem);
- return -EFAULT;
+ return -ENOMEM;
+ }
+
+ newumem->umem_tree = RB_ROOT;
+ INIT_LIST_HEAD(&newumem->umem_list);
+
+ for (region = newmem->regions;
+ region < newmem->regions + mem.nregions;
+ region++) {
+ node = vhost_kvzalloc(sizeof(*node));
+ if (!node)
+ goto err;
+ node->start = region->guest_phys_addr;
+ node->size = regio...
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
...mem->regions, newmem->nregions, sizeof(*newmem->regions),
- vhost_memory_reg_sort_cmp, NULL);
- if (!memory_access_ok(d, newmem, 0)) {
+ newumem = vhost_kvzalloc(sizeof(*newumem));
+ if (!newumem) {
kvfree(newmem);
- return -EFAULT;
+ return -ENOMEM;
+ }
+
+ newumem->umem_tree = RB_ROOT;
+ INIT_LIST_HEAD(&newumem->umem_list);
+
+ for (region = newmem->regions;
+ region < newmem->regions + mem.nregions;
+ region++) {
+ node = vhost_kvzalloc(sizeof(*node));
+ if (!node)
+ goto err;
+ node->start = region->guest_phys_addr;
+ node->size = regio...
2009 Dec 15
0
[PATCH 1/4] btrfs: fix the bug that __tree_search() returns the wrong result in extent_map.c
...rfs/extent_map.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 46bea0f..16744f4 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -136,20 +136,15 @@ static struct rb_node *__tree_search(struct rb_root *root, u64 offset,
if (prev_ret) {
orig_prev = prev;
- while (prev && offset >= extent_map_end(prev_entry)) {
- prev = rb_next(prev);
- prev_entry = rb_entry(prev, struct extent_map, rb_node);
- }
+ if (prev && offset < prev_entry->start)
+ prev = rb_prev(pr...
2016 Mar 25
0
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
...mem->regions, newmem->nregions, sizeof(*newmem->regions),
- vhost_memory_reg_sort_cmp, NULL);
- if (!memory_access_ok(d, newmem, 0)) {
+ newumem = vhost_kvzalloc(sizeof(*newumem));
+ if (!newumem) {
kvfree(newmem);
- return -EFAULT;
+ return -ENOMEM;
+ }
+
+ newumem->umem_tree = RB_ROOT;
+ INIT_LIST_HEAD(&newumem->umem_list);
+
+ for (region = newmem->regions;
+ region < newmem->regions + mem.nregions;
+ region++) {
+ node = vhost_kvzalloc(sizeof(*node));
+ if (!node)
+ goto err;
+ node->start = region->guest_phys_addr;
+ node->size = regio...