Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Oct 20, 2023 RISC-V

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit c5d8ce3fc736210ded83b126c71e3225c7ffd7c9:

ci: explicitly install pygments and certifi on macos (2023-10-16 10:54:21 -0400)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to f8735bf1fb208bc1b6b1ca818413c9e41944e813:

Merge branch 'master' of https://github.com/michalbiesek/fio (2023-10-20 04:32:39 -0600)

----------------------------------------------------------------
Jens Axboe (3):
Merge branch 'fix_issue_1642' of https://github.com/zqs-Oppenauer/fio
Fio 3.36
Merge branch 'master' of https://github.com/michalbiesek/fio

Michal Biesek (1):
riscv64: add syscall helpers

Shai Levy (2):
configure: improve pthread_sigmask detection.
helper_thread: fix pthread_sigmask typo.

Vincent Fu (1):
Merge branch 'master' of https://github.com/shailevi23/fio

zhuqingsong.0909 (1):
fix assert failed when timeout during call rate_ddir.

 FIO-VERSION-GEN     |  2 +-
 arch/arch-riscv64.h | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |  3 +-
 helper_thread.c     |  5 ++--
 io_ddir.h           |  1 +
 io_u.c              | 10 +++++--
 zbd.c               |  1 +
 7 files changed, 101 insertions(+), 7 deletions(-)

---

Diff of recent changes:

FIO-VERSION-GEN +1 -1
index 4b0d56d0..cf8dbb0e 100755
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=FIO-VERSION-FILE
-DEF_VER=fio-3.35
+DEF_VER=fio-3.36
 
 LF='
 '
arch/arch-riscv64.h +86 -0

90 lines not on this page · raw message

configure +2 -1
index 36184a58..742cb7c5 100755
@@ -864,7 +864,8 @@ cat > $TMPC <<EOF
 #include <signal.h> /* pthread_sigmask() */
 int main(void)
 {
-  return pthread_sigmask(0, NULL, NULL);
+  sigset_t sigmask;
+  return pthread_sigmask(0, NULL, &sigmask);
 }
 EOF
 if compile_prog "" "$LIBS" "pthread_sigmask" ; then
helper_thread.c +3 -2
index 53dea44b..2a9dabf5 100644
@@ -106,13 +106,14 @@ static int read_from_pipe(int fd, void *buf, size_t len)
 
 static void block_signals(void)
 {
-#ifdef HAVE_PTHREAD_SIGMASK
+#ifdef CONFIG_PTHREAD_SIGMASK
 	sigset_t sigmask;
 
+	int ret;
+
 	ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
 	assert(ret == 0);
 	ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
-	assert(ret == 0);
 #endif
 }
 
io_ddir.h +1 -0
index 217eb628..280c1e79 100644
@@ -11,6 +11,7 @@ enum fio_ddir {
 	DDIR_WAIT,
 	DDIR_LAST,
 	DDIR_INVAL = -1,
+	DDIR_TIMEOUT = -2,
 
 	DDIR_RWDIR_CNT = 3,
 	DDIR_RWDIR_SYNC_CNT = 4,
io_u.c +7 -3
index 07e5bac5..13187882 100644
@@ -717,7 +717,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
 		 * check if the usec is capable of taking negative values
 		 */
 		if (now > td->o.timeout) {
-			ddir = DDIR_INVAL;
+			ddir = DDIR_TIMEOUT;
 			return ddir;
 		}
 		usec = td->o.timeout - now;
@@ -726,7 +726,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
 
 	now = utime_since_now(&td->epoch);
 	if ((td->o.timeout && (now > td->o.timeout)) || td->terminate)
-		ddir = DDIR_INVAL;
+		ddir = DDIR_TIMEOUT;
 
 	return ddir;
 }
@@ -951,7 +951,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
 
 	set_rw_ddir(td, io_u);
 
-	if (io_u->ddir == DDIR_INVAL) {
+	if (io_u->ddir == DDIR_INVAL || io_u->ddir == DDIR_TIMEOUT) {
 		dprint(FD_IO, "invalid direction received ddir = %d", io_u->ddir);
 		return 1;
 	}
@@ -1419,6 +1419,10 @@ static long set_io_u_file(struct thread_data *td, struct io_u *io_u)
 		put_file_log(td, f);
 		td_io_close_file(td, f);
 		io_u->file = NULL;
+
+		if (io_u->ddir == DDIR_TIMEOUT)
+			return 1;
+
 		if (td->o.file_service_type & __FIO_FSERVICE_NONUNIFORM)
 			fio_file_reset(td, f);
 		else {
zbd.c +1 -0
index caac68bb..c4f7b12f 100644
@@ -2171,6 +2171,7 @@ retry:
 	case DDIR_WAIT:
 	case DDIR_LAST:
 	case DDIR_INVAL:
+	case DDIR_TIMEOUT:
 		goto accept;
 	}