From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 42AB31E5716; Mon, 18 Nov 2024 19:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731959718; cv=none; b=YDpN+ZTGPxUKD1Y3Ng9BAart8GU2GDxRUNhG9XCEtp8DnXmnYSAo1dbcMjptlm+suWUbuKxuoxYlScExRDHu4XYofvOLJgzJZ8s4AfpC7k2HTO6Txv7N1aqQ5RA5jJH08v/FUpd54iXmQ9GIJFgAuUCn1UT2fcOcfWHwBIHaTWQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731959718; c=relaxed/simple; bh=COFra1cSkMU9Tj3eTsmknQdxGlsRcbc69822/W9wdvY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uojZk3JX4cx86tzyj+r0mcpQ65yniWEsSa0FHB8pWeQFk0U1zggne5zaqJYuo+qh3CYdABaznEUw6JMe90f+q9NBuZsFPYJcOvsEBOeZ5XKJWHVVhf2Tx/J8nKNlP9YdI3tatmB7FXcjzZw9ohhyRoO9CrKThRqdLEZOwJYRK5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.fm; spf=pass smtp.mailfrom=fastmail.fm; dkim=pass (2048-bit key) header.d=fastmail.fm header.i=@fastmail.fm header.b=X615/zyB; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jAhKgecz; arc=none smtp.client-ip=202.12.124.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.fm Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.fm Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.fm header.i=@fastmail.fm header.b="X615/zyB"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jAhKgecz" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id D094811401C4; Mon, 18 Nov 2024 14:55:14 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 18 Nov 2024 14:55:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1731959714; x=1732046114; bh=2gYqUUbZvLTaQ3uZ6C/LVYQaFrShCqkJFSOIxl7fPjg=; b= X615/zyBBjo1B4G41LulVTbxuSYsVJ3HIJHfv1w4EbMfG/MT4XpsWrlG4BAfAAmy ONTAN+QO/fUjSzLuUo3J0rKxKQOe85FQhQvur2qCSE/TXEyzvz5Lyqae+ABx8SQr b4HxuIdXKM+37eGGJRqiioMutslE5PX/R3xq70YXLPNXnM9ifm2eF2rwfil7Bo9B ZmwgfKEurQDNSFwqEr4bYkaF4QncI6DQD4rKpCHBM2K4YYAxkW3iojnIrTP2u/X9 9E03P6tsrx2elpL3jRtN80tgXVLTP884sW24LqDTxeIN4hqOxtoduWTSUH08dQr5 Hw+QgoDm658fF4wAazb2GQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1731959714; x= 1732046114; bh=2gYqUUbZvLTaQ3uZ6C/LVYQaFrShCqkJFSOIxl7fPjg=; b=j AhKgecz+RCn1LFujoT5BMC0NwUb7gwlDb7zSu1xyyDFmcTe3Qbmpo4ap3HXZ5OF/ OZWLJnPxRjWtIRSKvxbGCzHCB5iPKeMW87scgLA9vapWES4DwtF0NmumTCeKd1sS pk/z3gW9Ebkmh/SwyQlU1s7ViCKYSQBkwnlq8KiFSjyeeWfLXGQQYbpFaRihyxP9 px3Ep6No2l5Uxp9G4rdPnZp1eYy7KyI1i65OmT/m6tgp3XKawP46RwwZEJSSEODx /8QtD2AVwBwFJP3q38PX//qjRTCYBpJPOF2OKoNL3Z1Mp9YFukdJcAEHaYDqN1gp /vKv5oyG684VG0S5Ss4Lg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedtgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeeuvghrnhguucfutghhuhgsvghrthcuoegsvghrnhgurdhstghhuhgsvg hrthesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepudelfedvudevudev leegleffffekudekgeevlefgkeeluedvheekheehheekhfefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsggvrhhnugdrshgthhhusggvrhht sehfrghsthhmrghilhdrfhhmpdhnsggprhgtphhtthhopeduvddpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepjhhorghnnhgvlhhkohhonhhgsehgmhgrihhlrdgtohhmpdhr tghpthhtohepsghstghhuhgsvghrthesuggunhdrtghomhdprhgtphhtthhopehmihhklh hoshesshiivghrvgguihdrhhhupdhrtghpthhtoheprgigsghovgeskhgvrhhnvghlrdgu khdprhgtphhtthhopegrshhmlhdrshhilhgvnhgtvgesghhmrghilhdrtghomhdprhgtph htthhopehlihhnuhigqdhfshguvghvvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhr tghpthhtohepihhoqdhurhhinhhgsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpth htohepjhhoshgvfhesthhogihitghprghnuggrrdgtohhmpdhrtghpthhtoheprghmihhr jeefihhlsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: id8a24192:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Nov 2024 14:55:12 -0500 (EST) Message-ID: <97f18455-7651-42c1-9e76-4fb62220e739@fastmail.fm> Date: Mon, 18 Nov 2024 20:55:11 +0100 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v5 15/16] fuse: {io-uring} Prevent mount point hang on fuse-server termination To: Joanne Koong , Bernd Schubert Cc: Miklos Szeredi , Jens Axboe , Pavel Begunkov , linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Josef Bacik , Amir Goldstein , Ming Lei , David Wei , bernd@bsbernd.com References: <20241107-fuse-uring-for-6-10-rfc4-v5-0-e8660a991499@ddn.com> <20241107-fuse-uring-for-6-10-rfc4-v5-15-e8660a991499@ddn.com> From: Bernd Schubert Content-Language: en-US, de-DE, fr In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/18/24 20:32, Joanne Koong wrote: > On Thu, Nov 7, 2024 at 9:04 AM Bernd Schubert wrote: >> >> When the fuse-server terminates while the fuse-client or kernel >> still has queued URING_CMDs, these commands retain references >> to the struct file used by the fuse connection. This prevents >> fuse_dev_release() from being invoked, resulting in a hung mount >> point. > > Could you explain the flow of what happens after a fuse server > terminates? How does that trigger the IO_URING_F_CANCEL uring cmd? This is all about daemon termination, when the mount point is still alive. Basically without this patch even plain (non forced umount) hangs. Without queued IORING_OP_URING_CMDs there is a call into fuse_dev_release() on daemon termination, with queued IORING_OP_URING_CMDs this doesn't happen as each of these commands holds a file reference. IO_URING_F_CANCEL is triggered from from io-uring, I guess when the io-uring file descriptor is released (note: 'io-uring fd' != '/dev/fuse fd'). I guess I need to improve the commit message a bit. Cheers, Bernd