Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp287149pxf; Tue, 6 Apr 2021 22:35:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5ezr53fNjh4oN9YC6rHjuwMIUHDgxsH0JlbbNDbt7zda5P9b4JjuUDPqOEj6zsYJWxOho X-Received: by 2002:a92:3647:: with SMTP id d7mr1540629ilf.264.1617773739797; Tue, 06 Apr 2021 22:35:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617773739; cv=none; d=google.com; s=arc-20160816; b=qfTBLRHAVPW8ZPvjVxerLMRL2XveXcZI80568jMcP0jx7OZfmS+SLUL5olDqM05rb/ QrfOdx/rXLOYWVDMH8IPue5GPBvxrQj+ZEy/9rhQBmt4VpDegLxijcve1aIJLQ3SZitt UY6OIIRgXwqGXoXG7+Eow323GZH+j2Gg7y+t81vkrMAEULLEfmd8IRwWu2rJ5GgKBruU 5qQ6Kn8kHemGo+S5g3+T9P2mePobeHvnW6qdBzm/dUnwmvVA4y3laIOrid8JS0yxQ/1L cguSUDipmtJ6vv9yzNYd6HwV3YzRKlFVgq8rkLmyxcY0BZCuDF6fF6Amr76nqePCxU1F 4L5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hUzYdafqUkSxFBGuJk6UxNp58JgCVIdROY5vKcDr6wA=; b=w4ZJ0kzKI2CQAk4MGfCd+RwEYD9uiMI/0MsDJkC9DsKfdZaDCnxcqnk/ROfyT24qHo Okz0ieW1lCSKBt2WYnmR5r1MJNdTFCDQ/h1e9+ScWyHwmOJX/lblCMjnp8M5ix8cWbQn eWcKF9yGDPifvzkQxgi2Ba9K43wRQAWgiwXYM16SjqZRR6Ej+nOdLzv7i4sAnY1OUMHO BWUhbzqYV4gg+8KtHahXK9ZoeIJouWFjTCFKK2cpemZmLbPyFo+9wPC6oRPhTSub5G4y yR2Rfw9c4ClRTrHtzLsD5N5TZ6685f4FNXdst/D1sGelpyg2Fxt26BVNoTr2V9k1aNOJ S3nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wPjWHq41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si20353420ilu.81.2021.04.06.22.35.27; Tue, 06 Apr 2021 22:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=wPjWHq41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345248AbhDFOlv (ORCPT + 99 others); Tue, 6 Apr 2021 10:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbhDFOlu (ORCPT ); Tue, 6 Apr 2021 10:41:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F7FC06174A; Tue, 6 Apr 2021 07:41:42 -0700 (PDT) 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=hUzYdafqUkSxFBGuJk6UxNp58JgCVIdROY5vKcDr6wA=; b=wPjWHq41ZvqO32+B7eUb9ZrmeW s9oNrb7TrioJQD0G2zwsaoSdYeh68OUYdKMN9FRzkhuC6XDTlb7cUP8iDM9h+kzEqhdel6Qquh6a4 D8xlMpik29gkqvJ3HedOv4YiXYWSO0LfCTVEmj30bQ/HB/cX+Qym4iJ5iKcT+PY8+DqjPCnZbtoKf sMUHn0OvfwGnI9wEOn5z8+CI5Me/lQNZzba+/MfoUAMlh7ydgj8d5VBGKLNVZhdJWTMHxBM0Qzik6 w/AV8hh5CTqhCakqb7JKv3Sl5WMx4Qff79xd5RQmJ2X3T97BxvtumXl6bpN0fszPXKlw/LUnbCZny Jqlt3KeA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lTmsQ-00Cx9o-RR; Tue, 06 Apr 2021 14:40:27 +0000 Date: Tue, 6 Apr 2021 15:40:22 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: "Kirill A. Shutemov" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org Subject: Re: [PATCH v6 01/27] mm: Introduce struct folio Message-ID: <20210406144022.GR2531743@casper.infradead.org> References: <20210331184728.1188084-1-willy@infradead.org> <20210331184728.1188084-2-willy@infradead.org> <20210406122918.h5dsnbjhmwpfasf4@box.shutemov.name> <20210406124807.GO2531743@casper.infradead.org> <20210406143150.GA3082513@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210406143150.GA3082513@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 06, 2021 at 03:31:50PM +0100, Christoph Hellwig wrote: > > > As Christoph, I'm not a fan of this :/ > > > > What would you prefer? > > Looking at your full folio series on git.infradead.org, there are a > total of 12 references to non-page members of struct folio, assuming > my crude grep that expects a folio to be named folio did not miss any. Hmm ... I count more in the filesystems: fs/afs/dir.c: struct afs_vnode *dvnode = AFS_FS_I(folio->page.mapping->host); fs/afs/dir.c: _enter("{%lu},%zu,%zu", folio->page.index, offset, length); fs/afs/file.c: _enter("{%lu},%zu,%zu", folio->page.index, offset, length); fs/afs/write.c: folio->page.index); fs/befs/linuxvfs.c: struct inode *inode = folio->page.mapping->host; fs/btrfs/disk-io.c: tree = &BTRFS_I(folio->page.mapping->host)->io_tree; fs/btrfs/disk-io.c: btrfs_warn(BTRFS_I(folio->page.mapping->host)->root->fs_info, fs/btrfs/extent_io.c: struct btrfs_inode *inode = BTRFS_I(folios[0]->page.mapping->host); fs/btrfs/file.c: if (folio->page.mapping != inode->i_mapping) { fs/btrfs/free-space-cache.c: if (folio->page.mapping != inode->i_mapping) { fs/btrfs/inode.c: if (folio->page.mapping != mapping) { fs/btrfs/inode.c: struct btrfs_inode *inode = BTRFS_I(folio->page.mapping->host); fs/buffer.c: spin_lock(&folio->page.mapping->private_lock); fs/buffer.c: spin_unlock(&folio->page.mapping->private_lock); fs/buffer.c: block_in_file = (sector_t)folio->page.index << fs/ceph/addr.c: mapping->host, folio, folio->page.index); fs/ceph/addr.c: mapping->host, folio, folio->page.index, fs/ceph/addr.c: folio->page.private = (unsigned long)snapc; fs/ceph/addr.c: inode = folio->page.mapping->host; fs/ceph/addr.c: inode, folio, folio->page.index, offset, length); fs/ceph/addr.c: inode, folio, folio->page.index); fs/cifs/file.c: struct cifsInodeInfo *cifsi = CIFS_I(folio->page.mapping->host); fs/ext4/inode.c: struct inode *inode = folio->page.mapping->host; fs/f2fs/data.c: struct inode *inode = folio->page.mapping->host; fs/fuse/dir.c: int err = fuse_readlink_page(folio->page.mapping->host, &folio->page); fs/gfs2/aops.c: struct gfs2_sbd *sdp = GFS2_SB(folio->page.mapping->host); fs/iomap/buffered-io.c: unsigned int nr_blocks = i_blocks_per_folio(folio->page.mapping->host, fs/iomap/buffered-io.c: struct inode *inode = folio->page.mapping->host; fs/iomap/buffered-io.c: BUG_ON(folio->page.index); fs/iomap/buffered-io.c: gfp_t gfp = mapping_gfp_constraint(folio->page.mapping, fs/iomap/buffered-io.c: struct inode *inode = folio->page.mapping->host; fs/iomap/buffered-io.c: struct inode *inode = folio->page.mapping->host; fs/iomap/buffered-io.c: trace_iomap_releasepage(folio->page.mapping->host, folio_offset(folio), fs/iomap/buffered-io.c: trace_iomap_invalidatepage(folio->page.mapping->host, offset, len); fs/jffs2/file.c: struct inode *inode = folio->page.mapping->host; fs/mpage.c: struct inode *inode = folio->page.mapping->host; fs/mpage.c: gfp = readahead_gfp_mask(folio->page.mapping); fs/mpage.c: gfp = mapping_gfp_constraint(folio->page.mapping, GFP_KERNEL); fs/mpage.c: block_in_file = (sector_t)folio->page.index << (PAGE_SHIFT - blkbits); fs/mpage.c: prefetchw(&folio->page.flags); fs/nfs/file.c: nfs_fscache_invalidate_page(&folio->page, folio->page.mapping->host); fs/nfs/fscache.c: nfs_i_fscache(inode), folio, folio->page.index, fs/nfs/fscache.c: folio->page.flags, inode); fs/reiserfs/inode.c: struct inode *inode = folio->page.mapping->host; fs/remap_range.c: if (folio1->page.index > folio2->page.index) fs/ubifs/file.c: struct inode *inode = folio->page.mapping->host; fs/xfs/xfs_aops.c: struct inode *inode = folio->page.mapping->host; (I didn't go through my whole series and do the conversion from folio->page.x to folio->x yet)