Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4301337rdb; Mon, 11 Dec 2023 15:21:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhojbpiE+3HMeWDvbe6s5xXYCe4OTgGWb36qQRypRdZpxZmTXbbqdCyH5QKuu50IwJOqEq X-Received: by 2002:a05:6808:3308:b0:3ba:1042:aee0 with SMTP id ca8-20020a056808330800b003ba1042aee0mr1820474oib.47.1702336909326; Mon, 11 Dec 2023 15:21:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702336909; cv=none; d=google.com; s=arc-20160816; b=ghvajmoR2l+FLfdGv1+L2onQjX/p+AomIGBRnQCAtEJAp5u7kkD5wmFYIFroKBsEIa 7C6G7DgsIwIoZDn5/l6HTlufiVRKSU4CJqFKVBog9wLOHTwCIgBT6X1i8VyOwfbUNmjX rYXWrT3BvajPQBYKeQfo3lkCr7wupNo3U2l4nrdVMXRxxlHZEBFnMZcbU5hT8tw2Vows gremNwA6P+nA3MMEbEmc2rpHTa1YcAfzhLqyXVLfiu8wXPmUCm469E2Ab5ZIP1jNzhdk 3uTU06OJSgOBznvfeYCkyqkTlhNB71DB8yTVoLoesp8Tx/vRyLgXEHxNop7AcrVatE8N UU1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=mERUYNAEtYKlaEK1K617SrRF291lNcNfmDSKNE8j018=; fh=LcgCyFaL6RR0V5e7XH4Is3imaQiaqFv7Vgn+NZf3Wno=; b=rFoZhmtf5CoFOFg0EWnbtB0Y4aO9usp0QeZtMH+dWLHqk2VkFRDia0/iIocCWSO84D TYwrDBHs8FqaGmOrKt1oe3GHdB1xcSyoZXjaZANS3Tb2Lv/6VDDkfNkhEN0uhnXXxfYh sRQNcu24ttXDiGiebFyvE1ROrj7jO3MFLY9uxfIn8Slmj2OF6v81Wq2ui+tZAY4s9sWj ZTYEehPOoYzX0gOYF6NYiredSnmMA6Uu8gwYlMZg08r9Aj1sFoxFUZGuuoovjDjrErjO /5pcmF5AWglLbE9m4uzB8F5tnPHvIiYEva/M2pPKMBif8lccGmS4plDDdmQRfOQ7Whzf XE5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="k/nDpvbW"; spf=pass (google.com: domain of linux-nfs+bounces-502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id sq6-20020a05620a4ac600b0077d79f58be5si8668883qkn.523.2023.12.11.15.21.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 15:21:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="k/nDpvbW"; spf=pass (google.com: domain of linux-nfs+bounces-502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F3DE01C2146B for ; Mon, 11 Dec 2023 23:21:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21C8D56745; Mon, 11 Dec 2023 23:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="k/nDpvbW" X-Original-To: linux-nfs@vger.kernel.org Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD6BCB; Mon, 11 Dec 2023 15:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mERUYNAEtYKlaEK1K617SrRF291lNcNfmDSKNE8j018=; b=k/nDpvbWr9HpLm/1Ve+oUVXWMY jz9h+D7jC8uEN/X+zIs+scm6ZJNlB+z0mjG9XzGbWLBWCtGFlBBaDtBqT7YOQosaJ+PVHRL/u51He tVa3Lgw3Rdtu2fs9EP9PJkPOVuVHTN2tPF17ahTpWnFBPu7SQ7XitooPSrH5aoP8HCwUOKtTLnnYu 4ks7JfsXNMI3TYSGi6obww7fpOJ6Thcwjo5qnmMB1xGGFRmeLvffsBU1Jiv3hRgYQrX3lNXyd2h1q f7i+o/zfhoWiMhB6vHETgaYWhQ6G8f46u+tpuWMRQ6JLqHPRc839L/Thdnlqeg3qvYyly04UaE5z0 w9Cjt2+w==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rCpah-00B2zy-2G; Mon, 11 Dec 2023 23:21:35 +0000 Date: Mon, 11 Dec 2023 23:21:35 +0000 From: Al Viro To: NeilBrown Cc: Chuck Lever , Christian Brauner , Jens Axboe , Oleg Nesterov , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/3] nfsd: use __fput_sync() to avoid delayed closing of files. Message-ID: <20231211232135.GF1674809@ZenIV> References: <20231208033006.5546-1-neilb@suse.de> <20231208033006.5546-2-neilb@suse.de> <170224845504.12910.16483736613606611138@noble.neil.brown.name> <20231211191117.GD1674809@ZenIV> <170233343177.12910.2316815312951521227@noble.neil.brown.name> <20231211231330.GE1674809@ZenIV> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231211231330.GE1674809@ZenIV> Sender: Al Viro On Mon, Dec 11, 2023 at 11:13:30PM +0000, Al Viro wrote: > dentry_kill() means ->d_release(), ->d_iput() and anything final iput() > could do. Including e.g. anything that might be done by afs_silly_iput(), > with its "send REMOVE to server, wait for completion". No, that's not > a deadlock per se, but it can stall you a bit more than you would > probably consider tolerable... Sure, you could argue that AFS ought to > make that thing asynchronous, but... > > Anyway, it won't be "safe to use in most contexts". ->mmap_lock alone > is enough for that, and that's just the one I remember to have given > us a lot of headache. And that's without bringing the "nfsd won't > touch those files" cases - make it generally accessible and you get > to audit all locks that might be taken when we close a socket, etc. PS: put it that way - I can buy "nfsd is doing that only to regular files and not on an arbitrary filesystem, at that; having the thread wait on that sucker is not going to cause too much trouble"; I do *not* buy turning it into a thing usable outside of a very narrow set of circumstances.