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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2DC8C43467 for ; Wed, 14 Oct 2020 16:53:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 317392222E for ; Wed, 14 Oct 2020 16:53:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="PR0QtlDS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 317392222E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 575AD94000A; Wed, 14 Oct 2020 12:53:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FDD7900002; Wed, 14 Oct 2020 12:53:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C6D294000A; Wed, 14 Oct 2020 12:53:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 0D598900002 for ; Wed, 14 Oct 2020 12:53:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9245A1EE6 for ; Wed, 14 Oct 2020 16:53:22 +0000 (UTC) X-FDA: 77371126644.01.elbow20_2405bf22720d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 64190100471FE for ; Wed, 14 Oct 2020 16:53:22 +0000 (UTC) X-HE-Tag: elbow20_2405bf22720d X-Filterd-Recvd-Size: 4763 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Oct 2020 16:53:21 +0000 (UTC) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09EGoaqC122496; Wed, 14 Oct 2020 16:53:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=3prgQppt+/Xrna2RERWjsXjQB0zQskC3n/gocgDOCxY=; b=PR0QtlDSBK3RUUZn3613vj3QOQ+u5n0PMM68uiz/eD3kok3FdrfG/kDxxRMenByHB0V0 6O/LEk6FKK9aLfO3fAZtEQE5cdP8yCqKC++vHTDAj7MPigM/FOZbj54EJ+TwvmblQBm2 Lg9AwNblXxH53/3iLQcMtQ+byEvp6uCJqjF2CDoPO0NbQTDDIx3DjLqhliey2Q9JVnyj pJZHISalcirdod5EZHrdYGLZxjhhdUpP6oA5IdRH2K+61DfgAMM1k6N1jTB1B7oJaxlA Px4aoZWk1E6U9lXcbIo4eJYqX+l6ZZ2fBlF+rnPqHqtsIWxqBD2Ne8v8y2eCi2UdfvCb Yw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 3434wkrn4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Oct 2020 16:53:19 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09EGjaMn067396; Wed, 14 Oct 2020 16:51:18 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 344by3wx9f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Oct 2020 16:51:18 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09EGpHZ5004122; Wed, 14 Oct 2020 16:51:17 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Oct 2020 09:51:17 -0700 Date: Wed, 14 Oct 2020 09:51:16 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 14/14] xfs: Support THPs Message-ID: <20201014165116.GL9832@magnolia> References: <20201014030357.21898-1-willy@infradead.org> <20201014030357.21898-15-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201014030357.21898-15-willy@infradead.org> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9773 signatures=668681 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 suspectscore=1 mlxscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140119 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9774 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=1 impostorscore=0 clxscore=1015 spamscore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010140120 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: On Wed, Oct 14, 2020 at 04:03:57AM +0100, Matthew Wilcox (Oracle) wrote: > There is one place which assumes the size of a page; fix it. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/xfs/xfs_aops.c | 2 +- > fs/xfs/xfs_super.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c > index 55d126d4e096..20968842b2f0 100644 > --- a/fs/xfs/xfs_aops.c > +++ b/fs/xfs/xfs_aops.c > @@ -548,7 +548,7 @@ xfs_discard_page( > if (error && !XFS_FORCED_SHUTDOWN(mp)) > xfs_alert(mp, "page discard unable to remove delalloc mapping."); > out_invalidate: > - iomap_invalidatepage(page, 0, PAGE_SIZE); > + iomap_invalidatepage(page, 0, thp_size(page)); > } > > static const struct iomap_writeback_ops xfs_writeback_ops = { > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index 71ac6c1cdc36..4b6e1cfc57a8 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -1840,7 +1840,7 @@ static struct file_system_type xfs_fs_type = { > .init_fs_context = xfs_init_fs_context, > .parameters = xfs_fs_parameters, > .kill_sb = kill_block_super, > - .fs_flags = FS_REQUIRES_DEV, > + .fs_flags = FS_REQUIRES_DEV | FS_THP_SUPPORT, Mostly looks reasonable to me so far, though I forget where exactly FS_THP_SUPPORT got added...? --D > }; > MODULE_ALIAS_FS("xfs"); > > -- > 2.28.0 >