[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+tQmHA_3_Oc-0AQ0a29DTwU4mkEqhOiAE6gXa4Ly4gZGpn5Vw@mail.gmail.com>
Date: Wed, 5 Apr 2023 16:47:59 +0800
From: chi wu <wuchi.zero@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: tytso@....edu, adilger.kernel@...ger.ca, ojaswin@...ux.ibm.com,
ritesh.list@...il.com, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: simplify 32bit calculation of lblk
Christoph Hellwig <hch@...radead.org> 于2023年4月5日周三 13:40写道:
>
> On Mon, Apr 03, 2023 at 09:53:04PM +0800, wuchi wrote:
> > - if (block > ext_block)
> > - return ext_pblk + (block - ext_block);
> > - else
> > - return ext_pblk - (ext_block - block);
> > + return ext_pblk + ((signed long long)block - (signed long long)ext_block);
>
> And what exactly is the value add here, except for turning an easy
> to parse statement into a complex expression using casts?
>
Yes,it will be more complex. the original intention is to reduce the
conditional branch.
=======
Powered by blists - more mailing lists