aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@gmail.com>2011-08-17 06:10:09 -0400
committerOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2011-08-17 06:35:00 -0400
commit710d4403a45c4040a9aa86971d50958f5ae6ed40 (patch)
tree5cbbfedf3357c057f8d0043964e45b2e7597f0f6 /fs/fat
parent186b53701ca5a843b07ca44a8d954dc6043c70f4 (diff)
fat: fat16 support maximum 4GB file/vol size as WinXP or 7.
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> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 52bcf58104e2..017493b64317 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1365,6 +1365,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
1365 sbi->free_clusters = -1; /* Don't know yet */ 1365 sbi->free_clusters = -1; /* Don't know yet */
1366 sbi->free_clus_valid = 0; 1366 sbi->free_clus_valid = 0;
1367 sbi->prev_free = FAT_START_ENT; 1367 sbi->prev_free = FAT_START_ENT;
1368 sb->s_maxbytes = 0xffffffff;
1368 1369
1369 if (!sbi->fat_length && b->fat32_length) { 1370 if (!sbi->fat_length && b->fat32_length) {
1370 struct fat_boot_fsinfo *fsinfo; 1371 struct fat_boot_fsinfo *fsinfo;
@@ -1375,8 +1376,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
1375 sbi->fat_length = le32_to_cpu(b->fat32_length); 1376 sbi->fat_length = le32_to_cpu(b->fat32_length);
1376 sbi->root_cluster = le32_to_cpu(b->root_cluster); 1377 sbi->root_cluster = le32_to_cpu(b->root_cluster);
1377 1378
1378 sb->s_maxbytes = 0xffffffff;
1379
1380 /* MC - if info_sector is 0, don't multiply by 0 */ 1379 /* MC - if info_sector is 0, don't multiply by 0 */
1381 sbi->fsinfo_sector = le16_to_cpu(b->info_sector); 1380 sbi->fsinfo_sector = le16_to_cpu(b->info_sector);
1382 if (sbi->fsinfo_sector == 0) 1381 if (sbi->fsinfo_sector == 0)