search for: rb_prev

Displaying 15 results from an estimated 15 matches for "rb_prev".

2009 Dec 15
0
[PATCH 1/4] btrfs: fix the bug that __tree_search() returns the wrong result in extent_map.c
__tree_search() returns the reverse result about the prev node and the next node. And we can get the prev node and the next node directly by rb_prev() and rb_next(), so it is unnecessary to use while loop to get them. This patch fixes this bug of the wrong result. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> --- fs/btrfs/extent_map.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/extent_...
2012 Jun 29
12
[PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly
Setting subvolume/snapshot readonly has been missing for a long time. With this patch, we can set a subvolume/snapshot readonly via: o btrfs subvolume set-ro <path> Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> --- cmds-subvolume.c | 40 ++++++++++++++++++++++++++++++++++++++++ ioctl.h | 7 +++++++ 2 files changed, 47 insertions(+), 0 deletions(-) diff --git
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...ace, offset_index); + if (entry->offset != offset) + return NULL; + + WARN_ON(!entry->bitmap); + return entry; + } else if (entry) { + if (entry->bitmap) { + /* + * if previous extent entry covers the offset, + * we should return it instead of the bitmap entry + */ + n = rb_prev(&entry->offset_index); + if (n) { + prev = rb_entry(n, struct btrfs_free_space, + offset_index); + if (!prev->bitmap && + prev->offset + prev->bytes > offset) + entry = prev; + } + } + return entry; + } + + if (!prev) + return NULL; + + /* fin...
2013 Oct 23
0
[PATCH] btrfs-progs: add filter for deleted but uncleanded subvolumes
...oot(all_subvols, entry, top_id); - if (ret == -ENOENT) - goto skip; + if (ret == -ENOENT) { + entry->full_path = strdup("DELETED"); + entry->deleted = 1; + } ret = filter_root(entry, filter_set); if (ret) sort_tree_insert(sort_tree, entry, comp_set); -skip: n = rb_prev(n); } } diff --git a/btrfs-list.h b/btrfs-list.h index 5164467..724e973 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -71,6 +71,8 @@ struct root_info { char *name; char *full_path; + + int deleted; }; typedef int (*btrfs_list_filter_func)(struct root_info *, u64); @@ -90,6 +92,7 @@ s...
2013 Mar 15
0
[PATCH] Btrfs: add some free space cache tests
...bit_bytes = ctl->unit; + ret = search_bitmap(ctl, info, &bit_off, &bit_bytes); + if (!ret) { + if (bit_off == offset) { + ret = 1; + goto out; + } else if (bit_off > offset && + offset + bytes > bit_off) { + ret = 1; + goto out; + } + } + + n = rb_prev(&info->offset_index); + while (n) { + tmp = rb_entry(n, struct btrfs_free_space, + offset_index); + if (tmp->offset + tmp->bytes < offset) + break; + if (offset + bytes < tmp->offset) { + n = rb_prev(&info->offset_index); + continue; + } +...
2011 Jul 07
5
[PATCH v1 0/2] Btrfs-progs: commands "resolve inode" and "resolve logical"
The kernel patch series just sent (Subject: "Btrfs: scrub: print path to corrupted files and trigger nodatasum fixup") introduces two new ioctls to do in-kernel filesystem path construction. This series provides the corresponding userspace changes, adding two new commands to the btrfs utility: -- btrfs resolve inode [-v] <inode> <path> resolves an <inode> to all
2010 Mar 02
3
2.6.33 high cpu usage
With the ATI bug I was hitting earlier fixed, only my btrfs partition continues to show high cpu usage for some operations. Rsync, git pull, git checkout and svn up are typicall operations which trigger the high cpu usage. As an example, this perf report is from using git checkout to change to a new branch; the change needed to checkout 208 files out of about 1600 total files. du(1) reports
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 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
2023 Jun 29
3
[PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
...ger *mgr, + struct drm_gpuva *va) +{ + struct rb_node *node; + struct list_head *head; + + if (drm_gpuva_it_iter_first(&mgr->rb.tree, + GPUVA_START(va), + GPUVA_LAST(va))) + return -EEXIST; + + va->mgr = mgr; + + drm_gpuva_it_insert(va, &mgr->rb.tree); + + node = rb_prev(&va->rb.node); + if (node) + head = &(to_drm_gpuva(node))->rb.entry; + else + head = &mgr->rb.list; + + list_add(&va->rb.entry, head); + + return 0; +} + +/** + * drm_gpuva_insert - insert a &drm_gpuva + * @mgr: the &drm_gpuva_manager to insert the &drm_gpu...
2023 Jul 13
1
[PATCH drm-next v7 02/13] drm: manager to keep track of GPUs VA mappings
...ger *mgr, + struct drm_gpuva *va) +{ + struct rb_node *node; + struct list_head *head; + + if (drm_gpuva_it_iter_first(&mgr->rb.tree, + GPUVA_START(va), + GPUVA_LAST(va))) + return -EEXIST; + + va->mgr = mgr; + + drm_gpuva_it_insert(va, &mgr->rb.tree); + + node = rb_prev(&va->rb.node); + if (node) + head = &(to_drm_gpuva(node))->rb.entry; + else + head = &mgr->rb.list; + + list_add(&va->rb.entry, head); + + return 0; +} + +/** + * drm_gpuva_insert() - insert a &drm_gpuva + * @mgr: the &drm_gpuva_manager to insert the &drm_g...
2023 Jul 20
2
[PATCH drm-misc-next v8 01/12] drm: manager to keep track of GPUs VA mappings
...ger *mgr, + struct drm_gpuva *va) +{ + struct rb_node *node; + struct list_head *head; + + if (drm_gpuva_it_iter_first(&mgr->rb.tree, + GPUVA_START(va), + GPUVA_LAST(va))) + return -EEXIST; + + va->mgr = mgr; + + drm_gpuva_it_insert(va, &mgr->rb.tree); + + node = rb_prev(&va->rb.node); + if (node) + head = &(to_drm_gpuva(node))->rb.entry; + else + head = &mgr->rb.list; + + list_add(&va->rb.entry, head); + + return 0; +} + +/** + * drm_gpuva_insert() - insert a &drm_gpuva + * @mgr: the &drm_gpuva_manager to insert the &drm_g...
2012 Feb 29
15
[RFC] [PATCH] Add btrfs autosnap feature
From: anand jain <anand.jain@oracle.com> Anand Jain (1): [RFC] Add btrfs autosnap feature Makefile | 6 +- autosnap.c | 1553 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ autosnap.h | 81 +++ btrfs-list.c | 140 +++++- btrfs.c | 46 ++- btrfs_cmds.c | 186 +++++++- btrfs_cmds.h | 3 +- scrub.c | 1 + 8 files changed, 1982 insertions(+), 34
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...ator_name); } spin_unlock(&elv_list_lock); len += sprintf(len+name, "\n"); return len; } -struct request *elv_rb_former_request(struct request_queue *q, - struct request *rq) +struct request *elv_rb_former_request(struct request *rq) { struct rb_node *rbprev = rb_prev(&rq->rb_node); if (rbprev) return rb_entry_rq(rbprev); return NULL; } EXPORT_SYMBOL(elv_rb_former_request); -struct request *elv_rb_latter_request(struct request_queue *q, - struct request *rq) +struct request *elv_rb_latter_request(struct request *rq) { struct rb_...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...ator_name); } spin_unlock(&elv_list_lock); len += sprintf(len+name, "\n"); return len; } -struct request *elv_rb_former_request(struct request_queue *q, - struct request *rq) +struct request *elv_rb_former_request(struct request *rq) { struct rb_node *rbprev = rb_prev(&rq->rb_node); if (rbprev) return rb_entry_rq(rbprev); return NULL; } EXPORT_SYMBOL(elv_rb_former_request); -struct request *elv_rb_latter_request(struct request_queue *q, - struct request *rq) +struct request *elv_rb_latter_request(struct request *rq) { struct rb_...