All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fat: fat16 support maximum 4GB file/vol size as WinXP or 7.
@ 2011-08-16 14:28 Namjae Jeon
  2011-08-17  3:04 ` OGAWA Hirofumi
  0 siblings, 1 reply; 3+ messages in thread
From: Namjae Jeon @ 2011-08-16 14:28 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, Namjae Jeon

FAT16 support maximum 4GB vol/file size with 64KB cluster size.

Win NT/XP/7 increased the maximum cluster size to 64KB, and file/vol size increased 4GB also.
Although increasing, the file size of linux FAT is still limited at 2GB.
I found that it is limited by sb->maxbytes(0x7fffffff) when partition is formatted by FAT16.
sb->s_maxbytes in fill_super should be set to 0xffffffff like fat32.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
 fs/fat/inode.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 5942fec..f2dce50 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1367,6 +1367,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	sbi->free_clusters = -1;	/* Don't know yet */
 	sbi->free_clus_valid = 0;
 	sbi->prev_free = FAT_START_ENT;
+	sb->s_maxbytes = 0xffffffff;
 
 	if (!sbi->fat_length && b->fat32_length) {
 		struct fat_boot_fsinfo *fsinfo;
@@ -1377,8 +1378,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 		sbi->fat_length = le32_to_cpu(b->fat32_length);
 		sbi->root_cluster = le32_to_cpu(b->root_cluster);
 
-		sb->s_maxbytes = 0xffffffff;
-
 		/* MC - if info_sector is 0, don't multiply by 0 */
 		sbi->fsinfo_sector = le16_to_cpu(b->info_sector);
 		if (sbi->fsinfo_sector == 0)
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fat: fat16 support maximum 4GB file/vol size as WinXP or 7.
  2011-08-16 14:28 [PATCH] fat: fat16 support maximum 4GB file/vol size as WinXP or 7 Namjae Jeon
@ 2011-08-17  3:04 ` OGAWA Hirofumi
  0 siblings, 0 replies; 3+ messages in thread
From: OGAWA Hirofumi @ 2011-08-17  3:04 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: linux-kernel

Namjae Jeon <linkinjeon@gmail.com> writes:

> FAT16 support maximum 4GB vol/file size with 64KB cluster size.
>
> Win NT/XP/7 increased the maximum cluster size to 64KB, and file/vol size increased 4GB also.
> Although increasing, the file size of linux FAT is still limited at 2GB.
> I found that it is limited by sb->maxbytes(0x7fffffff) when partition is formatted by FAT16.
> sb->s_maxbytes in fill_super should be set to 0xffffffff like fat32.
>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>

Thanks. I'll apply.

> ---
>  fs/fat/inode.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 5942fec..f2dce50 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -1367,6 +1367,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
>  	sbi->free_clusters = -1;	/* Don't know yet */
>  	sbi->free_clus_valid = 0;
>  	sbi->prev_free = FAT_START_ENT;
> +	sb->s_maxbytes = 0xffffffff;
>  
>  	if (!sbi->fat_length && b->fat32_length) {
>  		struct fat_boot_fsinfo *fsinfo;
> @@ -1377,8 +1378,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
>  		sbi->fat_length = le32_to_cpu(b->fat32_length);
>  		sbi->root_cluster = le32_to_cpu(b->root_cluster);
>  
> -		sb->s_maxbytes = 0xffffffff;
> -
>  		/* MC - if info_sector is 0, don't multiply by 0 */
>  		sbi->fsinfo_sector = le16_to_cpu(b->info_sector);
>  		if (sbi->fsinfo_sector == 0)

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] fat: fat16 support maximum 4GB file/vol size as WinXP or 7.
@ 2011-07-26 15:17 Namjae Jeon
  0 siblings, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2011-07-26 15:17 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, Namjae Jeon

FAT16 support maximum 4GB vol/file size with 64KB cluster size.

Win NT/XP/7 increased the maximum cluster size to 64KB, and file/vol size increased 4GB also.
Although increasing, the file size of linux FAT is still limited at 2GB.
I found that it is limited by sb->maxbytes(0x7fffffff) when partition is formatted by FAT16.
sb->s_maxbytes in fill_super should be set to 0xffffffff like fat32.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
 fs/fat/inode.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 5942fec..f2dce50 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1367,6 +1367,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	sbi->free_clusters = -1;	/* Don't know yet */
 	sbi->free_clus_valid = 0;
 	sbi->prev_free = FAT_START_ENT;
+	sb->s_maxbytes = 0xffffffff;
 
 	if (!sbi->fat_length && b->fat32_length) {
 		struct fat_boot_fsinfo *fsinfo;
@@ -1377,8 +1378,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 		sbi->fat_length = le32_to_cpu(b->fat32_length);
 		sbi->root_cluster = le32_to_cpu(b->root_cluster);
 
-		sb->s_maxbytes = 0xffffffff;
-
 		/* MC - if info_sector is 0, don't multiply by 0 */
 		sbi->fsinfo_sector = le16_to_cpu(b->info_sector);
 		if (sbi->fsinfo_sector == 0)
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-17  3:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-16 14:28 [PATCH] fat: fat16 support maximum 4GB file/vol size as WinXP or 7 Namjae Jeon
2011-08-17  3:04 ` OGAWA Hirofumi
  -- strict thread matches above, loose matches on Subject: below --
2011-07-26 15:17 Namjae Jeon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.