Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1115480ybh; Mon, 13 Jul 2020 09:42:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX6s2NcEJCZ+qpuQu9DtxAcDewwo2W+PUGgXg37a9apiT26Vg7EYo6CJvMJSHbA29d3hVi X-Received: by 2002:aa7:c54e:: with SMTP id s14mr272948edr.81.1594658544942; Mon, 13 Jul 2020 09:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594658544; cv=none; d=google.com; s=arc-20160816; b=DLmb0bEm9gVzrJruz3TMx+JdZ2iTE/LIBrHLdJgSNpIqY5I/MLZPlyKKTwHQMP7BG+ u/t0CJFDXpqt6adylMsysnzBUx/vXv9vqasU6/LdMzymTHEKzvj2h7fWY5MVUbN71jpE ehUtAFMKCQqlaAiBIi2WWoVbkuATajKS1oW9IXKepbdYAjiggnfYheizgZSC0M/ogKqH pcKQXCAu+UPTQ6K0bPNtLXkqDfPQn9mr+IHzv5xzd0yc0GtstjOjmYXoSOsrLreTu+l2 te0ZsrBf40AaSyXpMciWO4/e5/0v7Hf/SyjCzPFvsG0Vjz6o45n3dWyJHF7/j/3S8k9i 3eOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/smdC20zlWM8SPs5G47I6CVNiPuYGFy43OW503ZUCwE=; b=fhkRr7/kxraY+PSbYiXGFMhFZI4rQKvPUNg3sV3TkPc7ZMbqpVsVNKfyiiUAuAi6Tp XX68mugwmSP5Pe90uWM9oIVC53DytzbrQcEsM9RrzoDt3XoJinBBB9/pv9bDSdHTKW5r PQua7XMBvBWVDf2ce7H6LQy2AQ2ZaCYfM8VrS58zHkL/22hENewxLxDjtIN1X9XebuR8 Er3/skI7s8EozFJRPJsY8jyM9f17ZpUhujXgZRlUll/SsTbjzM7H5SrThlVfvuUxBK3s frtHOnyLOX3O7WzSHHUjrKJIye7V+G5GgAMIEou2RuKdv8BSEjdNEy2/5PMPU7Q0CGrD hyeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=RjTsw3Oe; 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 yd6si9068946ejb.326.2020.07.13.09.42.01; Mon, 13 Jul 2020 09:42:24 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=RjTsw3Oe; 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 S1730356AbgGMQly (ORCPT + 99 others); Mon, 13 Jul 2020 12:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729751AbgGMQly (ORCPT ); Mon, 13 Jul 2020 12:41:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC04CC061755; Mon, 13 Jul 2020 09:41:53 -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=/smdC20zlWM8SPs5G47I6CVNiPuYGFy43OW503ZUCwE=; b=RjTsw3Oe8lcsM1sWH5Sqr3stoq X/cJMjzKyIgX7hDQQcrXyFtuuO7pPqUseEeeFQE2oayeIcIYgoo4kS31SAC7OZfGZesrACego17/e LDUu86YATcC2DfoVuNAenFSKu7Ep3J4Z/m6bCxVDf41IdQLXSBexhzwaPWxo9+8kAb6YMFCefz3Ut n4QOrPOEhurY59/py5smPdcslUdbxFMw6S7WKaKxfwzn7HtK+WAXJ64FJ9dyHxN0JLP4VbAWV+vfE 0Gqw6XJx3M7LbjGUn2RJJpQd8Lgw77p7S+Ll+QmQ5gri72zvnb3Hc+kP9vjJOc6gFex4FjmhYKjZx sY8sam+w==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jv1WT-0003jZ-MK; Mon, 13 Jul 2020 16:41:45 +0000 Date: Mon, 13 Jul 2020 17:41:45 +0100 From: Matthew Wilcox To: Chris Down Cc: Andrew Morton , Hugh Dickins , Al Viro , Amir Goldstein , Jeff Layton , Johannes Weiner , Tejun Heo , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v6 1/2] tmpfs: Per-superblock i_ino support Message-ID: <20200713164145.GY12769@casper.infradead.org> References: <2cddd4498ba1db1c7a3831d47b9db0d063746a3b.1594656618.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cddd4498ba1db1c7a3831d47b9db0d063746a3b.1594656618.git.chris@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 05:15:39PM +0100, Chris Down wrote: > +#define SHMEM_INO_BATCH 1024U ... > + if (unlikely((ino & ~SHMEM_INO_BATCH) == 0)) { I don't think that works. I think you meant to write ~(SHMEM_INO_BATCH - 1). Or just ino % SHMEM_INO_BATCH which works even for non-power-of-two.