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

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Wed Aug 13 11:05:27 CEST 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 main
threads at present.

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

diff --git a/sheep/md.c b/sheep/md.c
index 09ddd4b..e8f1d90 100644
--- a/sheep/md.c
+++ b/sheep/md.c
@@ -392,10 +392,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.8.3.2




More information about the sheepdog mailing list