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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 4018DC4360C for ; Fri, 4 Oct 2019 19:28:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0B63E20862 for ; Fri, 4 Oct 2019 19:28:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mLsT1CQP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B63E20862 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A734C8E0006; Fri, 4 Oct 2019 15:28:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A23B38E0005; Fri, 4 Oct 2019 15:28:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93A578E0006; Fri, 4 Oct 2019 15:28:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 701BB8E0005 for ; Fri, 4 Oct 2019 15:28:15 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 1FED9180AD7C3 for ; Fri, 4 Oct 2019 19:28:15 +0000 (UTC) X-FDA: 76007088150.12.love98_2ae312edf3036 X-HE-Tag: love98_2ae312edf3036 X-Filterd-Recvd-Size: 3133 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 19:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7FrKM8lwwq9BP68RfAzbEbu9ZbuQwm+28FVR9aIuo9k=; b=mLsT1CQPB6s297SOjc6whQlHh 7OQtfOT/7cA/t+dU8xiYVhYyHjt1oahqDByGmLf+dVbEXOy8b432BO4dERJl/TZOptiJc8C/IqfAv CQ7oSGBik8lmRWnpZFqBHcpl/CypQTAlqsoPWcyjWzq/usEfouGHNgUHr2x3wQcWpxxapFEnpj63d ZMKIUQ6ziTf5UPc9N1CYQuWI55zudMMEo7tkr9wTfCat1r9pkGDz50sUyJDg20HwMCHQ7q2OJMGEa qXZ4wq1o4eVTqxBzMVw3s7MBpnGs2IgUAUdyj+uCExBlOQhqB7bKH8riky78QzO8yAIpCDi5QWoT/ ElZOX2C5g==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iGTFM-0003sN-Cm; Fri, 04 Oct 2019 19:28:12 +0000 Date: Fri, 4 Oct 2019 12:28:12 -0700 From: Matthew Wilcox To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/15] fs: Introduce i_blocks_per_page Message-ID: <20191004192812.GK32665@bombadil.infradead.org> References: <20190925005214.27240-1-willy@infradead.org> <20190925005214.27240-3-willy@infradead.org> <20190925083650.GE804@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190925083650.GE804@dread.disaster.area> User-Agent: Mutt/1.12.1 (2019-06-15) 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, Sep 25, 2019 at 06:36:50PM +1000, Dave Chinner wrote: > I'm actually working on abstrcting this code from both block size > and page size via the helpers below. We ahve need to support block > size > page size, and so that requires touching a bunch of all the > same code as this patchset. I'm currently trying to combine your > last patch set with my patchset so I can easily test allocating 64k > page cache pages on a 64k block size filesystem on a 4k page size > machine with XFS.... This all makes sense ... > > - if (iop || i_blocksize(inode) == PAGE_SIZE) > > + if (iop || i_blocks_per_page(inode, page) <= 1) > > return iop; > > That also means checks like these become: > > if (iop || iomap_chunks_per_page(inode, page) <= 1) > > as a single file can now have multiple pages per block, a page per > block and multiple blocks per page as the page size changes... > > I'd like to only have to make one pass over this code to abstract > out page and block sizes, so I'm guessing we'll need to do some > co-ordination here.... Yup. I'm happy if you want to send your patches out; I'll keep going with the patches I have for the moment, and we'll figure out how to merge the two series in a way that makes sense.