Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5296672rdb; Wed, 13 Dec 2023 05:03:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnkGt7MBwXnpLDY4hoqBNpScQ8cZfwxar0bhcNJPuRVvrZAxMfy9c2xYbmdvGyjy2PSEVa X-Received: by 2002:a05:6a20:3824:b0:18b:ef96:be44 with SMTP id p36-20020a056a20382400b0018bef96be44mr3428742pzf.26.1702472589540; Wed, 13 Dec 2023 05:03:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702472589; cv=none; d=google.com; s=arc-20160816; b=gcTM3GlYcLYbljmr3DMXrrwDunUETuCQ0jJsj/HJS4GRGirQN1rSmvxzvcOnqY0rJq 0sK7H91pXN3VGl5lgwvIYtAFQX6O7c472JnemGRUYH5lZ+81k8J5nsWrLG2AmOFV5mCz tnLEyS5cAMjGGtjEPoXQR/T5kihcjcFyjFm0C8+A8064bvKGmlLCJYxOvbhuSC/BgQNQ 9f83C1BxpX/wUQs/QNlL3Z2dfKRbeaQ/c+aTVXfOXcNKxGXmrqlMhmAOZuMy/lHbA5yS rmBEhHSrWN3Lh7p7XMXwnw1L3LuzAwjDLrVP/AJLWIA2qQuYUpV3sXUb/p7jr7uchA4/ hHSQ== 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=THUNaIPCj3UXkLkp4y+hnDHsey8kw6K+6ACn36v7rlc=; fh=NiudLyQ8JGLqJ+uH/yZVj4lN9D82WeAvJ5Pup+VuBUg=; b=E7xpKSovcHb95Jll6RyA2crJqB6Opzfb/wOOfongHxl5D3EAGvwNaxAW8ZdVIkwsLh +wixZzA1L3gE2g+QPgAvtVZJpoMSzLaHpyH4WFgGhGYZdwMxkj0rNY/kG05uL//gjd93 MtPCVmJN6Sbg+gUKBx0K7knvPS2E1/rwUC8tF6TdVEds5C9QIoJQANfLjI6TWFb6CQB7 wd5i34gIEwj4o+3po05DX5XgH6nQl7ugbBLQT3HmsdhI5kZ6qZb2lwQAX63a6TrTgiH6 a+nuEGJjoNw5cEAyEgTFtWcOy3BZUTZULVexLO9jM7mVgo4pnx9Rv/V1N8EEwQAO0Q0a IZAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qMGDveku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u8-20020a63df08000000b005b8ebaa2937si9849616pgg.47.2023.12.13.05.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 05:03:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qMGDveku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 713B380C2445; Wed, 13 Dec 2023 05:02:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379103AbjLMNCq (ORCPT + 99 others); Wed, 13 Dec 2023 08:02:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379083AbjLMNCn (ORCPT ); Wed, 13 Dec 2023 08:02:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1B90125 for ; Wed, 13 Dec 2023 05:02:39 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57CCFC433C8; Wed, 13 Dec 2023 13:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702472559; bh=oucTferbO8z09uzRC+QN/9ilQDasa9VaUoOZvOLBlL4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qMGDvekulMiLgPyCQAmQWR/eYvFAOux9M1LrBgXpjuHKi5GdnupdLCcjMmHeANAZw NDWN1eQkHCW2Sw+pfLuqq2pfj/JcgsDdVtA22OmSnHNJxYpw+yR1FExTe1nE8Z/wZs akM7+FPs9zpIm5sPjIcHPvfZPn+4KlneeGqG3rOB6Je1SWsz2emIBCRZySFkAzIPeA xA8qRf8Vl62kxL6qdWQBsLnN2r/BrbU0YpgQxCdD/1rH6ftoAJoKvEHvCU6oG3Umxf wyUryDjEKQZG4E1FVlzWMllV3UPLfXuBS3NdhfbgQtbEkbPuCgd+tR20WHysGMMqwt MUW7KhdPyiXlw== Date: Wed, 13 Dec 2023 14:02:31 +0100 From: Christian Brauner To: John Garry Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, dchinner@redhat.com, jack@suse.cz, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ming.lei@redhat.com, jaswin@linux.ibm.com, bvanassche@acm.org Subject: Re: [PATCH v2 04/16] fs: Increase fmode_t size Message-ID: <20231213-gurte-beeren-e71ff21c3c03@brauner> References: <20231212110844.19698-1-john.g.garry@oracle.com> <20231212110844.19698-5-john.g.garry@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231212110844.19698-5-john.g.garry@oracle.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 05:02:58 -0800 (PST) On Tue, Dec 12, 2023 at 11:08:32AM +0000, John Garry wrote: > Currently all bits are being used in fmode_t. > > To allow for further expansion, increase from unsigned int to unsigned > long. > > Since the dma-buf driver prints the file->f_mode member, change the print > as necessary to deal with the larger size. > > Signed-off-by: John Garry > --- > drivers/dma-buf/dma-buf.c | 2 +- > include/linux/types.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index 21916bba77d5..a5227ae3d637 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -1628,7 +1628,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) > > > spin_lock(&buf_obj->name_lock); > - seq_printf(s, "%08zu\t%08x\t%08x\t%08ld\t%s\t%08lu\t%s\n", > + seq_printf(s, "%08zu\t%08x\t%08lx\t%08ld\t%s\t%08lu\t%s\n", > buf_obj->size, > buf_obj->file->f_flags, buf_obj->file->f_mode, > file_count(buf_obj->file), > diff --git a/include/linux/types.h b/include/linux/types.h > index 253168bb3fe1..49c754fde1d6 100644 > --- a/include/linux/types.h > +++ b/include/linux/types.h > @@ -153,7 +153,7 @@ typedef u32 dma_addr_t; > > typedef unsigned int __bitwise gfp_t; > typedef unsigned int __bitwise slab_flags_t; > -typedef unsigned int __bitwise fmode_t; > +typedef unsigned long __bitwise fmode_t; As Jan said, that's likely a bad idea. There's a bunch of places that assume fmode_t is 32bit. So not really a change we want to make if we can avoid it.