[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C694ED3.5070500@redhat.com>
Date: Mon, 16 Aug 2010 09:44:35 -0500
From: Eric Sandeen <sandeen@...hat.com>
To: Eric Sandeen <sandeen@...hat.com>, Jan Kara <jack@...e.cz>,
Andreas Dilger <adilger@...ger.ca>, "Ted Ts'o" <tytso@....edu>,
ocfs2-devel@....oracle.com, linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org,
"linux-kernel@...r.kernel.org Patrick J. LoPresti"
<lopresti@...il.com>
Subject: Re: [Ocfs2-devel] [PATCH 1/3] ext3/ext4: Factor out disk addressability
check
Joel Becker wrote:
> On Sun, Aug 15, 2010 at 10:36:36PM -0500, Eric Sandeen wrote:
>> Er, yeah. I had 32 bits in my head since that's the case we're
>> checking for... whoops.
>>
>> So I guess your
>>
>> ... ||
>> ((last_fs_block >> (PAGE_CACHE_SHIFT - blocksize_bits)) >
>> (pgoff_t)(!0ULL))) {
>>
>> is right :) (my feeble brain has a hard time reading that, though, TBH)
>
> Well, note the bug in my quickly typed version: "(!0ULL)" vs
> "(~0ULL)".
*nod* saw that but figured it was just a typo & didn't mention it ;)
> How about:
>
> u64 last_fs_page = last_fs_block >> (PAGE_CACHE_SHIFT - blocksize_bits);
>
> ... ||
> (last_fs_page > (pgoff_t)(~0ULL))) {
>
> Is that more readable?
To me, yes. Maybe do similar for last_fs_sector.
If it's getting too verbose I understand, but less dense is a lot easier
to read, IMHO. Just style though, really, so *shrug*
Thanks,
-Eric
> Joel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists