1. 17 4月, 2015 2 次提交
  2. 14 12月, 2014 1 次提交
    • N
      fat: fix data past EOF resulting from fsx testsuite · c0ef0cc9
      Namjae Jeon 提交于
      When running FSX with direct I/O mode, fsx resulted in DATA past EOF issues.
      
        fsx ./file2 -Z -r 4096 -w 4096
        ...
        ..
        truncating to largest ever: 0x907c
        fallocating to largest ever: 0x11137
        truncating to largest ever: 0x2c6fe
        truncating to largest ever: 0x2cfdf
        fallocating to largest ever: 0x40000
        Mapped Read: non-zero data past EOF (0x18628) page offset 0x629 is 0x2a4e
        ...
        ..
      
      The reason being, it is doing a truncate down, but the zeroing does not
      happen on the last block boundary when offset is not aligned.  Even though
      it calls truncate_setsize()->truncate_inode_pages()->
      truncate_inode_pages_range() and considers the partial zeroout but it
      retrieves the page using find_lock_page() - which only looks the page in
      the cache.  So, zeroing out does not happen in case of direct IO.
      
      Make a truncate page based around block_truncate_page for FAT filesystem
      and invoke that helper to zerout in case the offset is not aligned with
      the blocksize.
      Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: NAmit Sahrawat <a.sahrawat@samsung.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c0ef0cc9
  3. 07 6月, 2014 1 次提交
  4. 25 10月, 2013 1 次提交
  5. 10 7月, 2013 1 次提交
    • M
      fatfs: add FAT_IOCTL_GET_VOLUME_ID · 6e5b93ee
      Mike Lockwood 提交于
      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: NBintian Wang <bintian.wang@linaro.org>
      Cc: dmitry pervushin <dpervushin@gmail.com>
      Cc: Mike Lockwood <lockwood@android.com>
      Cc: Colin Cross <ccross@android.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Sean McNeil <sean@mcneil.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e5b93ee
  6. 30 4月, 2013 6 次提交
  7. 28 2月, 2013 1 次提交
  8. 18 12月, 2012 1 次提交
  9. 10 10月, 2012 1 次提交
  10. 06 10月, 2012 4 次提交
  11. 20 9月, 2012 1 次提交
  12. 31 7月, 2012 1 次提交
  13. 01 6月, 2012 2 次提交
    • N
      fat: add fat_msg_ratelimit() · b742c341
      Namjae Jeon 提交于
      Add a fat_msg_ratelimit() to limit the message generation rate.
      Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com>
      Signed-off-by: NAmit Sahrawat <amit.sahrawat83@gmail.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b742c341
    • A
      fat: introduce special inode for managing the FSINFO block · 020ac5b6
      Artem Bityutskiy 提交于
      This is patchset makes fatfs stop using the VFS '->write_super()' method
      for writing out the FSINFO block.
      
      The final goal is to get rid of the 'sync_supers()' kernel thread.  This
      kernel thread wakes up every 5 seconds (by default) and calls
      '->write_super()' for all mounted file-systems.  And the bad thing is that
      this is done even if all the superblocks are clean.  Moreover, some
      file-systems do not even need this end they do not register the
      '->write_super()' method at all (e.g., btrfs).
      
      So 'sync_supers()' most often just generates useless wake-ups and wastes
      power.  I am trying to make all file-systems independent of
      '->write_super()' and plan to remove 'sync_supers()' and '->write_super'
      completely once there are no more users.
      
      The '->write_supers()' method is mostly used by baroque file-systems like
      hfs, udf, etc.  Modern file-systems like btrfs and xfs do not use it.
      This justifies removing this stuff from VFS completely and make every FS
      self-manage own superblock.
      
      Tested with xfstests.
      
      This patch:
      
      Preparation for further changes.  It introduces a special inode
      ('fsinfo_inode') in FAT file-system which we'll later use for managing the
      FSINFO block.  Note, this there is already one special inode ('fat_inode')
      which is used for managing the FAT tables.
      
      Introduce new 'MSDOS_FSINFO_INO' constant for this special inode.  It is
      safe to do because FAT file-system does not store inode numbers on the
      media but generates them run-time.
      
      I've also cleaned up the comment to existing 'MSDOS_ROOT_INO' constant,
      while on it.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      020ac5b6
  14. 04 1月, 2012 1 次提交
  15. 01 11月, 2011 1 次提交
  16. 21 7月, 2011 2 次提交
  17. 12 4月, 2011 3 次提交
  18. 13 1月, 2011 1 次提交
  19. 10 8月, 2010 1 次提交
    • C
      check ATTR_SIZE contraints in inode_change_ok · 2c27c65e
      Christoph Hellwig 提交于
      Make sure we check the truncate constraints early on in ->setattr by adding
      those checks to inode_change_ok.  Also clean up and document inode_change_ok
      to make this obvious.
      
      As a fallout we don't have to call inode_newsize_ok from simple_setsize and
      simplify it down to a truncate_setsize which doesn't return an error.  This
      simplifies a lot of setattr implementations and means we use truncate_setsize
      almost everywhere.  Get rid of fat_setsize now that it's trivial and mark
      ext2_setsize static to make the calling convention obvious.
      
      Keep the inode_newsize_ok in vmtruncate for now as all callers need an
      audit for its removal anyway.
      
      Note: setattr code in ecryptfs doesn't call inode_change_ok at all and
      needs a deeper audit, but that is left for later.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2c27c65e
  20. 28 5月, 2010 2 次提交
  21. 25 5月, 2010 1 次提交
  22. 17 5月, 2010 1 次提交
  23. 21 11月, 2009 1 次提交
  24. 20 9月, 2009 1 次提交
    • O
      fat: Check s_dirt in fat_sync_fs() · ed248b29
      OGAWA Hirofumi 提交于
      If we didn't check sb->s_dirt, it will update the FSINFO
      unconditionally. It will reduce the filetime of flash base device.
      
      So, this checks sb->s_dirt. sb->s_dirt is racy, however FSINFO is just
      hint. So even if there is race, and we hit it, it would not become big
      problem.
      
      And this also is as workaround of suspend problem.
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      ed248b29
  25. 12 6月, 2009 1 次提交
  26. 04 6月, 2009 1 次提交