From: Robin Dong <san...@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 <san...@taobao.com>
Signed-off-by: Liu Yuan <namei.u...@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

-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to