Skip to contentSkip to conversation

[2.4.18] vfat doesn't support files > 2GB under Linux, under Windoze it does

DISCUSSION F ker 3 participants 9 messages Jun 6, 2002 – Jun 19, 2002

Subsystems (2)
lore
Share & tools
lore

F ker

author
#0 lore raw

Could someone direct me towards a patch? Many thanks.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

maintainer
#1 lore raw
Quoted 1 line · F ker

Could someone direct me towards a patch? Many thanks.

This patch is for 2.5.19, but, the back porting to 2.5.18 should be not difficult.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
fs/buffer.c +1 -1
diff -urN linux-2.5.19/fs/buffer.c fat-big_file-2.5.19/fs/buffer.c
@@ -1931,7 +1931,7 @@
  */
 
 int cont_prepare_write(struct page *page, unsigned offset,
-		unsigned to, get_block_t *get_block, unsigned long *bytes)
+		unsigned to, get_block_t *get_block, loff_t *bytes)
 {
 	struct address_space *mapping = page->mapping;
 	struct inode *inode = mapping->host;
fs/fat/file.c +1 -1
diff -urN linux-2.5.19/fs/fat/file.c fat-big_file-2.5.19/fs/fat/file.c
@@ -54,7 +54,7 @@
 	}
 	if (!create)
 		return 0;
-	if (iblock << sb->s_blocksize_bits != MSDOS_I(inode)->mmu_private) {
+	if (iblock != MSDOS_I(inode)->mmu_private >> sb->s_blocksize_bits) {
 		BUG();
 		return -EIO;
 	}
fs/fat/inode.c +2 -0
diff -urN linux-2.5.19/fs/fat/inode.c fat-big_file-2.5.19/fs/fat/inode.c
@@ -775,6 +775,8 @@
 		sbi->fat_length = CF_LE_L(b->fat32_length);
 		sbi->root_cluster = CF_LE_L(b->root_cluster);
 
+		sb->s_maxbytes = 0xffffffff;
+		
 		/* MC - if info_sector is 0, don't multiply by 0 */
 		sbi->fsinfo_sector = CF_LE_W(b->info_sector);
 		if (sbi->fsinfo_sector == 0)
include/linux/buffer_head.h +1 -1
diff -urN linux-2.5.19/include/linux/buffer_head.h fat-big_file-2.5.19/include/linux/buffer_head.h
@@ -197,7 +197,7 @@
 int block_read_full_page(struct page*, get_block_t*);
 int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*);
 int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
-				unsigned long *);
+				loff_t *);
 int generic_cont_expand(struct inode *inode, loff_t size) ;
 int block_commit_write(struct page *page, unsigned from, unsigned to);
 int block_sync_page(struct page *);
include/linux/msdos_fs_i.h +1 -1
diff -urN linux-2.5.19/include/linux/msdos_fs_i.h fat-big_file-2.5.19/include/linux/msdos_fs_i.h
@@ -8,7 +8,7 @@
  */
 
 struct msdos_inode_info {
-	unsigned long mmu_private;
+	loff_t mmu_private;
 	int i_start;	/* first cluster or 0 */
 	int i_logstart;	/* logical first cluster */
 	int i_attrs;	/* unused attribute bits */
author
#2 lore raw

--- OGAWA Hirofumi <[email protected]> wrote: > F ker

Quoted 5 lines · <[email protected]> writes:
Quoted 2 lines

Could someone direct me towards a patch? Many thanks.

This patch is for 2.5.19, but, the back porting to 2.5.18 should be not difficult.

hmm... so 2.4 series won't be getting it then? I'm not a kernel hacker as such, so I can't do it myself.

If I use a journalling fs, should I just move to the 2.5 series?

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

maintainer
#3 lore raw
Quoted 3 lines · F ker
Quoted 3 lines
Quoted 1 line

Could someone direct me towards a patch? Many thanks.

This patch is for 2.5.19, but, the back porting to 2.5.18 should

                                                       ^^^^^^

Grr. I didn't notice typo. 2.4.18

Quoted 4 lines
Quoted 1 line

be not difficult.

hmm... so 2.4 series won't be getting it then? I'm not a kernel hacker as such, so I can't do it myself.

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#8 lore raw
In reply to F ker
Quoted 7 lines
Quoted 2 lines

hmm... so 2.4 series won't be getting it then? I'm not a kernel hacker as such, so I can't do it myself.

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

That would be appreciated I believe.

T.

author
#4 lore raw
In reply to OGAWA Hirofumi
Quoted 6 lines

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

Any update on the patch yet?

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

maintainer
#5 lore raw
Quoted 8 lines · F ker
Quoted 5 lines

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

Any update on the patch yet?

Whether it's needed, there is patch of fat for 2.4.18 and 2.5.19, here.

Signature · 1 line
OGAWA Hirofumi <[email protected]>
#6 lore raw
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

Any update on the patch yet?

Whether it's needed, there is patch of fat for 2.4.18 and 2.5.19, here.

Any chance you're sending this to Marcelo for possible inclusion in 2.4.20?

T.

maintainer
#7 lore raw
Quoted 11 lines · Tomas Szepe
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

This patch break some filesystems (adfs, affs, hfs, hpfs, qnx4). And I haven't fixed them yet. So, I can't submit this patch.

If it's OK, I'll make the patch for 2.4.18.

Any update on the patch yet?

Whether it's needed, there is patch of fat for 2.4.18 and 2.5.19, here.

Any chance you're sending this to Marcelo for possible inclusion in 2.4.20?

Before, I want to some test on 2.5.x at least. After it, I'll try to submit a patch...

Signature · 1 line
OGAWA Hirofumi <[email protected]>