+ fs-fat-add-support-for-dos-1x-formatted-volumes.patch added to -mm tree
Subsystems (2)
Subject: + fs-fat-add-support-for-dos-1x-formatted-volumes.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Mon, 21 Apr 2014 13:26:09 -0700
The patch titled
Subject: fs/fat/: add support for DOS 1.x formatted volumes
has been added to the -mm tree. Its filename is
fs-fat-add-support-for-dos-1x-formatted-volumes.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fs-fat-add-support-for-dos-1x-formatted-volumes.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fs-fat-add-support-for-dos-1x-formatted-volumes.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Conrad Meyer <[email protected]>
Subject: fs/fat/: add support for DOS 1.x formatted volumes
Add structure for parsed BPB information, struct fat_bios_param_block, and move all of the deserialization and validation logic from fat_fill_super() into fat_read_bpb().
Add a 'dos1xfloppy' mount option to infer DOS 2.x BIOS Parameter Block defaults from block device geometry for ancient floppies and floppy images, as a fall-back from the default BPB parsing logic.
When fat_read_bpb() finds an invalid FAT filesystem and dos1xfloppy is set, fall back to fat_read_static_bpb(). fat_read_static_bpb() validates that the entire BPB is zero, and that the floppy has a DOS-style 8086 code bootstrapping header. Then it fills in default BPB values from media size and a table.[0]
Media size is assumed to be static for archaic FAT volumes. See also:
[1].
Fixes kernel.org bug #42617.
[0]: https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
[1]: http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
---
Documentation/filesystems/vfat.txt | 5 fs/fat/fat.h | 3 fs/fat/inode.c | 342 +++++++++++++++++++++------ 3 files changed, 273 insertions(+), 77 deletions(-)
Documentation/filesystems/vfat.txt renamed from Documentation/filesystems/vfat.txt~fs-fat-add-support-for-dos-1x-formatted-volumes +5 -0
@@ -172,6 +172,11 @@ nfs=stale_rw|nostale_ro To maintain backward compatibility, '-o nfs' is also accepted, defaulting to stale_rw +dos1xfloppy -- If set, use a fallback default BIOS Parameter Block + configuration, determined by backing device size. These static + parameters match defaults assumed by DOS 1.x for 160 kiB, + 180 kiB, 320 kiB, and 360 kiB floppies and floppy images. + <bool>: 0,1,yes,no,true,false
fs/fat/fat.h renamed from fs/fat/fat.h~fs-fat-add-support-for-dos-1x-formatted-volumes +2 -1
@@ -52,7 +52,8 @@ struct fat_mount_options { usefree:1, /* Use free_clusters for FAT32 */ tz_set:1, /* Filesystem timestamps' offset set */ rodir:1, /* allow ATTR_RO for directory */ - discard:1; /* Issue discard requests on deletions */ + discard:1, /* Issue discard requests on deletions */ + dos1xfloppy:1; /* Assume default BPB for DOS 1.x floppies */ };#define FAT_HASH_BITS 8
fs/fat/inode.c renamed from fs/fat/inode.c~fs-fat-add-support-for-dos-1x-formatted-volumes +266 -75
480 lines not on this page · raw message