20 Jan, 2015

1 commit


10 Jul, 2013

1 commit

  • This patch, originally from Android kernel, adds vfat ioctl command
    FAT_IOCTL_GET_VOLUME_ID, with this command we can get the vfat volume ID
    using following code:

    ioctl(fd, FAT_IOCTL_GET_VOLUME_ID, &volume_ID)

    This patch is a modified version of the patch by Mike Lockwood, with
    changes from Dmitry Pervushin, who noticed the original patch makes some
    volume IDs abiguous with error returns: for example, if volume id is
    0xFFFFFDAD, that matches -ENOIOCTLCMD, we get "FFFFFFFF" from the user
    space.

    So add a parameter to ioctl to get the correct volume ID.

    Android uses vfat volume ID to identify different sd card, when a new sd
    card is inserted to device, android can scan the media on it and pop up
    new contents.

    Signed-off-by: Bintian Wang
    Cc: dmitry pervushin
    Cc: Mike Lockwood
    Cc: Colin Cross
    Acked-by: OGAWA Hirofumi
    Cc: John Stultz
    Cc: Sean McNeil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Lockwood
     

28 Feb, 2013

2 commits

  • 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
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleksij Rempel
     
  • Later we will need "state" field to check if volume was cleanly unmounted.

    Signed-off-by: Oleksij Rempel
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleksij Rempel
     

13 Oct, 2012

1 commit