]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - scrub/unicrash.h
xfs_scrub: handle spurious wakeups in scan_fs_tree
[thirdparty/xfsprogs-dev.git] / scrub / unicrash.h
index feb9cc86c1a16fc804c3408bdfa8c1c94a67905c..755afaef18c974a12e2da18262ae75672614cf58 100644 (file)
@@ -13,26 +13,30 @@ struct unicrash;
 
 struct dirent;
 
-bool unicrash_dir_init(struct unicrash **ucp, struct scrub_ctx *ctx,
+int unicrash_dir_init(struct unicrash **ucp, struct scrub_ctx *ctx,
                struct xfs_bulkstat *bstat);
-bool unicrash_xattr_init(struct unicrash **ucp, struct scrub_ctx *ctx,
+int unicrash_xattr_init(struct unicrash **ucp, struct scrub_ctx *ctx,
                struct xfs_bulkstat *bstat);
-bool unicrash_fs_label_init(struct unicrash **ucp, struct scrub_ctx *ctx);
+int unicrash_fs_label_init(struct unicrash **ucp, struct scrub_ctx *ctx);
 void unicrash_free(struct unicrash *uc);
-bool unicrash_check_dir_name(struct unicrash *uc, const char *descr,
+int unicrash_check_dir_name(struct unicrash *uc, struct descr *dsc,
                struct dirent *dirent);
-bool unicrash_check_xattr_name(struct unicrash *uc, const char *descr,
+int unicrash_check_xattr_name(struct unicrash *uc, struct descr *dsc,
                const char *attrname);
-bool unicrash_check_fs_label(struct unicrash *uc, const char *descr,
+int unicrash_check_fs_label(struct unicrash *uc, struct descr *dsc,
                const char *label);
+bool unicrash_load(void);
+void unicrash_unload(void);
 #else
-# define unicrash_dir_init(u, c, b)            (true)
-# define unicrash_xattr_init(u, c, b)          (true)
-# define unicrash_fs_label_init(u, c)          (true)
+# define unicrash_dir_init(u, c, b)            (0)
+# define unicrash_xattr_init(u, c, b)          (0)
+# define unicrash_fs_label_init(u, c)          (0)
 # define unicrash_free(u)                      do {(u) = (u);} while (0)
-# define unicrash_check_dir_name(u, d, n)      (true)
-# define unicrash_check_xattr_name(u, d, n)    (true)
-# define unicrash_check_fs_label(u, d, n)      (true)
+# define unicrash_check_dir_name(u, d, n)      (0)
+# define unicrash_check_xattr_name(u, d, n)    (0)
+# define unicrash_check_fs_label(u, d, n)      (0)
+# define unicrash_load()                       (0)
+# define unicrash_unload()                     do { } while (0)
 #endif /* HAVE_LIBICU */
 
 #endif /* XFS_SCRUB_UNICRASH_H_ */