From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27F491B81DC for ; Mon, 2 Jun 2025 14:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748874250; cv=none; b=iVB1e4PJe+tjfowXJRyVD4jzVws4DNdFA99CwlhnrNRBs6J9P9FnkFSEvo/Y5zOMRR044l0l6Byup4COv8ethoV5demPikLrT8jBgJwmUSDqtbgEyf0IMOLFwHlQgn3LB06oxNCpu7BJO9efnKCoRPzUTDDVGavouPruZfkguHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748874250; c=relaxed/simple; bh=Ty/ggLvGy0LpeeBlq8XqYQYZ33weKKPJqE7+/JpCaJU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GP6W4b58tN4dRw/75PIW+K4/YSXwqGlArQOzcCvc+rwuC3bSC/GMWg/+OKKaZgpbTfl21vBvxihsdi9clukMUMiZ6tsXTSDhhvxnHMf8aG0wTxpvqr9UidMokBZqnHDKJTslSAnq0rKRvMZpx6/BT5U3P55anrCLtgHXjaNk47Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id A052D68C7B; Mon, 2 Jun 2025 16:24:05 +0200 (CEST) Date: Mon, 2 Jun 2025 16:24:05 +0200 From: Christoph Hellwig To: Kundan Kumar Cc: jaegeuk@kernel.org, chao@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, miklos@szeredi.hu, agruenba@redhat.com, trondmy@kernel.org, anna@kernel.org, akpm@linux-foundation.org, willy@infradead.org, mcgrof@kernel.org, clm@meta.com, david@fromorbit.com, amir73il@gmail.com, axboe@kernel.dk, hch@lst.de, ritesh.list@gmail.com, djwong@kernel.org, dave@stgolabs.net, p.raghav@samsung.com, da.gomez@samsung.com, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, linux-mm@kvack.org, gost.dev@samsung.com, Anuj Gupta Subject: Re: [PATCH 04/13] writeback: affine inode to a writeback ctx within a bdi Message-ID: <20250602142405.GA22563@lst.de> References: <20250529111504.89912-1-kundan.kumar@samsung.com> <20250529111504.89912-5-kundan.kumar@samsung.com> Precedence: bulk X-Mailing-List: gfs2@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250529111504.89912-5-kundan.kumar@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, May 29, 2025 at 04:44:55PM +0530, Kundan Kumar wrote: > @@ -157,7 +157,7 @@ fetch_bdi_writeback_ctx(struct inode *inode) > { > struct backing_dev_info *bdi = inode_to_bdi(inode); > > - return bdi->wb_ctx_arr[0]; > + return bdi->wb_ctx_arr[inode->i_ino % bdi->nr_wb_ctx]; Most modern file systems use 64-bit inode numbers, while i_ino sadly still is only an ino_t that can be 32-bits wide. So we'll either need an ugly fs hook here, or maybe convince Linus that it finally is time for a 64-bit i_ino (which would also clean up a lot of mess in the file systems and this constant source of confusion).