17 Apr, 2015

1 commit

  • 'fat.h' includes which includes which
    includes all the header files required for all *.c files fat filesystem.

    [akpm@linux-foundation.org: fs/fat/iode.c needs seq_file.h]
    [sfr@canb.auug.org.au: put one actually necessary include file back]
    Signed-off-by: Alexander Kuleshov
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Kuleshov
     

06 Oct, 2012

2 commits


01 Jun, 2012

3 commits

  • Currently FAT file-system maps the VFS "superblock" abstraction to the
    FSINFO block. The FSINFO block contains non-essential data about the
    amount of free clusters and the next free cluster. FAT file-system can
    always find out this information by scanning the FAT table, but having it
    in the FSINFO block may speed things up sometimes. So FAT file-system
    relies on the VFS superblock write-out services to make sure the FSINFO
    block is written out to the media from time to time.

    The whole "superblock write-out" VFS infrastructure is served by the
    'sync_supers()' kernel thread, which wakes up every 5 (by default) seconds
    and writes out all dirty superblock using the '->write_super()' call-back.
    But the problem with this thread is that it wastes power by waking up the
    system every 5 seconds no matter what. So we want to kill it completely
    and thus, we need to make file-systems to stop using the '->write_super'
    VFS service, and then remove it together with the kernel thread.

    This patch switches the FAT FSINFO block management from
    '->write_super()'/'->s_dirt' to 'fsinfo_inode'/'->write_inode'. Now,
    instead of setting the 's_dirt' flag, we just mark the special
    'fsinfo_inode' inode as dirty and let VFS invoke the '->write_inode'
    call-back when needed, where we write-out the FSINFO block.

    This patch also makes sure we do not mark the 'fsinfo_inode' inode as
    dirty if we are not FAT32 (FAT16 and FAT12 do not have the FSINFO block)
    or if we are in R/O mode.

    As a bonus, we can also remove the '->sync_fs()' and '->write_super()' FAT
    call-back function because they become unneeded.

    Signed-off-by: Artem Bityutskiy
    Cc: OGAWA Hirofumi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • Preparation for further changes. It touches few functions in fatent.c and
    prevents them from marking the superblock as dirty unnecessarily often.
    Namely, instead of marking it as dirty in the internal tight loops - do it
    only once at the end of the functions. And instead of marking it as dirty
    while holding the FAT table lock, do it outside the lock.

    The reason for this patch is that marking the superblock as dirty will
    soon become a little bit heavier operation, so it is cleaner to do this
    only when it is necessary.

    Signed-off-by: Artem Bityutskiy
    Cc: OGAWA Hirofumi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • A preparation patch which introduces a 'mark_fsinfo_dirty()' helper
    function which just sets the 's_dirt' flag to 1 so far. I'll add more
    code to this helper later, so I do not mark it as 'inline'.

    Signed-off-by: Artem Bityutskiy
    Cc: OGAWA Hirofumi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     

12 Apr, 2011

1 commit


17 Sep, 2010

1 commit

  • All the blkdev_issue_* helpers can only sanely be used for synchronous
    caller. To issue cache flushes or barriers asynchronously the caller needs
    to set up a bio by itself with a completion callback to move the asynchronous
    state machine ahead. So drop the BLKDEV_IFL_WAIT flag that is always
    specified when calling blkdev_issue_* and also remove the now unused flags
    argument to blkdev_issue_flush and blkdev_issue_zeroout. For
    blkdev_issue_discard we need to keep it for the secure discard flag, which
    gains a more descriptive name and loses the bitops vs flag confusion.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

10 Sep, 2010

2 commits


21 Nov, 2009

1 commit

  • Currently shipping discard capable SSDs and arrays have rather sub-optimal
    implementations of the command and can the use of it can cause massive
    slowdowns. Make issueing these commands option as it's already in btrfs
    and gfs2.

    Signed-off-by: Christoph Hellwig
    [hirofumi@mail.parknet.co.jp: tweaks, and add "discard" to fat_show_options]
    Signed-off-by: OGAWA Hirofumi

    Christoph Hellwig
     

17 Jun, 2009

1 commit


12 Jun, 2009

1 commit

  • * mark directory data blocks as assoc. metadata
    * add new inode to deal with FAT, mark FAT blocks as assoc. metadata of that
    * now ->fsync() is trivial both for files and directories

    Signed-off-by: Al Viro

    Al Viro
     

04 Jun, 2009

1 commit

  • On severe errors FAT remounts itself in read-only mode. Allow to
    specify FAT fs desired behavior through 'errors' mount option:
    panic, continue or remount read-only.

    `mount -t [fat|vfat] -o errors=[panic,remount-ro,continue] \
    `

    This is analog to ext2 fs 'errors' mount option.

    Signed-off-by: Denis Karpov
    Signed-off-by: OGAWA Hirofumi

    Denis Karpov
     

07 Nov, 2008

3 commits


09 Oct, 2008

1 commit


30 Apr, 2008

1 commit


28 Apr, 2008

2 commits

  • This removes unneeded fat_clusters_flush().

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

    OGAWA Hirofumi
     
  • Currently, free_clusters is not updated until it is trusted, because
    Windows doesn't update it correctly.

    But if user is using FAT driver of Linux, it updates free_clusters
    correctly. Instead, this updates it even if it's untrusted, so if
    free_clustes is correct, now keep correct value.

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

    OGAWA Hirofumi
     

09 Jan, 2008

1 commit

  • On large partition, scanning the free clusters is very slow if users
    doesn't use "usefree" option.

    For optimizing it, this patch uses sb_breadahead() to read of FAT
    sectors. On some user's 15GB partition, this patch improved it very
    much (1min => 600ms).

    The following is the result of 2GB partition on my machine.

    without patch:
    root@devron (/)# time df -h > /dev/null

    real 0m1.202s
    user 0m0.000s
    sys 0m0.440s

    with patch:
    root@devron (/)# time df -h > /dev/null

    real 0m0.378s
    user 0m0.012s
    sys 0m0.168s

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

    OGAWA Hirofumi
     

17 Jul, 2007

1 commit

  • FAT12 entry is 12bits, so it needs 2 phase to update the value. And
    writer and reader access it without any lock, so reader can get the
    half updated value.

    This fixes the long standing race condition by adding a global
    spinlock to only FAT12 for avoiding any impact against FAT16/32.

    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     

23 Mar, 2006

1 commit


09 Jan, 2006

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds