diff options
author | Denis Karpov <ext-denis.2.karpov@nokia.com> | 2009-06-03 13:34:22 -0400 |
---|---|---|
committer | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2009-06-03 13:34:51 -0400 |
commit | 85c7859190c4197a7c34066db14c25903c401187 (patch) | |
tree | 9cf54e894f52eb1edfd35daeff66bfb5697b8360 /fs/fat/fatent.c | |
parent | 9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3 (diff) |
FAT: add 'errors' mount option
On severe errors FAT remounts itself in read-only mode. Allow to
specify FAT fs desired behavior through 'errors' mount option:
panic, continue or remount read-only.
`mount -t [fat|vfat] -o errors=[panic,remount-ro,continue] \
<bdev> <mount point>`
This is analog to ext2 fs 'errors' mount option.
Signed-off-by: Denis Karpov <ext-denis.2.karpov@nokia.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Diffstat (limited to 'fs/fat/fatent.c')
-rw-r--r-- | fs/fat/fatent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index da6eea47872f..60c31f7e678c 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c | |||
@@ -345,7 +345,7 @@ int fat_ent_read(struct inode *inode, struct fat_entry *fatent, int entry) | |||
345 | 345 | ||
346 | if (entry < FAT_START_ENT || sbi->max_cluster <= entry) { | 346 | if (entry < FAT_START_ENT || sbi->max_cluster <= entry) { |
347 | fatent_brelse(fatent); | 347 | fatent_brelse(fatent); |
348 | fat_fs_panic(sb, "invalid access to FAT (entry 0x%08x)", entry); | 348 | fat_fs_error(sb, "invalid access to FAT (entry 0x%08x)", entry); |
349 | return -EIO; | 349 | return -EIO; |
350 | } | 350 | } |
351 | 351 | ||
@@ -557,7 +557,7 @@ int fat_free_clusters(struct inode *inode, int cluster) | |||
557 | err = cluster; | 557 | err = cluster; |
558 | goto error; | 558 | goto error; |
559 | } else if (cluster == FAT_ENT_FREE) { | 559 | } else if (cluster == FAT_ENT_FREE) { |
560 | fat_fs_panic(sb, "%s: deleting FAT entry beyond EOF", | 560 | fat_fs_error(sb, "%s: deleting FAT entry beyond EOF", |
561 | __func__); | 561 | __func__); |
562 | err = -EIO; | 562 | err = -EIO; |
563 | goto error; | 563 | goto error; |