Re: [PATCH] 2/6 Detect overflows in loop counters
Mingming Cao <[email protected]> Fri, 18 Aug 2006 11:59:34 -0700
| Newsgroups | gmane.comp.file-systems.ext2.devel |
|---|---|
| Organization | IBM LTC |
| Message-ID | <[email protected]> |
On Fri, 2006-08-18 at 12:45 -0500, Eric Sandeen wrote: > Mingming Cao wrote: > > Eric, the total number of blocks on the filesystem(s_blocks_count) is a > > unsigned long long(sector_t) for ext4, so I suggest we use a unsigned > > long long type loop counters here, fix the overflow issue, and works for > > both ext3 and ext4:) > > That's fine with me, although I was taking the approach of: > > 1. make it <container-size> clean, then > 2. bump the container size up... > > How much do we want to intermix full 32-bit fixes with the 64-bit > changes? All at once or step by step? Step by step seems like a safer > approach, though it probably means reworking some of the 64-bit patches > (I'll sign up to do that work if 32-bit stuff goes in first...) > Either way is fine with me ... But I think making the loop counter to unsigned value seems more straightforward than keep it as int type, and adding a check of < 0 in the end condition. Thanks, Mingming ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642