Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7299713rwr; Tue, 25 Apr 2023 10:49:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZLBUyS70djF0lBZejTuUMSHgkY/gCY4B1UbFb1y4PyUktvEdof0lj6vlQ2O3/Kb4AN3ny X-Received: by 2002:a17:903:495:b0:1a6:7fb1:8de7 with SMTP id jj21-20020a170903049500b001a67fb18de7mr17126101plb.24.1682444967604; Tue, 25 Apr 2023 10:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682444967; cv=none; d=google.com; s=arc-20160816; b=OYJspzRHq4yq7r8SU8pqfMczNA0dicRHWSdXeAosywUzKjO40tqu8RK+bibjPt4zS3 /63LRRRxzILeHZGpY8kUZTSJwPPhA9PxpvAJQLAQcwfuLKwNWJiLNIx1qwpNvo45jza8 o1fG1vlbz0CzZUKL73OQSb/L9n0LHwPwWflL6S7Fmzh37NHykE7ZF9PhsLCrCIv8dhqu BPD0FYopKlw5r1nTR7+uvtIK1fXm6LGdW4E6Umdh4hzQqclQotYuWJ+2BBUMh1Izaz/f yPCCXrdqkMdcNvt0ZlUGmSIbSciHf7BiBOWHZJEu69+jCSznQyl5mMdBuPH+mu+lZ0c8 wp6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=G0CBe2FuGLKiF6+7JwAoMc/gjfgOjJWrWMRZVPEMSv8=; b=h84pYryUJYCKyldN15gKIpjXXaNr/I4+vgzLUqMBmIU9M/8PbkMNbl4RI8PxgdMxsm Aud2iB51IHwk2lsbgbjMX+6iM2m3ca1hCo7pSdDtevNRtTjUF2qIOBquUUwrPYPFiyRv InRVaHqxyIFl5+Q2ZPfqNOdupGr2uzWxJBhs1Hxk74F7hFkUNRpFIxhOIwndr0P2YUUB oBbYcU787azrgChDHlIiMVo0cyx0OAcixqXSxsESMzhRKO4scTwAs/Ywhj/QBNtmPUr4 8vupj8QtftVwd2Rq0WWHGkReYFFOKss2uEhOoVkWgrnM4TJHmJpdaCQjjp+dlVCXeuNe D16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HvLIP+2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a17090322d000b001a1abc91952si12504197plg.194.2023.04.25.10.49.09; Tue, 25 Apr 2023 10:49:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HvLIP+2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234688AbjDYRp2 (ORCPT + 99 others); Tue, 25 Apr 2023 13:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbjDYRpY (ORCPT ); Tue, 25 Apr 2023 13:45:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D9239022; Tue, 25 Apr 2023 10:45:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08B4D616EA; Tue, 25 Apr 2023 17:45:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 086B6C433EF; Tue, 25 Apr 2023 17:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682444722; bh=UetGMwdP/tJrV8Yar8w3RMh5cMJTojk25/r7z2kcvRU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=HvLIP+2XBMjvYn4QXFyN8ilV9wqrHd8tSi2COur0+kfILmSIGtIutF9kne4MM5yjY G5hUsYOpqizVtkL9O9FT3G8B1OGIe8ep4V3SfdGBLLEkEmgYUSedAc81RFyFbryW3c f5z+iilG2EcmnGH6LaChNt21Wm8OlGjUw8J1P5JcowZAZjVi8wF1czTA8JxvXsoDSM XZt+K3PB/fgOG7oktH+1iCZrVeOazyhiekMbfQkA7NWiovV4ugbexbSHZ88n7acfWl KC4Y5PvwicwYLcAbql/jy0qtE34PWuU9tiyDRD/OWzCEjHIJTz2DFzg+Axj3tkl0fv V7nFvWGdknCSQ== Message-ID: Subject: Re: [PATCH v2 1/3] fs: add infrastructure for multigrain inode i_m/ctime From: Jeff Layton To: NeilBrown Cc: Alexander Viro , Christian Brauner , "Darrick J. Wong" , Hugh Dickins , Andrew Morton , Dave Chinner , Chuck Lever , Jan Kara , Amir Goldstein , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org Date: Tue, 25 Apr 2023 13:45:19 -0400 In-Reply-To: <168237601955.24821.11999779095797667429@noble.neil.brown.name> References: <20230424151104.175456-1-jlayton@kernel.org> , <20230424151104.175456-2-jlayton@kernel.org> , <168237287734.24821.11016713590413362200@noble.neil.brown.name> , <404a9a8066b0735c9f355214d4eadf0d975b3188.camel@kernel.org> <168237601955.24821.11999779095797667429@noble.neil.brown.name> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 (3.48.0-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 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 On Tue, 2023-04-25 at 08:40 +1000, NeilBrown wrote: > On Tue, 25 Apr 2023, Jeff Layton wrote: > > On Tue, 2023-04-25 at 07:47 +1000, NeilBrown wrote: > > > On Tue, 25 Apr 2023, Jeff Layton wrote: > > > > + /* > > > > + * Warn if someone sets SB_MULTIGRAIN_TS, but doesn't turn down t= he ts > > > > + * granularity. > > > > + */ > > > > + return (sb->s_flags & SB_MULTIGRAIN_TS) && > > > > + !WARN_ON_ONCE(sb->s_time_gran =3D=3D 1); > > >=20 > > > Maybe=20 > > > !WARN_ON_ONCE(sb->s_time_gran & SB_MULTIGRAIN_TS); > > > ?? > > >=20 > >=20 > > I'm not sure I understand what you mean here. >=20 > That's fair, as what I wrote didn't make any sense. > I meant to write: >=20 > !WARN_ON_ONCE(sb->s_time_gran & I_CTIME_QUERIED); >=20 > to make it explicit that s_time_gran must leave space for > I_CTIME_QUERIED to be set (as you write below). Specifically that > s_time_gran mustn't be odd.=20 > =20 Erm...it may be an unpopular opinion, but I find that more confusing than just ensuring that the s_time_gran > 1. I keep wondering if we might want to carve out other low-order bits too for some later purpose, at which point trying to check this using flags wouldn't work right. I think I might just stick with what I have here, at least for now. --=20 Jeff Layton