All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: tlibio.c: Restore LIO_IO_SYNCV
Date: Wed, 30 Apr 2025 16:41:30 +0200	[thread overview]
Message-ID: <20250430144130.GA45846@pevik> (raw)
In-Reply-To: <20250430133615.15571-1-chrubis@suse.cz>

Hi Cyril,

> There was a single case of "#ifndef CRAY" in all the "#ifdef CRAY"
> macros that got removed accidentally. This patch restores that piece.

> Fixes: fed3e3ee6399 ('lib/tlibio: Get rid of support for old UNIXes')
> Reported-by: Avinesh Kumar <akumar@suse.de>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>

Thanks for a quick fix!
> ---
>  lib/tlibio.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 56 insertions(+), 1 deletion(-)

> diff --git a/lib/tlibio.c b/lib/tlibio.c
> index 451244525..b3e723aa7 100644
> --- a/lib/tlibio.c
> +++ b/lib/tlibio.c
> @@ -767,6 +767,34 @@ int lio_write_buffer(int fd,		/* open file descriptor */
>  			return -errno;
>  		}
>  	}
> +	else if (method & LIO_IO_SYNCV) {
> +		io_type = "writev(2)";
> +
> +		sprintf(Lio_SysCall, "writev(%d, &iov, 1) nbyte:%d", fd, size);
> +
> +		if (Debug_level) {
> +			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
> +			       Lio_SysCall);
> +		}
> +		if ((ret = writev(fd, &iov, 1)) == -1) {
> +			sprintf(Errormsg,
> +				"%s/%d writev(%d, iov, 1) nbyte:%d ret:-1, errno=%d %s",
> +				__FILE__, __LINE__, fd, size, errno,
> +				strerror(errno));
> +			return -errno;
> +		}
> +
> +		if (ret != size) {
> +			sprintf(Errormsg,
> +				"%s/%d writev(%d, iov, 1) nbyte:%d returned=%d",
> +				__FILE__, __LINE__, fd, size, ret);
> +		} else if (Debug_level > 1)
> +			printf
> +			    ("DEBUG %s/%d: writev completed without error (ret %d)\n",
> +			     __FILE__, __LINE__, ret);
> +
> +		return ret;
> +	}			/* LIO_IO_SYNCV */
>  	/* LIO_IO_ALISTIO */
>  	else if (method & LIO_IO_SYNCP) {
>  		io_type = "pwrite(2)";
> @@ -1150,6 +1178,34 @@ int lio_read_buffer(int fd,	/* open file descriptor */
>  		}
>  	}
>  	/* LIO_IO_ALISTIO */
> +	else if (method & LIO_IO_SYNCV) {

nit: FYI LIO_IO_ALISTIO was originally on a slightly different place.

Kind regards,
Petr

diff --git lib/tlibio.c lib/tlibio.c
index d6765f8c48..b877393df2 100644
--- lib/tlibio.c
+++ lib/tlibio.c
@@ -767,6 +767,7 @@ int lio_write_buffer(int fd,		/* open file descriptor */
 			return -errno;
 		}
 	}
+	/* LIO_IO_ALISTIO */
 	else if (method & LIO_IO_SYNCV) {
 		io_type = "writev(2)";
 
@@ -795,7 +796,6 @@ int lio_write_buffer(int fd,		/* open file descriptor */
 
 		return ret;
 	}			/* LIO_IO_SYNCV */
-	/* LIO_IO_ALISTIO */
 	else if (method & LIO_IO_SYNCP) {
 		io_type = "pwrite(2)";
 

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2025-04-30 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 13:36 [LTP] [PATCH] lib: tlibio.c: Restore LIO_IO_SYNCV Cyril Hrubis
2025-04-30 14:41 ` Avinesh Kumar
2025-04-30 14:41 ` Petr Vorel [this message]
2025-04-30 15:19   ` Petr Vorel
2025-04-30 14:48 ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250430144130.GA45846@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.