From nobody Mon Feb 9 12:15:12 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1770466250; cv=none; d=zohomail.com; s=zohoarc; b=AvZgbwlEW3uogIecUdgDFlnPzkJ9nSpQK0ZfKHSa6g/pcyi1D2uCYYe2LQmMYNbbkrJrlsFwkD4haMZ+JtXsLHfRH8Nw5C/0mrcRrBJgLCHvfdpcitBUTa2YgoQALXg3HNCtmB57n+yh4E77XRx6BQk51Bsx7pAzw+hLNnp885A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770466250; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yRvq4zI7MIK6rCqCt35/LJLjg5NnaBCJ0/CBYvfVPw8=; b=NTmeNPwmXe9hG/o0hOBi9nPHqQEIzFdzEKb9y18Pp0cIgXEeTTPSqYUPLEEL1GcI1rmqTDOhw9WOIlRakajrSFiFskV6E0+vwUUd5oYnyRlujPMsTx1I2vgzpecgKjkT6o2Hn8RzNXmZLQ3BPV0o5SlwGN80Oai2+SI32/WpOiY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770466250896889.0580359763587; Sat, 7 Feb 2026 04:10:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voh8n-0007GH-LH; Sat, 07 Feb 2026 07:10:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1voh8i-0007Fa-NM for qemu-devel@nongnu.org; Sat, 07 Feb 2026 07:10:17 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voh8g-000387-PU for qemu-devel@nongnu.org; Sat, 07 Feb 2026 07:10:16 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-35621aa8c7fso132187a91.2 for ; Sat, 07 Feb 2026 04:10:13 -0800 (PST) Received: from brian.. (n058152022104.netvigator.com. [58.152.22.104]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b30f899csm2178530a91.3.2026.02.07.04.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Feb 2026 04:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770466213; x=1771071013; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yRvq4zI7MIK6rCqCt35/LJLjg5NnaBCJ0/CBYvfVPw8=; b=O6yL/A9C80lt4wDTjHRHZ8sOiHWXKCmm02XLO57mhcYwDqlmz/JPOwiJ0SXf7Qi2gF /7siuQZEh/duC7j5Gh9swRf7qfcClam8nU6oRQrN4eC5dlCVDJL9451SdmdZHzVJywhL faxbO2vWbqdpf/lkhi03QVyzaV7Gh2BmvQWgQoPxII7jt2ZOSifOJBfC8Hv7ecxpOaVZ Ds/hMKYJyHLaZBFf855aCyAswhiyywUfQR3Ci5ns9Nd2s2B5mqDX1oBE/fGH4NCL6Kq6 Ky31r3jMjoiZsPCwbrE67tGrnf65YA6hMbvH8D82RHJJo2DMyZLQMnardvZvQdjwZtQ+ UQ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770466213; x=1771071013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yRvq4zI7MIK6rCqCt35/LJLjg5NnaBCJ0/CBYvfVPw8=; b=reRhcDEEcoQEVKBbQU79tAz9oqE1BfUPfziHyilWwBWzWeQUptblrqdcGgABKeEhT1 GW/BHdGpII9/43nUsvrSSK09ycCSfNkoKfaRZuPLiwUszCWwGyGZh56BshArcTD/ahxF /M4POsU9C7G49eYNgQnzRo0h0UVaKv0jvYBnUJmegIl2Mal419ufhEE3dIBj4TDSiA4e AIHFWIoL9ngdfEnrpG8Z4MXylPMvIgD6lbLrCTpYs9wlDP08qHt+zxSq8HTOVKx+Y64z Lv/6PeQ822MhAe2pihZZuflHI0P/MMX2CHHjYAhnFXlRVQLm5HagZ1/F+aQ6YLi96t96 WJfg== X-Gm-Message-State: AOJu0Ywt/LHvtkvrTTA6rS2i00WmWb0atzIVpHkk4X0tvO0GMhqCHAhO Ih4bnFp7f84h3NhmYH4VE/l0EZVsYvE1vwSqq0JuZ8AHwMJ/tNVDRGaG X-Gm-Gg: AZuq6aKFtLnw3/h4qdxPUBuCb//UZa0leR/qIj30yTW+zE8rCPBYm9pxJPRVP1gSnCF BBxZ6hbW3wxm839VYAMfvflXA6GZK6tBACbb2WsHKOtrVaHI22/lGgza37fNhiuVeM7XwPpkqUF cuJcQOJwkPP7IPviAyuOYfivCBzYNo7Wo3AB/0dG1bnZBNcwgeoqrVUDJUUedG3qcez0Tg831ZS 1t2EqLXTxS2OQ5J8f0nmofStNYUVYESl/Eowe8h4/Jb4Y1EVcF0KL0JVURFtTCDwzkC0XGVxSJg hPVQLnxmbxBAkDZH5YD59QumpgubuBwIpbow6MQ/tuE+26q5lTiB0Oaq13Znlj13lwDw/vcd2q+ f5pjcbk78+5lTAoTV1zxM81ajQnC/ZGi9Anbio47QSSyGWD3dfX1cReTXJWgWaPnHEql28gUrHV x2E+gjCmoI62uBw5MX1TXKxD1/A1dBRM9o/Tzi X-Received: by 2002:a17:90b:3945:b0:356:1edc:b64 with SMTP id 98e67ed59e1d1-3561edc1183mr1148725a91.8.1770466212791; Sat, 07 Feb 2026 04:10:12 -0800 (PST) From: Brian Song To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hibriansong@gmail.com, hreitz@redhat.com, kwolf@redhat.com, eblake@redhat.com, armbru@redhat.com, stefanha@redhat.com, fam@euphon.net, bernd@bsbernd.com Subject: [Patch v4 6/7] fuse: add 'io-uring' option Date: Sat, 7 Feb 2026 20:09:00 +0800 Message-ID: <20260207120901.17222-7-hibriansong@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260207120901.17222-1-hibriansong@gmail.com> References: <20260207120901.17222-1-hibriansong@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=hibriansong@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1770466254181154100 Content-Type: text/plain; charset="utf-8" This patch adds a new storage export option for storage-export-daemon to enable FUSE-over-io_uring via 'io-uring=3Don|off' (default: off). The initialization phase performs a protocol handshake via the legacy /dev/fuse interface before transitioning to the io_uring mode. If multiple IOThreads are configured, the export distributes the uring queues to handle requests concurrently. Suggested-by: Kevin Wolf Suggested-by: Stefan Hajnoczi Signed-off-by: Brian Song Acked-by: Markus Armbruster --- block/export/fuse.c | 3 +-- docs/tools/qemu-storage-daemon.rst | 7 +++++-- qapi/block-export.json | 5 ++++- storage-daemon/qemu-storage-daemon.c | 1 + 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/block/export/fuse.c b/block/export/fuse.c index abae83041b..09642ccf5a 100644 --- a/block/export/fuse.c +++ b/block/export/fuse.c @@ -587,8 +587,7 @@ static int fuse_export_create(BlockExport *blk_exp, assert(blk_exp_args->type =3D=3D BLOCK_EXPORT_TYPE_FUSE); #ifdef CONFIG_LINUX_IO_URING - /* TODO Add FUSE-over-io_uring Option */ - exp->is_uring =3D false; + exp->is_uring =3D args->io_uring; exp->uring_queue_depth =3D FUSE_DEFAULT_URING_QUEUE_DEPTH; #else if (args->io_uring) { diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-d= aemon.rst index 35ab2d7807..ad0f41a78f 100644 --- a/docs/tools/qemu-storage-daemon.rst +++ b/docs/tools/qemu-storage-daemon.rst @@ -78,7 +78,7 @@ Standard options: .. option:: --export [type=3D]nbd,id=3D,node-name=3D[,name= =3D][,writable=3Don|off][,bitmap=3D] --export [type=3D]vhost-user-blk,id=3D,node-name=3D,addr.= type=3Dunix,addr.path=3D[,writable=3Don|off][,logical-block-si= ze=3D][,num-queues=3D] --export [type=3D]vhost-user-blk,id=3D,node-name=3D,addr.= type=3Dfd,addr.str=3D[,writable=3Don|off][,logical-block-size=3D][,num-queues=3D] - --export [type=3D]fuse,id=3D,node-name=3D,mountpoint=3D[,growable=3Don|off][,writable=3Don|off][,allow-other=3Don|off|auto] + --export [type=3D]fuse,id=3D,node-name=3D,mountpoint=3D[,growable=3Don|off][,writable=3Don|off][,allow-other=3Don|off|auto][,i= o-uring=3Don|off] --export [type=3D]vduse-blk,id=3D,node-name=3D,name=3D[,writable=3Don|off][,num-queues=3D][,queue-size=3D][,logical-block-size=3D][,serial=3D] is a block export definition. ``node-name`` is the block node that shoul= d be @@ -111,7 +111,10 @@ Standard options: that enabling this option as a non-root user requires enabling the user_allow_other option in the global fuse.conf configuration file. Set= ting ``allow-other`` to auto (the default) will try enabling this option, and= on - error fall back to disabling it. + error fall back to disabling it. Once ``io-uring`` is enabled (off by de= fault), + the FUSE-over-io_uring-related settings will be initialized to bypass the + traditional /dev/fuse communication mechanism and instead use io_uring to + handle FUSE operations. The ``vduse-blk`` export type takes a ``name`` (must be unique across th= e host) to create the VDUSE device. diff --git a/qapi/block-export.json b/qapi/block-export.json index 9ae703ad01..37f2fc47e2 100644 --- a/qapi/block-export.json +++ b/qapi/block-export.json @@ -184,12 +184,15 @@ # mount the export with allow_other, and if that fails, try again # without. (since 6.1; default: auto) # +# @io-uring: Use FUSE-over-io-uring. (since 10.2; default: false) +# # Since: 6.0 ## { 'struct': 'BlockExportOptionsFuse', 'data': { 'mountpoint': 'str', '*growable': 'bool', - '*allow-other': 'FuseExportAllowOther' }, + '*allow-other': 'FuseExportAllowOther', + '*io-uring': 'bool' }, 'if': 'CONFIG_FUSE' } ## diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index eb72561358..0cd4cd2b58 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -107,6 +107,7 @@ static void help(void) #ifdef CONFIG_FUSE " --export [type=3D]fuse,id=3D,node-name=3D,mountpoint=3D<= file>\n" " [,growable=3Don|off][,writable=3Don|off][,allow-other=3Don|off= |auto]\n" +" [,io-uring=3Don|off]" " export the specified block node over FUSE\n" "\n" #endif /* CONFIG_FUSE */ -- 2.43.0