SpecificationDosDirtyFlag
Size: 3399
Comment: Clarified the command line flag implementation as suggested by Mike Fedyk.
|
Size: 4299
Comment: Added references to the FAT specification. Added comment about kernel.
|
Deletions are marked like this. | Additions are marked like this. |
Line 10: | Line 10: |
* '''Launchpad entry''': none yet | * '''Launchpad entry''': [https://blueprints.launchpad.net/ubuntu/+spec/dos-dirty-flag dos-dirty-flag] |
Line 28: | Line 28: |
* The dirty flag is documented here: http://www.geocities.com/thestarman3/DOS/DirtyShutdownFlag.html | Wikepedia Article on FAT implementation: * http://en.wikipedia.org/wiki/File_Allocation_Table Wikepedia references: * http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html Microsoft Knowlegebase article describing the Boot Sector: * http://support.microsoft.com/kb/140418/ LKML emails commenting on the implementation: * http://lkml.org/lkml/1996/10/26/69 * http://lkml.org/lkml/1998/11/8/129 Current version of the boot sector definition: * http://www.gelato.unsw.edu.au/lxr/source/include/linux/msdos_fs.h Alternative description of the Boot Sector: * http://www.geocities.com/thestarman3/DOS/DirtyShutdownFlag.html Partition surprise manual containing comments about the dirty flag: * http://surprise.sourceforge.net/doc/tech-49.html |
Line 44: | Line 64: |
* Extensive searches indicate that the kernel supports dirty flags at an abstraction level, but this does not appear to have been implemented within the fat code. |
Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.
Created: 20 March, 2007
Author: [:OnnoBenschop: Onno Benschop]
Launchpad entry: [https://blueprints.launchpad.net/ubuntu/+spec/dos-dirty-flag dos-dirty-flag]
Packages affected: dosfstools
Summary
Make dosfstools aware of the status of a (v)FAT file system, stopping it from checking a known clean partition.
Rationale
As more and more users have access to USB sticks, external drives, digital cameras and larger drives that co-exist with other operating systems, dosfstools needs to participate in the existing file system integrity procedures, rather than just fix every (v)FAT partition it encounters.
Use cases
- Peter has a large drive with many partitions. When he boots Ubuntu, the process takes forever because his Windows Recovery Partition is checked each time Ubuntu boots, even though Windows itself doesn't.
- Paul has an external USB thumb drive. When he inserts the key, the drive content is changed because the mount process checks the drive regardless of its state.
- Mary has a digital camera. When she connects the camera, the computer attempts to check the file system because the camera shows itself to the computer as an external flash drive.
Scope
This specification purposefully only addresses changes made to dosfstools, not to the kernel.
Design
Wikepedia Article on FAT implementation:
Wikepedia references:
Microsoft Knowlegebase article describing the Boot Sector:
LKML emails commenting on the implementation:
Current version of the boot sector definition:
Alternative description of the Boot Sector:
Partition surprise manual containing comments about the dirty flag:
Implementation
- The implementation initially should check only those file systems that are marked dirty, skipping a clean file system.
- A command line parameter should be added to force a check on a clean file system. Perhaps -c for "check clean", rather than -F for "force check", since -f is used for "salvage to files"
Code
Data preservation and migration
The dirty flag does not currently get used. Some suggestions have been made to create a configuration file on the file system being checked, or in the appropriate location in the system tree. This would create more problems than it solves. There should be no additional configuration files at all. The existing system as used by other operating systems, for example Windows, should be used to maintain integrity.
Unresolved issues
- The kernel provides the actual access to the file system. It should maintain the dirty flag when changes to the file system are made. This specification says nothing about the kernel.
- If a file system is dirty, it is checked. After the check, the file system is clean. How do we update the partition to note this, given that the kernel doesn't appear to support a dirty flag?
- If we resolve the dirty flag write, we will likely have a solution for the kernel to maintain the dirty flag as well.
- Auto mounted file systems should be checked if they are dirty. That is, those devices that are connected after boot and detected by various sub-systems and consequently mounted.
- Extensive searches indicate that the kernel supports dirty flags at an abstraction level, but this does not appear to have been implemented within the fat code.
BoF agenda and discussion
SpecificationDosDirtyFlag (last edited 2008-08-06 16:25:51 by localhost)