public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFD] FAT robustness
@ 2005-07-17  6:41 Hiroyuki Machida
  2005-07-18 11:57 ` Paulo Marques
  2005-07-19 14:54 ` OGAWA Hirofumi
  0 siblings, 2 replies; 10+ messages in thread
From: Hiroyuki Machida @ 2005-07-17  6:41 UTC (permalink / raw)
  To: linux-kernel


Folks,

I'd like to have a discussion about FAT robustness.
Please give your thought, comments and related issues.

About few years ago, we added some features to FAT, called xvfat,
so that System and FAT have robustness against unexpected media hot
unplug and ability to let applications correctly be aware the event.

Just for your reference, I put a patch to 2.4.20 kernel at
http://www.celinuxforum.org/CelfPubWiki/XvFatDiscussion?action=AttachFile&do=get&target=20050715-xvfat-2.4.20.patch
This includes following features;

	Handle media removed during “mount”
		Notification of media removal to application
		Cancellation of I/O Elevator for Block device
		Block system calls until a completion of writing
		Control order of meta-data updates, using transaction	
			control implemented in fs/xvfat/fwrq.c
		File syscall return “error”, except umount
	Japanese file name support
		possible 1-N mapping issues SJIS <-> UNICODE
	Dirty Flag support
	TIME ZONE support

On moving to 2.6, we consider and categorize issues, again.
And we are planing to have open source project for these features
to add 2.6 kernel.  I'd like to open discussion about these features
and how to implement on 2.6 kernel.

1. Issues to be addressed

- Issues around FAT with CE devices
  - Hot unplug issues
	- File System corruption on unplug  media/storage device
		Almost same as power down without umount

	- Notification of the event
		Application need to know the event precisely
		Need to more investigation

	- System stability after unplug
		Almost same as I/O error recovery issues discussed
		at LKLM
http://developer.osdl.jp/projects/doubt/fs-consistency-and-coherency/index.html

http://groups.google.co.jp/group/linux.kernel/browse_thread/thread/b9c11bccd59e0513/4a4dd84b411c6d32?q=[RFD]+FS+behavior+(I%2FO+failure)+in+kernel+summit++lkml&rnum=1&hl=ja#4a4dd84b411c6d32


  - Other issues
	- Time stamp issues
		using always local time
		time resolution is 2sec unit

	- Issues around mapping with UNICODE and local char code
		1-N mapping SJIS<-> UNICODE
		Potential directory cache problem due to 1 –N mapping
		Possible inconsistency problems with application side

	- Support file size over 2GB

	- Support dirty flag

  Q1 : First issue for discussion is "Do you have any other issues
	about this?" and "Do you have any other idea to categorize
	the issues?"


2.  FAT corruption on unplug  media/storage device

On starting the open source project, we focus to the following issue,
 first.
	- File System corruption on unplug  media/storage device
		Almost same as power down without umount

And, we are planing to focus on HDD device and treat system power down
instead of unplug media, because
  A. Damages and it's counter methods may depend on property of lower
     layer
	E.g.
	  - Memory Card
		Some controller can guaranty atomicity of certain
		operations
	  - Flush Memory (NAND, NOR)
		I/O operations may be constrained by Block Size
		(e,g, 128KB) or Page Size (e.g. 2KB)
	 - HDD
		- Cache memory my resident inside in
		- Sector which is under writing 
		on power down may be corrupted(can't read anymore)

  B.  It may make the problem easier
	- Sector size is 512 Byte
	- Many developers may check with PC

  Q2 : Do you know any other storage devices and it's property, to 
	be address later?

3. Features to be developed for FAT corruption.

We currently plan to add following features to address FAT corruption.

    - Utilize standard 2.6 features as much as possible
	- Implement as options of fat, vfat and uvfat
	- Utilize existent journal block device (JBD) for transaction control
	- Utilize noop elevator to cancel unexpected operation
	 reordering
    - Coordinate order of operations so that update data first, meta
	 data later with transaction control
    - With O_SYNC, close() make flush all related data and
	 meta-data, then wait completion of I/O

 
  Q3 : I'm not sure JBD can be used for FAT improvements. 
       Do you have any comments ?


Thanks,
Hiroyuki Machida




^ permalink raw reply	[flat|nested] 10+ messages in thread
* [RFD] FAT robustness
@ 2005-07-19 16:58 Etienne Lorrain
  2005-07-19 21:53 ` Horst von Brand
  2005-07-20  7:35 ` Denis Vlasenko
  0 siblings, 2 replies; 10+ messages in thread
From: Etienne Lorrain @ 2005-07-19 16:58 UTC (permalink / raw)
  To: linux-kernel, machida

> I'd like to have a discussion about FAT robustness.
> Please give your thought, comments and related issues.

  What I would like is to treat completely differently writing to
 FAT (writing to a removeable drive) which need a complete "mount",
 and just reading quickly a file (a standard use of removeable devices).

 Basically, to read you would not need to mount the partition, just
 read /readfs/fd1 which uses two or three functions accessing /dev/fd1
 in raw mode to read the filesystem descriptor and the root directory.
 Same for /readfs/cdrom and /readfs/sda4 (USB drive).
 The only cache would be the one provided by /dev/fd1 - a kind of
 mount read-only at each file opening.

 This system would be disabled if the partition is already mounted
 read/write somewhere - but as long as you do not try to write to
 a removeable disk you can extract it at any time.

  The two or three function I am talking of are located in Gujin
 "fs.c" file to access read-only FAT12/16/32, EXT2/3 and ISOFS
 ( http://gujin.org ). Just few kilobytes - and some source
 modifications for that use.

  Etienne.


	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-07-21 14:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-17  6:41 [RFD] FAT robustness Hiroyuki Machida
2005-07-18 11:57 ` Paulo Marques
2005-07-20 18:03   ` Hiroyuki Machida
2005-07-21 14:56     ` OGAWA Hirofumi
2005-07-21  5:22   ` Pavel Machek
2005-07-19 14:54 ` OGAWA Hirofumi
2005-07-21 12:15   ` Hiroyuki Machida
  -- strict thread matches above, loose matches on Subject: below --
2005-07-19 16:58 Etienne Lorrain
2005-07-19 21:53 ` Horst von Brand
2005-07-20  7:35 ` Denis Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox