Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp390260lqp; Mon, 10 Jun 2024 07:15:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1cZ4BxGQ7fgwGAT0IdlR9dcqHt6rKao3A2ggMs7D1YnOaWHq93a1S3qErbcb0CtFDVrjqtYhKmz8hkZE4HTLOcFtQ0vfsp5nv6F0PJQ== X-Google-Smtp-Source: AGHT+IGKIN0WYDvQ1Eg+eW8hOtwgG343YcZrosyWyTjHDNO7GdGM8BzC47oW0/QZV6y0W/z6ZNm9 X-Received: by 2002:a19:8c42:0:b0:52c:7fbf:39f6 with SMTP id 2adb3069b0e04-52c7fbf3b15mr4477698e87.26.1718028925661; Mon, 10 Jun 2024 07:15:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718028925; cv=pass; d=google.com; s=arc-20160816; b=qwyqPFtqOYZqzFByE4uxiIT8QQh7rFy2d4UrYi7dDerKDInYSsmKKcQsxgAZRMX03T aq7ADGOKFMLwd+j9VCYYQkzllJjbarH+tolFq9Ou5P53wDWYFzSG0cr7CdcdxuDMHDMi 8WKf6E+nkDfn7Sn1jsRysGAQMkg7CShH3C2ElVw3cMTyHMCrUBrlpF4vx6GOXO4ityZO hmDJXEHZeFs1zToccqhSIFDO8bsQVHWdNV6lNPg0XBUjYYPKNsGquUNPJMi4gsKvVvFf IouMPKHpxSpmdrissNVCMUUJZ8tqvI2oRaoeniDZTFjSr0owSQTZU2hDHFLtDsq3fPsb pWtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=rE4tFE9CZ/+gRbB9ULW6+AF11oW7AZsnF8V1vYN9wWw=; fh=/goR3vrk36d815D882+hFgyUZ89SNNac+aJJE5/EWgQ=; b=E6wCBe/Gi3ElYx3WAX1Hff2Pf8lsNik6FdO2z3gBoYi64+5RB+IX//I4zbos7FxhXR Sa1hOuq2BmkXonJcPKIFNvOiujUfy3bqS3Yjv4OCswFI83aX01iL8QNRWLoP0dMoWb/O mOUVDRmj7n11suKFgc9izzgpj5WV//70oqudkV0SEQ4qe+eGcugytOBwl8el3R/xv8VM c5R2zNCSBmBsklIFjaXG0c5RRmqvwj1G/rnlLROa116Qxvz9pMZP6AfriXYlyGHGntrD LPWaGIypmSnin1GR7jtb+9QMb4+C4aMzRKKz89liKg9WiHQh/xx0N3DanIo+UO9sjScs 8h0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PW4DWXpr; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-208349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208349-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80749841si471819366b.973.2024.06.10.07.15.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 07:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PW4DWXpr; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-208349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208349-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5C3AF1F20F99 for ; Mon, 10 Jun 2024 14:15:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A51182889; Mon, 10 Jun 2024 14:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PW4DWXpr" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 85C2112FB1A; Mon, 10 Jun 2024 14:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028885; cv=none; b=ihzA48LM20ZNr6tAz9GDx7/E/7bpxticJObWjyvfEqQ+NPGYBzzSQsJVxfXR57h81se3bu8AepPPKwsn+nD5adi8PzmA/StK9xyvWy9+t+LsZKEReSqhql3twuIXiLOqUyJCA2e055X3grkrYMS0sqamAa2n1wkdR3z8nTTifWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028885; c=relaxed/simple; bh=FD5N5uRHdIwTmFxwbE42FcAyZnfdFcanXBD2EDz7GFY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mgx+KIFayO5zqBbDeP+O7OZxDkPBhfo7c3wW87fYmU9IGfxmaUBVkQmKvAfSpCRF/PvQ2RlzDvDq8SsS9Z/rMTRU+8c4r1Gw9Ibw5hjQJ9jOYyBAPb/N90xxQyDPi8Uop6hjE1pYljO7X4MaIvTfV0OgtWBMNKph1GhaeWJQSzI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=PW4DWXpr; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rE4tFE9CZ/+gRbB9ULW6+AF11oW7AZsnF8V1vYN9wWw=; b=PW4DWXprY5eszna0+c4qSpHEfH 7bFkB/WIKlc5w4yHHRKOgCsOwmrBX2ssM9AbwjZimMgt1MHq+Y0L31L83GmpXBelMLuxyQDvr5sEY HZfCEysvvK9X2nm8MKc1voW7mIZw9uh8tscXEZPyGQxahtbORCUyvF4iRFgi7eZpfJJ2UX/79MzH4 FQbcyk4TIZFD56CN1Tr2Fm95MoCN/0fkKAdDeleXxvJHZIqI7+eA11pS2FhAyhmZO5NoGYJR7NdYS m7uXox63OMoM/WPiC3iiQ0WJnxf20NZhKdii3BEEkO5cOXmBGbhzn1nyMTsMgbTGdJaB/z1zxZ7w8 RUTmr72Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGfnH-00000005NB2-01jE; Mon, 10 Jun 2024 14:14:43 +0000 Date: Mon, 10 Jun 2024 07:14:42 -0700 From: Christoph Hellwig To: Cyril Hrubis Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [PATCH] loop: Disable fallocate() zero and discard if not supported Message-ID: References: <20240607091555.2504-1-chrubis@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Jun 10, 2024 at 04:13:23PM +0200, Cyril Hrubis wrote: > Do we need noinline attribute for the function as well or unlikely() in > the if condition? unlikely sounds like the right thing here. > > (and maybe one day we figure out a way for the file system to > > advertise what fallocate modes it actually supports..) > > One of my ideas was to try fallocate() with zero size in the > loop_reconfigure_limits() to see if we get EOPNOTSUPP but for that to > work we would have to make sure that we do not bail early on zero size > in the vfs layer... And the VFS layer doesn't know, it has to go all the way into the file system..