diff mbox series

[22/35] multipathd: uxlsnr: remove check_timeout()

Message ID 20210910114120.13665-23-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipathd: uxlsnr overhaul | expand

Commit Message

Martin Wilck Sept. 10, 2021, 11:41 a.m. UTC
From: Martin Wilck <mwilck@suse.com>

This function just prints a warning, anyway. If this warning
is printed, the client will see a timeout and print a warning, too.
A later patch will re-introduce this function with real functionality.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/uxlsnr.c | 21 ---------------------
 1 file changed, 21 deletions(-)

Comments

Benjamin Marzinski Sept. 16, 2021, 2:21 a.m. UTC | #1
On Fri, Sep 10, 2021 at 01:41:07PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> This function just prints a warning, anyway. If this warning
> is printed, the client will see a timeout and print a warning, too.
> A later patch will re-introduce this function with real functionality.
> 
The start_time variable should probably get remove from uxsock_listen
here instead of the next patch, but it doesn't actually hurt anything,
so

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  multipathd/uxlsnr.c | 21 ---------------------
>  1 file changed, 21 deletions(-)
> 
> diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
> index cbbcb2c..147f81a 100644
> --- a/multipathd/uxlsnr.c
> +++ b/multipathd/uxlsnr.c
> @@ -168,25 +168,6 @@ static void free_polls (void)
>  		FREE(polls);
>  }
>  
> -static void check_timeout(struct timespec start_time, char *inbuf,
> -		   unsigned int timeout)
> -{
> -	struct timespec diff_time, end_time;
> -
> -	if (start_time.tv_sec) {
> -		unsigned long msecs;
> -
> -		get_monotonic_time(&end_time);
> -		timespecsub(&end_time, &start_time, &diff_time);
> -		msecs = diff_time.tv_sec * 1000 +
> -			diff_time.tv_nsec / (1000 * 1000);
> -		if (msecs > timeout)
> -			condlog(2, "cli cmd '%s' timeout reached "
> -				"after %ld.%06lu secs", inbuf,
> -				(long)diff_time.tv_sec, diff_time.tv_nsec / 1000);
> -	}
> -}
> -
>  void uxsock_cleanup(void *arg)
>  {
>  	struct client *client_loop;
> @@ -574,8 +555,6 @@ void *uxsock_listen(long ux_sock, void *trigger_data)
>  					FREE(reply);
>  					reply = NULL;
>  				}
> -				check_timeout(start_time, inbuf,
> -					      uxsock_timeout);
>  				FREE(inbuf);
>  			}
>  		}
> -- 
> 2.33.0

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index cbbcb2c..147f81a 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -168,25 +168,6 @@  static void free_polls (void)
 		FREE(polls);
 }
 
-static void check_timeout(struct timespec start_time, char *inbuf,
-		   unsigned int timeout)
-{
-	struct timespec diff_time, end_time;
-
-	if (start_time.tv_sec) {
-		unsigned long msecs;
-
-		get_monotonic_time(&end_time);
-		timespecsub(&end_time, &start_time, &diff_time);
-		msecs = diff_time.tv_sec * 1000 +
-			diff_time.tv_nsec / (1000 * 1000);
-		if (msecs > timeout)
-			condlog(2, "cli cmd '%s' timeout reached "
-				"after %ld.%06lu secs", inbuf,
-				(long)diff_time.tv_sec, diff_time.tv_nsec / 1000);
-	}
-}
-
 void uxsock_cleanup(void *arg)
 {
 	struct client *client_loop;
@@ -574,8 +555,6 @@  void *uxsock_listen(long ux_sock, void *trigger_data)
 					FREE(reply);
 					reply = NULL;
 				}
-				check_timeout(start_time, inbuf,
-					      uxsock_timeout);
 				FREE(inbuf);
 			}
 		}