Andi Kleen wrote: > JFS sets a s_maxbytes value that is bigger than the page cache limit > on 32bit machines. This could lead to silent wrapping when a big file > write reaches the page cache limit, corrupting data at the beginning.
Yes, this would be a problem. But shouldn't the upper limit be (u64)PAGE_CACHE_SIZE << 32 ? > > Patch against 1.0.14. > > -Andi > > > --- linux-work/fs/jfs/super.c-o Fri Feb 1 07:26:14 2002 > +++ linux-work/fs/jfs/super.c Thu Feb 7 04:11:52 2002 > @@ -300,6 +300,10 @@ > sbi->nls_tab = load_nls_default(); > > sb->s_maxbytes = ((u64) sb->s_blocksize) << 40; > +#if BITS_PER_LONG==32 > + sb->s_maxbytes = min_t(u64, ((u64)PAGE_CACHE_SIZE << 31)-1, > + sb->s_maxbytes); > +#endif > > return sb; > -- David Kleikamp IBM Linux Technology Center _______________________________________________ Jfs-discussion mailing list [EMAIL PROTECTED] http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion
