1. 22 Sep, 2016 1 commit
  2. 22 Jan, 2016 1 commit
    • Al Viro's avatar
      wrappers for ->i_mutex access · 5955102c
      Al Viro authored
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  3. 21 Jan, 2016 1 commit
    • Namjae Jeon's avatar
      fat: add fat_fallocate operation · b13bb33e
      Namjae Jeon authored
      Implement preallocation via the fallocate syscall on VFAT partitions.
      This patch is based on an earlier patch of the same name which had some
      issues detailed below and did not get accepted.  Refer
      a) The preallocated space was not persistent when the
         FALLOC_FL_KEEP_SIZE flag was set.  It will deallocate cluster at evict
      b) There was no need to zero out the clusters when the flag was set
         Instead of doing an expanding truncate, just allocate clusters and add
         them to the fat chain.  This reduces preallocation time.
      Compatibility with windows:
      There are no issues when FALLOC_FL_KEEP_SIZE is not set because it just
      does an expanding truncate.  Thus reading from the preallocated area on
      windows returns null until data is written to it.
      When a file with preallocated area using the FALLOC_FL_KEEP_SIZE was
      written to on windows, the windows driver freed-up the preallocated
      clusters and allocated new clusters for the new data.  The freed up
      clusters gets reflected in the free space available for the partition
      which can be seen from the Volume properties.
      The windows chkdsk tool also does not report any errors on a disk
      containing files with preallocated space.
      And there is also no issue using linux fat fsck.  because discard
      preallocated clusters at repair time.
      Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: default avatarAmit Sahrawat <a.sahrawat@samsung.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  4. 02 Jun, 2015 1 commit
    • Tejun Heo's avatar
      writeback: separate out include/linux/backing-dev-defs.h · 66114cad
      Tejun Heo authored
      With the planned cgroup writeback support, backing-dev related
      declarations will be more widely used across block and cgroup;
      unfortunately, including backing-dev.h from include/linux/blkdev.h
      makes cyclic include dependency quite likely.
      This patch separates out backing-dev-defs.h which only has the
      essential definitions and updates blkdev.h to include it.  c files
      which need access to more backing-dev details now include
      backing-dev.h directly.  This takes backing-dev.h off the common
      include dependency chain making it a lot easier to use it across block
      and cgroup.
      v2: fs/fat build failure fixed.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
  5. 17 Apr, 2015 1 commit
  6. 15 Apr, 2015 1 commit
  7. 12 Apr, 2015 1 commit
  8. 13 Dec, 2014 1 commit
    • Namjae Jeon's avatar
      fat: fix data past EOF resulting from fsx testsuite · c0ef0cc9
      Namjae Jeon authored
      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: default avatarNamjae Jeon <namjae.jeon@samsung.com>
      Signed-off-by: default avatarAmit Sahrawat <a.sahrawat@samsung.com>
      Acked-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  9. 06 May, 2014 2 commits
  10. 09 Jul, 2013 1 commit
    • Mike Lockwood's avatar
      fatfs: add FAT_IOCTL_GET_VOLUME_ID · 6e5b93ee
      Mike Lockwood authored
      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
      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: default avatarBintian 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: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Sean McNeil <sean@mcneil.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  11. 30 Apr, 2013 1 commit
  12. 23 Feb, 2013 1 commit
  13. 20 Sep, 2012 1 commit
  14. 30 Jul, 2012 1 commit
  15. 04 Jan, 2012 3 commits
  16. 21 Jul, 2011 3 commits
  17. 31 May, 2011 1 commit
  18. 09 Aug, 2010 3 commits
    • Christoph Hellwig's avatar
      check ATTR_SIZE contraints in inode_change_ok · 2c27c65e
      Christoph Hellwig authored
      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: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    • Christoph Hellwig's avatar
      always call inode_change_ok early in ->setattr · db78b877
      Christoph Hellwig authored
      Make sure we call inode_change_ok before doing any changes in ->setattr,
      and make sure to call it even if our fs wants to ignore normal UNIX
      permissions, but use the ATTR_FORCE to skip those.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    • Christoph Hellwig's avatar
      rename generic_setattr · 6a1a90ad
      Christoph Hellwig authored
      Despite its name it's now a generic implementation of ->setattr, but
      rather a helper to copy attributes from a struct iattr to the inode.
      Rename it to setattr_copy to reflect this fact.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  19. 28 May, 2010 3 commits
  20. 16 May, 2010 1 commit
  21. 14 Sep, 2009 1 commit
    • Jan Kara's avatar
      fat: Opencode sync_page_range_nolock() · 2f3d675b
      Jan Kara authored
      fat_cont_expand() is the only user of sync_page_range_nolock(). It's also the
      only user of generic_osync_inode() which does not have a file open.  So
      opencode needed actions for FAT so that we can convert generic_osync_inode() to
      a standard syncing path.
      Update a comment about generic_osync_inode().
      CC: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
  22. 10 Jul, 2009 1 commit
  23. 12 Jun, 2009 1 commit
  24. 08 Jun, 2009 1 commit
  25. 03 Jun, 2009 1 commit
  26. 13 Nov, 2008 1 commit
  27. 06 Nov, 2008 4 commits
  28. 02 Aug, 2008 1 commit