From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ED101FBEA6 for ; Fri, 27 Feb 2026 06:00:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772172058; cv=none; b=H7K8BwQ50OIa79DIc+CuZUgyh7EGyKdaPVL9HdTH8aVwPCf75+vE777eTz6a/A0dHeoweFvXYqX6NvHDJdphiuAYde2N3j1llxPyzDnlAy8gV1OjekiwzX2Dw11tLexkptqYR252TI4J2PNn5GVR2/TTxxOo6Dux44KkdMp33Zo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772172058; c=relaxed/simple; bh=06F6TJDFoB0GSIedWwlZgVYaTIy3QRaGRStZwONrCyA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VGiDhx3q2IN3Tj8vEntqWUKdm2LN9mUg/LxCTbTrngsubXEl7NtDtXvXIUlFXi9ENISsFCUolKTeEhZKuYbI79VZ1hdchDH/BnN9JaSzNZSbz0wfLmRnoFOHoVHfaZLR7+PzTpwPsKpcgdssVA2JGD4JXmiXGogBGbY4lSVT71Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JF7oaJYN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JF7oaJYN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 710ACC19425; Fri, 27 Feb 2026 06:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772172057; bh=06F6TJDFoB0GSIedWwlZgVYaTIy3QRaGRStZwONrCyA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JF7oaJYN7bOV1MhWWPcQDspOC8EaY3BuPLGbMcWwsc8o8jDICWTU/8UDoSb+SA+CI FIoC/oqm9gkup2NF65D2jNmuhekztK3MhXfnqzw7WIoyYbowQ8klOkQTPRxBE2DSCp bNr2twMukIFUG/gooRnqiZw90//hAt2x5bLUs9CrFo9rzAxB6bB14Ix9jLC5eWQE+p BMHFkcgfgCvLjzcoQXfHyD/nOb20huu8BMrSIgW5n9IzmFm6dypCZUIAiZJw7seqAn 37uxAxPwfQ0cFu3HHyiER85pRT1C9b/x+yk5DaCliDWGrwtm3Dv+290y8cIvKo8eCU MMt0dKetfeFNA== From: Damien Le Moal To: fio@vger.kernel.org, Jens Axboe , Vincent Fu Subject: [PATCH v3 3/8] engines: libaio: add support for DDIR_SYNCFS Date: Fri, 27 Feb 2026 14:55:33 +0900 Message-ID: <20260227055538.2334916-4-dlemoal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227055538.2334916-1-dlemoal@kernel.org> References: <20260227055538.2334916-1-dlemoal@kernel.org> Precedence: bulk X-Mailing-List: fio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Flag the libaio engine with the FIO_ASYNCIO_SYNC_SYNCFS flag to indicate that the syncfs operation is supported, with synchronous processing. Modify fio_libaio_queue() to call do_io_u_syncfs() for an io_u that has the DDIR_SYNCFS data direction. Signed-off-by: Damien Le Moal --- engines/libaio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/libaio.c b/engines/libaio.c index 0c207d60d94a..3242dadd4e0b 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -274,11 +274,14 @@ static enum fio_q_status fio_libaio_queue(struct thread_data *td, if (ld->queued == td->o.iodepth) return FIO_Q_BUSY; - if (io_u->ddir == DDIR_TRIM) { + if (io_u->ddir == DDIR_TRIM || io_u->ddir == DDIR_SYNCFS) { if (ld->queued) return FIO_Q_BUSY; - do_io_u_trim(td, io_u); + if (io_u->ddir == DDIR_TRIM) + do_io_u_trim(td, io_u); + else + do_io_u_sync(td, io_u); io_u_mark_submit(td, 1); io_u_mark_complete(td, 1); return FIO_Q_COMPLETED; @@ -456,6 +459,7 @@ FIO_STATIC struct ioengine_ops ioengine = { .name = "libaio", .version = FIO_IOOPS_VERSION, .flags = FIO_ASYNCIO_SYNC_TRIM | + FIO_ASYNCIO_SYNC_SYNCFS | FIO_ASYNCIO_SETS_ISSUE_TIME | FIO_ATOMICWRITES, .init = fio_libaio_init, -- 2.53.0