linux/fs/fat
Oleksij Rempel b88a105802 fat: mark fs as dirty on mount and clean on umount
There is no documented methods to mark FAT as dirty.  Unofficially MS
started to use reserved Byte in boot sector for this purpose, at least
since Win 2000.  With Win 7 user is warned if fs is dirty and asked to
clean it.

Different versions of Win, handle it in different ways, but always have
same meaning:

- Win 2000 and XP, set it on write operations and
  remove it after operation was finnished
- Win 7, set dirty flag on first write and remove it on umount.

We will do it as follows:

- set dirty flag on mount. If fs was initially dirty, warn user,
  remember it and do not do any changes to boot sector.
- clean it on umount. If fs was initially dirty, leave it dirty.
- do not do any thing if fs mounted read-only.
- TODO: leave fs dirty if we found some error after mount.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:11 -08:00
..
cache.c fs/fat: fix two checkpatch issues in cache.c 2012-10-06 03:05:10 +09:00
dir.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fat.h fat: mark fs as dirty on mount and clean on umount 2013-02-27 19:10:11 -08:00
fatent.c fat: no need to reset EOF in ent_put for FAT32 2012-10-06 03:05:12 +09:00
file.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
inode.c fat: mark fs as dirty on mount and clean on umount 2013-02-27 19:10:11 -08:00
Kconfig
Makefile fat (exportfs): move NFS support code 2012-10-06 03:05:09 +09:00
misc.c fat: fix incorrect function comment 2012-12-20 17:40:20 -08:00
namei_msdos.c fat: drop lock/unlock super 2012-10-09 23:33:38 -04:00
namei_vfat.c fat: drop lock/unlock super 2012-10-09 23:33:38 -04:00
nfs.c fat (exportfs): fix dentry reconnection 2012-10-06 03:05:09 +09:00