public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] Btrfs: rename waiting_dir_move
@ 2014-02-27  7:47 Liu Bo
  2014-02-27  7:47 ` [PATCH 2/2 v2] Btrfs: check if directory has already been created smarter Liu Bo
  2014-03-07 18:00 ` [PATCH 1/2 v2] Btrfs: rename waiting_dir_move Josef Bacik
  0 siblings, 2 replies; 6+ messages in thread
From: Liu Bo @ 2014-02-27  7:47 UTC (permalink / raw)
  To: linux-btrfs

This is a preparation work, rename waiting_dir_move to send_dir_node.
We'd like to share waiting_dir_move structure in new did_create_dir() code.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
v2: fix wrong patch name.

 fs/btrfs/send.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 9dde971..33063d1 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -186,7 +186,7 @@ struct pending_dir_move {
 	struct list_head update_refs;
 };
 
-struct waiting_dir_move {
+struct send_dir_node {
 	struct rb_node node;
 	u64 ino;
 };
@@ -2741,10 +2741,10 @@ out:
 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino)
 {
 	struct rb_node *n = sctx->waiting_dir_moves.rb_node;
-	struct waiting_dir_move *entry;
+	struct send_dir_node *entry;
 
 	while (n) {
-		entry = rb_entry(n, struct waiting_dir_move, node);
+		entry = rb_entry(n, struct send_dir_node, node);
 		if (ino < entry->ino)
 			n = n->rb_left;
 		else if (ino > entry->ino)
@@ -2759,7 +2759,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino)
 {
 	struct rb_node **p = &sctx->waiting_dir_moves.rb_node;
 	struct rb_node *parent = NULL;
-	struct waiting_dir_move *entry, *dm;
+	struct send_dir_node *entry, *dm;
 
 	dm = kmalloc(sizeof(*dm), GFP_NOFS);
 	if (!dm)
@@ -2768,7 +2768,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino)
 
 	while (*p) {
 		parent = *p;
-		entry = rb_entry(parent, struct waiting_dir_move, node);
+		entry = rb_entry(parent, struct send_dir_node, node);
 		if (ino < entry->ino) {
 			p = &(*p)->rb_left;
 		} else if (ino > entry->ino) {
@@ -2787,10 +2787,10 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino)
 static int del_waiting_dir_move(struct send_ctx *sctx, u64 ino)
 {
 	struct rb_node *n = sctx->waiting_dir_moves.rb_node;
-	struct waiting_dir_move *entry;
+	struct send_dir_node *entry;
 
 	while (n) {
-		entry = rb_entry(n, struct waiting_dir_move, node);
+		entry = rb_entry(n, struct send_dir_node, node);
 		if (ino < entry->ino) {
 			n = n->rb_left;
 		} else if (ino > entry->ino) {
@@ -5469,10 +5469,10 @@ out:
 	WARN_ON(sctx && !ret && !RB_EMPTY_ROOT(&sctx->waiting_dir_moves));
 	while (sctx && !RB_EMPTY_ROOT(&sctx->waiting_dir_moves)) {
 		struct rb_node *n;
-		struct waiting_dir_move *dm;
+		struct send_dir_node *dm;
 
 		n = rb_first(&sctx->waiting_dir_moves);
-		dm = rb_entry(n, struct waiting_dir_move, node);
+		dm = rb_entry(n, struct send_dir_node, node);
 		rb_erase(&dm->node, &sctx->waiting_dir_moves);
 		kfree(dm);
 	}
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-07 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27  7:47 [PATCH 1/2 v2] Btrfs: rename waiting_dir_move Liu Bo
2014-02-27  7:47 ` [PATCH 2/2 v2] Btrfs: check if directory has already been created smarter Liu Bo
2014-02-27  8:01   ` Wang Shilong
2014-02-27  8:12     ` Liu Bo
2014-02-27  9:35   ` [PATCH 2/2 v3] " Liu Bo
2014-03-07 18:00 ` [PATCH 1/2 v2] Btrfs: rename waiting_dir_move Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox