From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BE05E47AF64; Fri, 27 Feb 2026 22:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772231399; cv=none; b=hSmRmwQC47B/5YdcIkU15scJdfXsg972yiKpRA/M0uDw0sJ7MbCl83pUKCWAFiCBySkFfkY1wTpjYvLYJPYlz7alyXlIinN7/06CpMu1FHG3Ssag5femupi61PfGqRGvos2SV6oWPKYT2aeEe90F2lTJ1hRNHYWSlu5vuOpp6uQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772231399; c=relaxed/simple; bh=qOWr/grtHIj1V1K+NCTt0HpJP/AofwCqzIkHf3d79hM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pcMXkWr7hM2pCZurEtxawQE+mj9rxJe0dFLRw9IB7RjG3Uv2iGDgdgPgA3HVe/jKq0m606Fr5jcPzc8BMsdPTHKxJDc4zO0y/u7V+Rq89hA+qGP67Q1Ie6HfOid2/m9A6USkr+WB/43ZRFxUG3d+E4S7jkHGDvQEH9ErXxCuLiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mblv7DHD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mblv7DHD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C41B9C116C6; Fri, 27 Feb 2026 22:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772231399; bh=qOWr/grtHIj1V1K+NCTt0HpJP/AofwCqzIkHf3d79hM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mblv7DHD9IvkrAApTsDnl40aXVl5qo41uma3D9q78e0fmMER6HJG7Qhnm+uyDI7pP JoguTvkQa1p+sTVUWtrgdYZ+IjVqT4POkPlTdLyKcvMF8/Qxtmg/kJAN+lP4fWE3z8 KZhYqMZM1bz6a0OHhjdtfx7YUgv/Ak0VWMCvvWCOavLMT+82821r+OTE7Tqm3WdHYt 6ch7v+luemKnkTIpjkMXv2++8bcCVGZqwkd7++6ubi8YSgR04lgsm/plZDSdx7xvXD kD3nMYP1Xm2fIEe5HRSmnx7fM8/K13BvamUZLCAH0S9FFW/gKRIDcMIr7HyFpzblzA kEEB1wSHkKMXw== Date: Fri, 27 Feb 2026 14:29:50 -0800 From: Eric Biggers To: Christoph Hellwig Cc: "Theodore Y. Ts'o" , Jaegeuk Kim , Andreas Dilger , Chao Yu , Christian Brauner , "Darrick J. Wong" , linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 14/14] ext4: use a byte granularity cursor in ext4_mpage_readpages Message-ID: <20260227222950.GC5357@quark> References: <20260226144954.142278-1-hch@lst.de> <20260226144954.142278-15-hch@lst.de> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260226144954.142278-15-hch@lst.de> On Thu, Feb 26, 2026 at 06:49:34AM -0800, Christoph Hellwig wrote: > + block_in_file = EXT4_PG_TO_LBLK(inode, folio->index); > + pos = (loff_t)block_in_file << blkbits; The EXT4_PG_TO_LBLK() expands to: (((loff_t)(folio->index) << PAGE_SHIFT) >> (inode)->i_blkbits) So it calculates the pos as an intermediate step, and we end up with the redundant pos = (pos >> blkbits) << blkbits. It probably would make more sense to calculate the pos first, similar to what other places in this series do: pos = folio_pos(folio); block_in_file = pos >> blkbits; - Eric