Re: [Ocfs2-devel] [PATCH 1/3] ext3/ext4: Factor out disk addressability check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)".  How about:

	u64 last_fs_page = last_fs_block >> (PAGE_CACHE_SHIFT - blocksize_bits);

	... ||
	(last_fs_page > (pgoff_t)(~0ULL))) {

Is that more readable?

Joel

-- 

Life's Little Instruction Book #99

	"Think big thoughts, but relish small pleasures."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux