* 2.6 kernel large file create problem @ 2003-09-13 15:37 George 2003-09-14 4:03 ` Hans Reiser 0 siblings, 1 reply; 4+ messages in thread From: George @ 2003-09-13 15:37 UTC (permalink / raw) To: linux-kernel I have a 300G reiserfs 3.6 file system created above a RAID0 (HPT372 controller) partition. When I am using the 2.6.0-test5 kernel and create files larger that 4GB they are corrupted with lots of trash throughout the file. When I use the same file system with the 2.4.22 kernel it works fine. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 kernel large file create problem 2003-09-13 15:37 2.6 kernel large file create problem George @ 2003-09-14 4:03 ` Hans Reiser 2003-09-14 8:41 ` Oleg Drokin 0 siblings, 1 reply; 4+ messages in thread From: Hans Reiser @ 2003-09-14 4:03 UTC (permalink / raw) To: George; +Cc: linux-kernel, Oleg Drokin George wrote: >I have a 300G reiserfs 3.6 file system created above a RAID0 (HPT372 >controller) partition. When I am using the 2.6.0-test5 kernel and create >files larger that 4GB they are corrupted with lots of trash throughout the >file. When I use the same file system with the 2.4.22 kernel it works fine. > >- >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html >Please read the FAQ at http://www.tux.org/lkml/ > > > > this bug was just found and fixed, green has details. -- Hans ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 kernel large file create problem 2003-09-14 4:03 ` Hans Reiser @ 2003-09-14 8:41 ` Oleg Drokin 2003-09-18 3:28 ` George 0 siblings, 1 reply; 4+ messages in thread From: Oleg Drokin @ 2003-09-14 8:41 UTC (permalink / raw) To: Hans Reiser; +Cc: George, linux-kernel Hello! On Sun, Sep 14, 2003 at 08:03:36AM +0400, Hans Reiser wrote: > >I have a 300G reiserfs 3.6 file system created above a RAID0 (HPT372 > >controller) partition. When I am using the 2.6.0-test5 kernel and create > >files larger that 4GB they are corrupted with lots of trash throughout the > >file. When I use the same file system with the 2.4.22 kernel it works > >fine. > this bug was just found and fixed, green has details. Indeed. Try this patch, it should help. Tell us if you experience any problems with the patch. Bye, Oleg ===== fs/reiserfs/file.c 1.22 vs edited ===== --- 1.22/fs/reiserfs/file.c Fri Aug 15 05:17:00 2003 +++ edited/fs/reiserfs/file.c Fri Sep 12 19:18:53 2003 @@ -779,7 +779,7 @@ /* Now if all the write area lies past the file end, no point in maping blocks, since there is none, so we just zero out remaining parts of first and last pages in write area (if needed) */ - if ( (pos & ~(PAGE_CACHE_SIZE - 1)) > inode->i_size ) { + if ( (pos & ~((loff_t)PAGE_CACHE_SIZE - 1)) > inode->i_size ) { if ( from != 0 ) {/* First page needs to be partially zeroed */ char *kaddr = kmap_atomic(prepared_pages[0], KM_USER0); memset(kaddr, 0, from); @@ -801,9 +801,9 @@ we need to allocate (calculated above) */ /* Mask write position to start on blocksize, we do it out of the loop for performance reasons */ - pos &= ~(inode->i_sb->s_blocksize - 1); + pos &= ~((loff_t) inode->i_sb->s_blocksize - 1); /* Set cpu key to the starting position in a file (on left block boundary)*/ - make_cpu_key (&key, inode, 1 + ((pos) & ~(inode->i_sb->s_blocksize - 1)), TYPE_ANY, 3/*key length*/); + make_cpu_key (&key, inode, 1 + ((pos) & ~((loff_t) inode->i_sb->s_blocksize - 1)), TYPE_ANY, 3/*key length*/); reiserfs_write_lock(inode->i_sb); // We need that for at least search_by_key() for ( i = 0; i < num_pages ; i++ ) { ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 kernel large file create problem 2003-09-14 8:41 ` Oleg Drokin @ 2003-09-18 3:28 ` George 0 siblings, 0 replies; 4+ messages in thread From: George @ 2003-09-18 3:28 UTC (permalink / raw) To: Oleg Drokin, Hans Reiser; +Cc: linux-kernel From: "Oleg Drokin" <green@namesys.com> > Indeed. > Try this patch, it should help. > Tell us if you experience any problems with the patch. > I have been off into the LVM2 muttle puddle, between kernels 2.4.22 and 2.6.0-t5. . . If I do not include LVM2 below reiserfs then, yes, the 2.6.0 reiserfs file.c patch you provided works (for files larger than 4GB). Thanks! However, if I include LVM2 on the 2.6.0-t5 kernel and place a reiserfs on top of LVM2 logical volume, I get "Input/output errors" from diff commands for files >2GB. Again if I use a similar file system config. using the 2.4.22 kernel everything works fine. More on this latter. ( I may missing omething ->[more research].) ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-18 2:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-09-13 15:37 2.6 kernel large file create problem George 2003-09-14 4:03 ` Hans Reiser 2003-09-14 8:41 ` Oleg Drokin 2003-09-18 3:28 ` George
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox