Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54711
b: refs/heads/master
c: 28ec039
h: refs/heads/master
i:
  54709: 5f97632
  54707: 50a9ae2
  54703: fb702a6
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed May 8, 2007
1 parent 1d6019c commit 512ee52
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ff773bbde87f7f7dddc0f579ad53e077a6587b9
refs/heads/master: 28ec039c21839914389975b896160a815ffd8b83
7 changes: 7 additions & 0 deletions trunk/Documentation/filesystems/vfat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ nonumtail=<bool> -- When creating 8.3 aliases, normally the alias will
currently exist in the directory, 'longfile.txt' will
be the short alias instead of 'longfi~1.txt'.

usefree -- Use the "free clusters" value stored on FSINFO. It'll
be used to determine number of free clusters without
scanning disk. But it's not used by default, because
recent Windows don't update it correctly in some
case. If you are sure the "free clusters" on FSINFO is
correct, by this option you can avoid scanning disk.

quiet -- Stops printing certain warning messages.

check=s|r|n -- Case sensitivity checking setting.
Expand Down
14 changes: 11 additions & 3 deletions trunk/fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
}
if (opts->name_check != 'n')
seq_printf(m, ",check=%c", opts->name_check);
if (opts->usefree)
seq_puts(m, ",usefree");
if (opts->quiet)
seq_puts(m, ",quiet");
if (opts->showexec)
Expand All @@ -850,7 +852,7 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)

enum {
Opt_check_n, Opt_check_r, Opt_check_s, Opt_uid, Opt_gid,
Opt_umask, Opt_dmask, Opt_fmask, Opt_codepage, Opt_nocase,
Opt_umask, Opt_dmask, Opt_fmask, Opt_codepage, Opt_usefree, Opt_nocase,
Opt_quiet, Opt_showexec, Opt_debug, Opt_immutable,
Opt_dots, Opt_nodots,
Opt_charset, Opt_shortname_lower, Opt_shortname_win95,
Expand All @@ -872,6 +874,7 @@ static match_table_t fat_tokens = {
{Opt_dmask, "dmask=%o"},
{Opt_fmask, "fmask=%o"},
{Opt_codepage, "codepage=%u"},
{Opt_usefree, "usefree"},
{Opt_nocase, "nocase"},
{Opt_quiet, "quiet"},
{Opt_showexec, "showexec"},
Expand Down Expand Up @@ -951,7 +954,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
opts->utf8 = opts->unicode_xlate = 0;
opts->numtail = 1;
opts->nocase = 0;
opts->usefree = opts->nocase = 0;
*debug = 0;

if (!options)
Expand Down Expand Up @@ -979,6 +982,9 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
case Opt_check_n:
opts->name_check = 'n';
break;
case Opt_usefree:
opts->usefree = 1;
break;
case Opt_nocase:
if (!is_vfat)
opts->nocase = 1;
Expand Down Expand Up @@ -1304,7 +1310,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
le32_to_cpu(fsinfo->signature2),
sbi->fsinfo_sector);
} else {
sbi->free_clusters = le32_to_cpu(fsinfo->free_clusters);
if (sbi->options.usefree)
sbi->free_clusters =
le32_to_cpu(fsinfo->free_clusters);
sbi->prev_free = le32_to_cpu(fsinfo->next_cluster);
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/msdos_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ struct fat_mount_options {
numtail:1, /* Does first alias have a numeric '~1' type tail? */
atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */
flush:1, /* write things quickly */
nocase:1; /* Does this need case conversion? 0=need case conversion*/
nocase:1, /* Does this need case conversion? 0=need case conversion*/
usefree:1; /* Use free_clusters for FAT32 */
};

#define FAT_HASH_BITS 8
Expand Down

0 comments on commit 512ee52

Please sign in to comment.