Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6997216rdb; Fri, 15 Dec 2023 14:36:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoKDHPUfHRhW0hZ0mhdTFHc0EdsuZNqurbdxA4f8YNAZ4DpQqe5n+XGiGn3hPbceEJ9MF7 X-Received: by 2002:a05:6358:c328:b0:16e:1f19:5b09 with SMTP id fk40-20020a056358c32800b0016e1f195b09mr10327335rwb.26.1702679806747; Fri, 15 Dec 2023 14:36:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702679806; cv=none; d=google.com; s=arc-20160816; b=zlJLyMYcAIYB0xA+ZNJ/ZwXURpG93HlB2UH4eB33FKN3sEfjFGYChC4vsj+C3jbxbn c8HvV54DHd1mRHCRVSNIRWiDsZePw31Re6NT6gmI1gX8yk88m/j373vhWwMieX8+twBt flFu9mMW9g5AzASIuerHk7TCrbDN3KDS1mBidKhIH6Hj7fVFzpjFZPwVAOYmCQlEdcIe yEX514YZGohwxQDkFSc20MFjYV1Q35YnZV2RdRKaqad3A/Z03/lCyCfmaulZAzIr+Kcn L5SBaE68mSqp+e94i3DFKbkw3dvlQ00vNsSVgtyXPv/SV/k4zioqIjVCwRzBBT4RouV1 D9cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:references:in-reply-to:subject:cc:to:from :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=QDOM5cciuA7gZCkDhQB2rHKAA8F9J8XyMkH9vahcTC0=; fh=n2OIJAYYgIvEcFzyu8kOVtBoHLFROoue64EqXUHtFnM=; b=hkpdX/BsaVHqcOgeViQ6UUn2lkmNbZopTguzc80kONOQZZUkhZWwhqj+Ts67gae5fM LQvDrEKJcDGfhxCmtWrqYX54SIRtrWlTa66kGyJIFzX7ojF7jVGkjGGdWRXYLpXs8vk7 UsakSVLWFUbiihhE4sPIEH4kMp1dS9kDXFXmu0TFpYlqmAed7EH/oJrqk4DnQJAeDxEB pfPKQtXzm82ce7jNvnma0kbbnI2IxRY2Tom+sP1x5X2d9HLJ6nMiDd2+eUCtMFGRo0+w 0Wj3ZdzaEDDxSjg2kVR3vG8Bb/g01v323uGyI5Vcvh6YZiiyVb0l0mdcw2tsr7Sr4nzK JwJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pSbRV4Xz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1i2TRR2V; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pSbRV4Xz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1i2TRR2V; spf=pass (google.com: domain of linux-kernel+bounces-1770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id pf6-20020a17090b1d8600b0028881bb2b5bsi15299588pjb.188.2023.12.15.14.36.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 14:36:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pSbRV4Xz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1i2TRR2V; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pSbRV4Xz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1i2TRR2V; spf=pass (google.com: domain of linux-kernel+bounces-1770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CFA8F287432 for ; Fri, 15 Dec 2023 22:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79CA518EDE; Fri, 15 Dec 2023 22:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="pSbRV4Xz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1i2TRR2V"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="pSbRV4Xz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1i2TRR2V" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20C2B18EBD; Fri, 15 Dec 2023 22:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6E1D51F88B; Fri, 15 Dec 2023 22:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702679791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDOM5cciuA7gZCkDhQB2rHKAA8F9J8XyMkH9vahcTC0=; b=pSbRV4XzcRQMsQ1TnrTizbWu5fM0Tekn+EzMtyjFCUh/I1YSYB7wjp8qu+NjScH5Xwnckq 7lPPwZbit/U5qPiGt/e8ePL1+sDCI1j5y0V8BD4NBgEA2tz8gHeUTp/STWYljUV3VwZHtE F/jIItoV1zqk+T9EcqKD3N87j4rvKcE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702679791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDOM5cciuA7gZCkDhQB2rHKAA8F9J8XyMkH9vahcTC0=; b=1i2TRR2VjuT1ES7TrxrmpS7tUVIZ95ylzOo8HAXssIfqjZVJ67MQCfe7rZ3P7ScjQsuf+6 tbcVQh0ZdGnyXLDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702679791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDOM5cciuA7gZCkDhQB2rHKAA8F9J8XyMkH9vahcTC0=; b=pSbRV4XzcRQMsQ1TnrTizbWu5fM0Tekn+EzMtyjFCUh/I1YSYB7wjp8qu+NjScH5Xwnckq 7lPPwZbit/U5qPiGt/e8ePL1+sDCI1j5y0V8BD4NBgEA2tz8gHeUTp/STWYljUV3VwZHtE F/jIItoV1zqk+T9EcqKD3N87j4rvKcE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702679791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDOM5cciuA7gZCkDhQB2rHKAA8F9J8XyMkH9vahcTC0=; b=1i2TRR2VjuT1ES7TrxrmpS7tUVIZ95ylzOo8HAXssIfqjZVJ67MQCfe7rZ3P7ScjQsuf+6 tbcVQh0ZdGnyXLDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3EC9E137D4; Fri, 15 Dec 2023 22:36:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id 1xndOevUfGVrTgAAD6G6ig (envelope-from ); Fri, 15 Dec 2023 22:36:27 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "NeilBrown" To: "David Laight" Cc: "Al Viro" , "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. In-reply-to: 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>, <20231211232135.GF1674809@ZenIV>, <170242728484.12910.12134295135043081177@noble.neil.brown.name>, Date: Sat, 16 Dec 2023 09:36:25 +1100 Message-id: <170267978502.12910.3767924819236993323@noble.neil.brown.name> X-Spam-Level: X-Spam-Level: X-Spamd-Result: default: False [-3.10 / 50.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[10]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: -3.10 X-Spam-Flag: NO On Sat, 16 Dec 2023, David Laight wrote: > ... > > > 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. > > > > >=20 > > Can you say more about "not on an arbitrary filesystem" ? > > I guess you means that procfs and/or sysfs might be problematic as may > > similar virtual filesystems (nfsd maybe). >=20 > Can nfs export an ext4 fs that is on a loopback mount on a file > that is remotely nfs (or other) mounted? Sure. There is no reason this would cause a problem. If the nfs mount were also a loopback mount, that might be interesting. i.e. You have a local filesystem, containing a file with a filesystem image. You nfs-export that local filesystem, and nfs mount it on the same host. Then you loop-mount that file in the nfs-mounted filesystem. Now you are getting into uncharted waters. I've testing loop-back NFS mounting and assure that it works. I haven't tried the double-loop. But if that caused problem, I though it would be fput. It would be fsync or writeback which causes the problem. >=20 > As soon as you get loops like that you might find that fput() starts > being problematic. When calling fput on a regular file there are, I think, only two problem areas. One is that the fput might lead to a lazy-filesystem unmount completing. That only applies to MNT_INTERNAL filesystems, and they are unlikely to be exported (probably it's impossible, but I haven't checked). The other is synchronous (or even async) IO in the filesystem code, maybe completing an unlink or a truncate. This is no worse than any other synchronous IO that nfsd does. Thanks, NeilBrown >=20 > I'm also sure I remember that nfs wasn't supposed to respond to a write > until it had issued the actual disk write - but maybe no one do that > any more because it really is too slow. > (Especially if the 'disk' is a USB stick.) >=20 > David >=20 > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK > Registration No: 1397386 (Wales) >=20