[Ocfs2-tools-devel] [PATCH 41/44] fsck.ocfs2: Add dup_owner to for_each_owner.
Tao Ma
tao.ma at oracle.com
Mon Dec 28 01:01:26 PST 2009
When use refcount to handle dup_clusters, we need
to add something to dup_owner and use it in
fun_each_owner. So add it to the callback.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fsck.ocfs2/pass1b.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fsck.ocfs2/pass1b.c b/fsck.ocfs2/pass1b.c
index 7e9ca3b..357ce25 100644
--- a/fsck.ocfs2/pass1b.c
+++ b/fsck.ocfs2/pass1b.c
@@ -971,6 +971,7 @@ static void print_inode_path(struct dup_inode *di)
static void for_each_owner(struct dup_context *dct, struct dup_cluster *dc,
int (*func)(struct dup_cluster *dc,
struct dup_inode *di,
+ struct dup_cluster_owner *dco,
void *priv_data),
void *priv_data)
{
@@ -983,13 +984,13 @@ static void for_each_owner(struct dup_context *dct, struct dup_cluster *dc,
dco = list_entry(p, struct dup_cluster_owner, dco_list);
di = dup_inode_lookup(dct, dco->dco_ino);
assert(di);
- if (func(dc, di, priv_data))
+ if (func(dc, di, dco, priv_data))
break;
}
}
static int count_func(struct dup_cluster *dc, struct dup_inode *di,
- void *priv_data)
+ struct dup_cluster_owner *dco, void *priv_data)
{
uint64_t *count = priv_data;
@@ -1000,7 +1001,7 @@ static int count_func(struct dup_cluster *dc, struct dup_inode *di,
}
static int print_func(struct dup_cluster *dc, struct dup_inode *di,
- void *priv_data)
+ struct dup_cluster_owner *dco, void *priv_data)
{
printf(" ");
print_inode_path(di);
@@ -1310,7 +1311,7 @@ out:
}
static int fix_dups_func(struct dup_cluster *dc, struct dup_inode *di,
- void *priv_data)
+ struct dup_cluster_owner *dco, void *priv_data)
{
int ret = 0;
struct fix_dup_context *fd = priv_data;
--
1.5.5
More information about the Ocfs2-tools-devel
mailing list