[sheepdog] [PATCH v1 1/2] sheep/md: add main_fn marker to for_each_object_in_wd()

Robin Dong robin.k.dong at gmail.com
Fri Mar 21 11:01:13 CET 2014


From: Robin Dong <sanbai at taobao.com>

We should add the main_fn marker to for_each_object_in_wd() because
the function for_each_object_in_wd() could only be called in worker
threads at present.

Signed-off-by: Robin Dong <sanbai at taobao.com>
---
 sheep/md.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sheep/md.c b/sheep/md.c
index d9abd99..d2cbdc8 100644
--- a/sheep/md.c
+++ b/sheep/md.c
@@ -391,10 +391,10 @@ static void *thread_process_path(void *arg)
 	return arg;
 }
 
-int for_each_object_in_wd(int (*func)(uint64_t oid, const char *path,
+main_fn int for_each_object_in_wd(int (*func)(uint64_t oid, const char *path,
 				      uint32_t epoch, uint8_t ec_index,
 				      void *arg),
-			  bool cleanup, void *arg)
+				  bool cleanup, void *arg)
 {
 	int ret = SD_RES_SUCCESS;
 	const struct disk *disk;
-- 
1.7.12.4




More information about the sheepdog mailing list