Re: [PATCH 11/18] libmultipath: convert TUR checker to an async checker instance

Benjamin Marzinski <[email protected]>
Newsgroups dev.linux.lists.dm-devel
Message-ID <[email protected]>
On Tue, May 05, 2026 at 05:43:25PM +0200, Martin Wilck wrote:
> The TUR checker now just exports the message table and the
> "libcheck_async_func" symbol. This converts it into an instance of
> the generic async checker model.
> 
> Signed-off-by: Martin Wilck <[email protected]>
> ---
>  libmultipath/checkers/tur.c | 251 +++---------------------------------
>  1 file changed, 15 insertions(+), 236 deletions(-)
> 
> diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
> index 6791172..757767a 100644
> --- a/libmultipath/checkers/tur.c
> +++ b/libmultipath/checkers/tur.c
> @@ -3,87 +3,31 @@
>   *
>   * Copyright (c) 2004 Christophe Varoqui
>   */
> -#include <stdlib.h>
> -#include <string.h>
> -#include <sys/types.h>
> -#include <sys/stat.h>
> -#include <unistd.h>
> -#include <fcntl.h>
>  #include <sys/ioctl.h>
> -#include <sys/sysmacros.h>
> +#include <sys/types.h>
> +
>  #include <errno.h>
> -#include <sys/time.h>
>  
>  #include "checkers.h"
> -#include "debug.h"
> +#include "async_checker.h"
>  #include "sg_include.h"
> -#include "runner.h"
>  
>  #define TUR_CMD_LEN 6
>  #define HEAVY_CHECK_COUNT       10
> -#define MAX_NR_TIMEOUTS 1
>  
>  enum {
> -	MSG_TUR_RUNNING = CHECKER_FIRST_MSGID,
> -	MSG_TUR_TIMEOUT,
> -	MSG_TUR_FAILED,

MSG_TUR_FAILED isn't actually used anymore, and can get removed.
Otherwise this looks good.

-Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.