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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ABF1C433EF for ; Wed, 6 Oct 2021 15:39:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A75F610A5 for ; Wed, 6 Oct 2021 15:39:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1A75F610A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8766D6B006C; Wed, 6 Oct 2021 11:39:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 826576B0071; Wed, 6 Oct 2021 11:39:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 714C46B0073; Wed, 6 Oct 2021 11:39:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 626E16B006C for ; Wed, 6 Oct 2021 11:39:37 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 208BD180458EE for ; Wed, 6 Oct 2021 15:39:37 +0000 (UTC) X-FDA: 78666422394.01.06C1E36 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP id D0026103B94F for ; Wed, 6 Oct 2021 15:39:36 +0000 (UTC) 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=NQwTO7FkpLZVbuuUmZZA3meW3NcqE6QyvtCNvwRhmWg=; b=bPwGJgk0NDgedUrWcPFTvyEPex jzW2MI4zNKtYBvW8xc+NK5o+O0jBbt3sdJgmZrpYTjAr4JQvTj72H33DR4ws2ySzu4hq/bhgxJXBB Qj65gm7+Sd6+Rq6w3WbzLF967Mbr9TMFl6gEIj8zEGkHmgE3SvN2yYhUfYcjo2CA3QVLo54YJxIyh oiUySk4nkcMKiRAUifhVoHHCcUi7QGmOp+IaKfUetrpIFSMmWLRnri9uJQjE6dyXHCluqCy+VyITM 18DZatCjSJBEQtV7Tz8WnvsoPIkzreLfgET2oPeISy9W62jA9b+XlVVrucEdMSNkFYjF6gjvvb+9d Qh0TJ2nA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY90L-00120B-1I; Wed, 06 Oct 2021 15:39:03 +0000 Date: Wed, 6 Oct 2021 16:38:49 +0100 From: Matthew Wilcox To: Al Viro Cc: linux-mm@kvack.org, David Hildenbrand , Kent Overstreet , Johannes Weiner , linux-fsdevel@vger.kernel.org Subject: Re: [RFC] pgflags_t Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=bPwGJgk0; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D0026103B94F X-Stat-Signature: rse9trsnb94oty6kyb758gu8an8h481g X-HE-Tag: 1633534776-266335 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 06, 2021 at 03:22:29PM +0000, Al Viro wrote: > On Wed, Oct 06, 2021 at 03:58:14PM +0100, Matthew Wilcox wrote: > > David expressed some unease about the lack of typesafety in patches > > 1 & 2 of the page->slab conversion [1], and I'll admit to not being > > particularly a fan of passing around an unsigned long. That crystallised > > in a discussion with Kent [2] about how to lock a page when you don't know > > its type (solution: every memory descriptor type starts with a > > pgflags_t) > > Why bother making it a struct? What's wrong with __bitwise and letting > sparse catch conversions? People don't run sparse. I happen to have a built allmodconfig tree here and running make C=2 fs/ gives 1147 lines of warnings. Why would adding more warnings help?