linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Sasha Levin <sashal@kernel.org>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Sasha Levin" <alexander.levin@microsoft.com>,
	"Christoph Hellwig" <hch@infradead.org>
Subject: Re: [PATCH] staging: exfat: add exfat filesystem code to staging
Date: Fri, 14 Feb 2020 17:16:18 -0500	[thread overview]
Message-ID: <86151.1581718578@turing-police> (raw)
In-Reply-To: <20200213211847.GA1734@sasha-vm>

[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]

On Thu, 13 Feb 2020 16:18:47 -0500, Sasha Levin said:

> >> I was hoping that it would be possible to easily use secondary FAT table
> >> (from TexFAT extension) for redundancy without need to implement full
> >> TexFAT, which could be also backward compatible with systems which do
> >> not implement TexFAT extension at all. Similarly like using FAT32 disk
> >> with two FAT tables is possible also on system which use first FAT
> >> table.

OK.. maybe I'm not sufficiently caffeinated, but how do you use 2 FAT tables on
a physical device and expect it to work properly on a system that uses just the
first FAT table, if the device is set to "use second table" when you mount it?
That sounds just too much like the failure modes of running fsck on a mounted
filesystem....

> >By the chance, is there any possibility to release TexFAT specification?
> >Usage of more FAT tables (even for Linux) could help with data recovery.
>
> This would be a major pain in the arse to pull off (even more that
> releasing exFAT itself) because TexFAT is effectively dead and no one
> here cares about it. It's not even the case that there are devices which
> are now left unsupported, the whole TexFAT scheme is just dead and gone.
>
> Could I point you to the TexFAT patent instead
> (https://patents.google.com/patent/US7613738B2/en)? It describes well
> how TexFAT used to work.

I don't think anybody wants the full TexFAT support - but having a backup copy
of the FAT would be nice in some circumstances.

Actually, that raises an question....

What the published spec says:

The File Allocation Table (FAT) region may contain up to two FATs, one in the
First FAT sub-region and another in the Second FAT sub-region. The NumberOfFats
field describes how many FATs this region contains. The valid values for the
NumberOfFats field are 1 and 2. Therefore, the First FAT sub-region always
contains a FAT. If the NumberOfFats field is two, then the Second FAT
sub-region also contains a FAT.

The ActiveFat field of the VolumeFlags field describes which FAT is active.
Only the VolumeFlags field in the Main Boot Sector is current. Implementations
shall treat the FAT which is not active as stale. Use of the inactive FAT and
switching between FATs is implementation specific.

Sasha:  can you find out what the Windows implementation does regarding that
last sentence?  Does it actively use both FAT sub-regions and switch between
them (probably not), or does it read the ActiveFAT value and use that one, or
does Windows just use NumberOfFats == 1?

I'm assuming that the fact the doc also says "NumberOfFats == 2 is only valid
for TexFAT volumes" possibly means "Microsoft thinks that's hardcoded at 1"
given the death of TexFAT.  That would make adding alternate FAT support a
major challenge.

On the other hand, if Windows actually looks at the NumberOfFats value, finds
a 2, and ActiveFAT ==1 (meaning use second table) and says "OK, whatever" and
just uses the second table from there on out, it becomes a lot easier.



[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-02-14 22:16 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190828160817.6250-1-gregkh@linuxfoundation.org>
2019-08-28 17:00 ` [PATCH] staging: exfat: add exfat filesystem code to staging Greg Kroah-Hartman
2019-08-29  6:23   ` Christoph Hellwig
2019-08-29  6:39     ` Greg Kroah-Hartman
2019-08-29  9:41       ` Christoph Hellwig
2019-08-29  9:50         ` Greg Kroah-Hartman
2019-08-29 10:37           ` Christoph Hellwig
2019-08-29 11:04             ` Gao Xiang
2019-08-29 11:18               ` Greg Kroah-Hartman
2019-08-29 11:18             ` Greg Kroah-Hartman
2019-08-29 15:11               ` Dan Carpenter
2019-08-29 15:27                 ` Gao Xiang
2019-08-29 15:43                   ` Dan Carpenter
2019-08-29 15:51                     ` Gao Xiang
2019-08-29 16:04                       ` Gao Xiang
2019-08-30  8:34                         ` Dan Carpenter
2019-08-30  8:43                           ` Gao Xiang
2019-08-30 11:26                             ` Dan Carpenter
2019-08-30 12:04                               ` Gao Xiang
2019-08-29 16:44                     ` Gao Xiang
2019-08-29 16:59                       ` Joe Perches
2019-08-29 17:02                         ` Gao Xiang
2019-08-30  2:06                     ` Chao Yu
2019-08-30  6:38                       ` Gao Xiang
2019-08-30 12:00                         ` Checking usage of likeliness annotations Markus Elfring
2019-08-30 11:51                       ` [PATCH] staging: exfat: add exfat filesystem code to staging David Sterba
2019-08-31  3:50                         ` Chao Yu
2019-08-30 15:36               ` Christoph Hellwig
2019-08-30 21:54               ` Dave Chinner
2019-08-31 10:31                 ` Valdis Klētnieks
2019-09-01  0:04                   ` Dave Chinner
2019-08-29  7:01     ` Gao Xiang
2019-08-29  8:24       ` Gao Xiang
2019-08-29  9:51         ` Christoph Hellwig
2019-08-29 12:14 ` Pali Rohár
2019-08-29 12:34   ` Valdis Klētnieks
2019-08-29 12:46     ` Pali Rohár
2019-08-29 14:08 ` Markus Elfring
2019-08-29 15:44 ` Markus Elfring
2019-08-29 20:56 ` Pali Rohár
2019-08-29 23:18   ` Valdis Klētnieks
2019-08-29 23:35     ` Sasha Levin
2019-08-30  7:56       ` Pali Rohár
2019-10-16 14:03         ` Pali Rohár
2019-10-16 14:31           ` Sasha Levin
2019-10-16 16:03             ` Pali Rohár
2019-10-16 16:20               ` Sasha Levin
2019-10-16 16:22               ` Greg Kroah-Hartman
2019-10-16 16:32                 ` Pali Rohár
2019-10-16 16:50                   ` Greg Kroah-Hartman
2019-10-16 20:33               ` Sasha Levin
2019-10-16 21:53                 ` Valdis Klētnieks
2019-10-17  7:53                   ` Pali Rohár
2019-10-17  7:50                 ` Pali Rohár
2020-02-13  0:06                   ` Pali Rohár
2020-02-13 21:18                     ` Sasha Levin
2020-02-14 22:16                       ` Valdis Klētnieks [this message]
2020-02-14 22:43                         ` Pali Rohár
2020-02-14 23:25                           ` Valdis Klētnieks
2020-04-21 21:30                       ` exfat upcase table for code points above U+FFFF (Was: Re: [PATCH] staging: exfat: add exfat filesystem code to staging) Pali Rohár
2020-04-27 15:49                         ` Sasha Levin
2020-04-28  7:46                           ` Pali Rohár
2019-10-16 16:05             ` [PATCH] staging: exfat: add exfat filesystem code to staging Valdis Klētnieks
2019-08-30  8:03     ` Pali Rohár
2019-08-30 15:40   ` Christoph Hellwig
2019-08-30 15:43     ` Pali Rohár
2019-09-14 13:39 ` [PATCH] staging: exfat: add exfat filesystem code to Park Ju Hyung
2019-09-15 13:54   ` Greg KH
2019-09-15 16:11     ` Ju Hyung Park
     [not found] ` <20190918195920.25210-1-qkrwngud825@gmail.com>
2019-09-18 20:12   ` [PATCH] staging: exfat: rebase to sdFAT v2.2.0 Greg KH
2019-09-18 20:13   ` Greg KH
2019-09-18 20:22     ` Ju Hyung Park
2019-09-18 20:26       ` Greg KH
2019-09-18 20:31         ` Ju Hyung Park
2019-09-18 20:46           ` Valdis Klētnieks
2019-09-18 21:31   ` kbuild test robot
2019-09-18 21:31   ` kbuild test robot
2019-09-18 22:17     ` Ju Hyung Park
2019-10-24  9:39 ` [PATCH] staging: exfat: add exfat filesystem code to staging Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86151.1581718578@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=alexander.levin@microsoft.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=sashal@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).