Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Stephen Rothwell
On Mon, 31 Mar 2014 15:32:32 -0700 Andrew Morton wrote: > > On Mon, 31 Mar 2014 15:21:17 -0700 Conrad Meyer wrote: > > > >> + if (get_unaligned_le16(>sector_size) != 0 || b->sec_per_clus != > > >> 0 || > > >> + b->reserved != 0 || b->fats != 0 || > > >> +

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Andrew Morton
On Mon, 31 Mar 2014 15:21:17 -0700 Conrad Meyer wrote: > >> + if (get_unaligned_le16(>sector_size) != 0 || b->sec_per_clus != 0 > >> || > >> + b->reserved != 0 || b->fats != 0 || > >> + get_unaligned_le16(>dir_entries) != 0 || > >> +

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Conrad Meyer
On Mon, Mar 31, 2014 at 3:13 PM, Andrew Morton wrote: > On Sat, 29 Mar 2014 12:10:35 -0700 Conrad Meyer wrote: > >> + .nr_sectors = 360 * KB_IN_SECTORS, >> + .sec_per_clus = 2, >> + .dir_entries = 112, >> + .media = 0xFD, >> + .fat_length = 2, >> +}, >> +{ 0 } }; > > We don't

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Andrew Morton
On Sat, 29 Mar 2014 12:10:35 -0700 Conrad Meyer wrote: > When possible, infer DOS 2.x BIOS Parameter Block from block device > geometry (for floppies and floppy images). Update in-memory only. We > only perform this update when the entire BPB region is zeroed, like > produced by DOS 1.x-era

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Conrad Meyer
On Mon, 31 Mar 2014 23:07:32 +0900 OGAWA Hirofumi wrote: > Conrad Meyer writes: > > > +static void fat_update_archaic_boot_sector(struct > > super_block *sb, > > + struct fat_boot_sector *b) > > +{ > > + struct fat_floppy_defaults *di; > > + sector_t bd_sects; > > + > > + /* 16-bit DOS

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread OGAWA Hirofumi
Conrad Meyer writes: > +static void fat_update_archaic_boot_sector(struct super_block *sb, > + struct fat_boot_sector *b) > +{ > + struct fat_floppy_defaults *di; > + sector_t bd_sects; > + > + /* 16-bit DOS 1.x reliably wrote bootstrap short-jmp code */ > + if (b->ignored[0]

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread OGAWA Hirofumi
Conrad Meyer ceme...@uw.edu writes: +static void fat_update_archaic_boot_sector(struct super_block *sb, + struct fat_boot_sector *b) +{ + struct fat_floppy_defaults *di; + sector_t bd_sects; + + /* 16-bit DOS 1.x reliably wrote bootstrap short-jmp code */ + if

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Conrad Meyer
On Mon, 31 Mar 2014 23:07:32 +0900 OGAWA Hirofumi hirof...@mail.parknet.co.jp wrote: Conrad Meyer ceme...@uw.edu writes: +static void fat_update_archaic_boot_sector(struct super_block *sb, + struct fat_boot_sector *b) +{ + struct fat_floppy_defaults *di; + sector_t bd_sects;

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Andrew Morton
On Sat, 29 Mar 2014 12:10:35 -0700 Conrad Meyer ceme...@uw.edu wrote: When possible, infer DOS 2.x BIOS Parameter Block from block device geometry (for floppies and floppy images). Update in-memory only. We only perform this update when the entire BPB region is zeroed, like produced by DOS

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Conrad Meyer
On Mon, Mar 31, 2014 at 3:13 PM, Andrew Morton a...@linux-foundation.org wrote: On Sat, 29 Mar 2014 12:10:35 -0700 Conrad Meyer ceme...@uw.edu wrote: + .nr_sectors = 360 * KB_IN_SECTORS, + .sec_per_clus = 2, + .dir_entries = 112, + .media = 0xFD, + .fat_length = 2, +},

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Andrew Morton
On Mon, 31 Mar 2014 15:21:17 -0700 Conrad Meyer cse@gmail.com wrote: + if (get_unaligned_le16(b-sector_size) != 0 || b-sec_per_clus != 0 || + b-reserved != 0 || b-fats != 0 || + get_unaligned_le16(b-dir_entries) != 0 || +

Re: [PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-31 Thread Stephen Rothwell
On Mon, 31 Mar 2014 15:32:32 -0700 Andrew Morton a...@linux-foundation.org wrote: On Mon, 31 Mar 2014 15:21:17 -0700 Conrad Meyer cse@gmail.com wrote: + if (get_unaligned_le16(b-sector_size) != 0 || b-sec_per_clus != 0 || + b-reserved != 0 || b-fats != 0 || +

[PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-29 Thread Conrad Meyer
When possible, infer DOS 2.x BIOS Parameter Block from block device geometry (for floppies and floppy images). Update in-memory only. We only perform this update when the entire BPB region is zeroed, like produced by DOS 1.x-era FORMAT (and other OEM variations on DOS). Fixes kernel.org bug

[PATCH v2] fs: FAT: Add support for DOS 1.x formatted volumes

2014-03-29 Thread Conrad Meyer
When possible, infer DOS 2.x BIOS Parameter Block from block device geometry (for floppies and floppy images). Update in-memory only. We only perform this update when the entire BPB region is zeroed, like produced by DOS 1.x-era FORMAT (and other OEM variations on DOS). Fixes kernel.org bug