From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 958A4C30653 for ; Thu, 4 Jul 2024 23:56:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E37196B009B; Thu, 4 Jul 2024 19:56:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DE7186B009C; Thu, 4 Jul 2024 19:56:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD59A6B009D; Thu, 4 Jul 2024 19:56:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B12246B009B for ; Thu, 4 Jul 2024 19:56:40 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 505F8813A8 for ; Thu, 4 Jul 2024 23:56:40 +0000 (UTC) X-FDA: 82303732560.16.087B752 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf05.hostedemail.com (Postfix) with ESMTP id 2BDC1100003 for ; Thu, 4 Jul 2024 23:56:37 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=i3UJVn4O; spf=none (imf05.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720137385; a=rsa-sha256; cv=none; b=1izjPWv9q5w9szmuDErYlMaF1JMnhr26s5H/qr8fbGXPJV1gpixFxCwst51GRCH3j6H39k BXyBjHDprXlJEzrQY+gn09wWl4yX+pO7exdcdojrsaHCLBtT1oNhekAEWeJOhwtB4v/Y1r O2Wq3cBvooGlF8Kts/l8loKuYkxz0oI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=i3UJVn4O; spf=none (imf05.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720137385; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4RxnX5dG7TVykPcShsgjuHYL9eFLAVZdu3tr/LHBW7w=; b=rLR4MusMz1GScb/UgAEg89U+CInB2A9JHKXvbtNGqBWcQBl1X/8Ro466z/vD8rUiU8OBrG K6L2MesEjOtjPGN7DErv8wpsZYCADJ97VSpPEXKci15mMAnyacfWd9T9e6uIv26YF4sV/l ewXrZk0adMpiJDCmDbAIBAHp0ZN2I0I= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=4RxnX5dG7TVykPcShsgjuHYL9eFLAVZdu3tr/LHBW7w=; b=i3UJVn4O5dAMVdhCht3dXBnhOy WsY/cAA4hHyjzGtrmCdt8bkRXNnNyLk4H8crFOG1YMEy5dZ99Q3xfyPn+DWbVdOH6AFxDPWAdthOU QFzC9+L/8oMMwdxR6yXarHEZzEzFiefH2zEffWrkEqYgK+3fhRQVC3pAY/wmGqjrnMRyWyBBhgSoD YsC4d5zkPtyrRL/pr17skDLdar1dfKxyD231dV0Bgl0TxG+RKrrD+nBfWWiopZhRY1wE/y5WtjMSk MXLSjw6FripgICfXYHGRyXQn8OP5qKBRW8zIZv2+Z0hGnlEZhav81Wevs4yX0UCAIAu9jLRgan6dA HGRAEbBA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPWJQ-00000003N58-190o; Thu, 04 Jul 2024 23:56:28 +0000 Date: Fri, 5 Jul 2024 00:56:28 +0100 From: Matthew Wilcox To: Dave Chinner Cc: Ryan Roberts , "Pankaj Raghav (Samsung)" , chandan.babu@oracle.com, djwong@kernel.org, brauner@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, yang@os.amperecomputing.com, linux-mm@kvack.org, john.g.garry@oracle.com, linux-fsdevel@vger.kernel.org, hare@suse.de, p.raghav@samsung.com, mcgrof@kernel.org, gost.dev@samsung.com, cl@os.amperecomputing.com, linux-xfs@vger.kernel.org, hch@lst.de, Zi Yan Subject: Re: [PATCH v8 01/10] fs: Allow fine-grained control of folio sizes Message-ID: References: <20240625114420.719014-1-kernel@pankajraghav.com> <20240625114420.719014-2-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: jezdbbbyeqzcfh1regf4tzaed5zt9j7q X-Rspamd-Queue-Id: 2BDC1100003 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1720137397-526842 X-HE-Meta: U2FsdGVkX1+BgdwAWeHaGdbhQMC1cn5Hbv1gEDBaRaJ00cfLf7SheYPyu8DyJP3zLpe5wL+gXG0uE7Lpj21bRv0ZJpVHZ0VEGqidQqeOBnXE2CxUoZRDhp3ZpLQXdaUzffu9tLgvxkXE9qd6WYcbJ0slSZGktNfU6ch6HSm+8wUEll6QFK3tfZ7v/PQvMdonNUmo6jGVw197tMlSqeNPZezMhJe3yvcu7KgzuvGeFXRNTrgZzwJYPg2sjHE/isvzEST2kjEWmDHieJPpaxD2zuCNiwku17hlyr2w0x4e6UNG7oAdJaQ/3aZP44hKyxzb0Ec0DiMLTZecJn/wwzXddnEzU8i6Bc7rXdydgfsGrm8LiJRPyG2cQiU2RgUND+ibDoPLenNLQO3O8MXOJ+dHhBSqE/TkIRjTM8KGTH6NIzAG6omoboGRHAwzYGqJRvSEqzhYVU5vNMhL02IHtOr0nB+lOvI07VbrQUP6t+y8RKn+Yc2uCCIxbiHx5vl48XNPFT/rC/MCOaxhbi2OrVoBco/TETH6AekeJqpYcNjK3sitdC2j1LafCy64WmnjzSahqSsyP0HJtlemwK2BjY6JO1dqnUM2vNepHTlxTeIea/M84GR3QTgQqxupXrUO5jGJqhT0o7u2bsGAr/Db8Ea5QaxtkUi//kIerA9KCX92PFGlM3sFlnZ7G5ZhP5nSY+2IHKR8/zMs9LnWYTKb2g9s4e5ErWROGCCMYGlfzy6bEb5SwVJGvomodKWf+72hhdRlS8o2TCnaumnzRrMVaWwJab11/Rh3OkGXhPxmrc6c+S1+DZ4EJ8xPsvY5DdxeH20HcALo06HBJMPxhKlHdbF1VEMEDDYJcIO0XA0oXrEHTf6CidOwu4JjO0S5y1wL4n/KJQGkhHeDK89/ZMVlpxypIZ0WtNDJLN2doublwYfNSlF/qacWtie+oVxSNnxT6zwAT992q/+aTGXUQmRRlC5 zTptOCRX 2vnT8Y6GJj0Smi7qLfLedgl7BGbrKnnjYwA+S1zbxwMoWOEKgBk1Wh8wM0R5k5jAEa5TjTtMZSKtBJhB5P0Pem6gXcul1pk3EeHHnK9562BUP5yK/mDXshszS+RuNzj61vZCH6yLNR9PuwX/V6AnvGhNz7Po4m201TJ6ZSwSgoTWeKZo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Jul 05, 2024 at 08:06:51AM +1000, Dave Chinner wrote: > > > It seems strange to silently clamp these? Presumably for the bs>ps usecase, > > > whatever values are passed in are a hard requirement? So wouldn't want them to > > > be silently reduced. (Especially given the recent change to reduce the size of > > > MAX_PAGECACHE_ORDER to less then PMD size in some cases). > > > > Hm, yes. We should probably make this return an errno. Including > > returning an errno for !IS_ENABLED() and min > 0. > > What are callers supposed to do with an error? In the case of > setting up a newly allocated inode in XFS, the error would be > returned in the middle of a transaction and so this failure would > result in a filesystem shutdown. I suggest you handle it better than this. If the device is asking for a blocksize > PMD_SIZE, you should fail to mount it. If the device is asking for a blocksize > PAGE_SIZE and CONFIG_TRANSPARENT_HUGEPAGE is not set, you should also decline to mount the filesystem.