1. 07 7月, 2015 6 次提交
    • A
      ufs: the offsets ufs_block_to_path() puts into array are not sector_t · 4e3911f3
      Al Viro 提交于
      type makes no sense - those are indices in block number arrays, not
      block numbers.  And no, UFS is not likely to grow indirect blocks with
      4Gpointers in them...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4e3911f3
    • A
      ufs: move truncate code into inode.c · 010d331f
      Al Viro 提交于
      It is closely tied to block pointers handling there, can benefit
      from existing helpers, etc. - no point keeping them apart.
      
      Trimmed the trailing whitespaces in inode.c at the same time.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      010d331f
    • A
      ufs: don't use lock_ufs() for block pointers tree protection · 724bb09f
      Al Viro 提交于
      * stores to block pointers are under per-inode seqlock (meta_lock) and
      mutex (truncate_mutex)
      * fetches of block pointers are either under truncate_mutex, or wrapped
      into seqretry loop on meta_lock
      * all changes of ->i_size are under truncate_mutex and i_mutex
      * all changes of ->i_lastfrag are under truncate_mutex
      
      It's similar to what ext2 is doing; the main difference is that unlike
      ext2 we can't rely upon the atomicity of stores into block pointers -
      on UFS2 they are 64bit.  So we can't cut the corner when switching
      a pointer from NULL to non-NULL as we could in ext2_splice_branch()
      and need to use meta_lock on all modifications.
      
      We use seqlock where ext2 uses rwlock; ext2 could probably also benefit
      from such change...
      
      Another non-trivial difference is that with UFS we *cannot* have reader
      grab truncate_mutex in case of race - it has to keep retrying.  That
      might be possible to change, but not until we lift tail unpacking
      several levels up in call chain.
      
      After that commit we do *NOT* hold fs-wide serialization on accesses
      to block pointers anymore.  Moreover, lock_ufs() can become a normal
      mutex now - it's only used on statfs, remount and sync_fs and none
      of those uses are recursive.  As the matter of fact, *now* it can be
      collapsed with ->s_lock, and be eventually replaced with saner
      per-cylinder-group spinlocks, but that's a separate story.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      724bb09f
    • A
      ufs: free excessive blocks upon ->write_begin() failure/short copy · 3b7a3a05
      Al Viro 提交于
      Broken in "[PATCH] ufs: truncate should allocate block for last byte";
      all way back in 2006.  ufs_setattr() hadn't been the only user of
      vmtruncate() and eliminating ->truncate() method required corrections
      in a bunch of places.  Eventually those places had migrated into
      ->write_begin() failure exit and ->write_end() after short copy...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3b7a3a05
    • A
    • A
      ufs: kill more lock_ufs() calls · f3e0f3da
      Al Viro 提交于
      a) move it inside ufs_truncate()
      b) ufs_free_inode() doesn't need it - it's serialized on ->s_lock
      c) ufs_write_inode() doesn't need it either (and can be called without
      it anyway).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f3e0f3da
  2. 14 6月, 2015 1 次提交
  3. 11 5月, 2015 1 次提交
  4. 08 9月, 2014 1 次提交
  5. 09 8月, 2014 1 次提交
  6. 04 4月, 2014 1 次提交
    • J
      mm + fs: store shadow entries in page cache · 91b0abe3
      Johannes Weiner 提交于
      Reclaim will be leaving shadow entries in the page cache radix tree upon
      evicting the real page.  As those pages are found from the LRU, an
      iput() can lead to the inode being freed concurrently.  At this point,
      reclaim must no longer install shadow pages because the inode freeing
      code needs to ensure the page tree is really empty.
      
      Add an address_space flag, AS_EXITING, that the inode freeing code sets
      under the tree lock before doing the final truncate.  Reclaim will check
      for this flag before installing shadow pages.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NRik van Riel <riel@redhat.com>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Bob Liu <bob.liu@oracle.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Luigi Semenzato <semenzato@google.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Metin Doslu <metin@citusdata.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Ozgun Erdogan <ozgun@citusdata.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Roman Gushchin <klamm@yandex-team.ru>
      Cc: Ryan Mallon <rmallon@gmail.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      91b0abe3
  7. 13 9月, 2013 1 次提交
  8. 21 12月, 2012 1 次提交
  9. 21 9月, 2012 1 次提交
  10. 06 5月, 2012 1 次提交
  11. 29 3月, 2012 1 次提交
  12. 04 1月, 2012 1 次提交
  13. 02 11月, 2011 1 次提交
  14. 09 4月, 2011 1 次提交
  15. 31 3月, 2011 1 次提交
  16. 10 3月, 2011 1 次提交
  17. 03 3月, 2011 1 次提交
    • A
      ufs: remove the BKL · 788257d6
      Arnd Bergmann 提交于
      This introduces a new per-superblock mutex in UFS to replace
      the big kernel lock. I have been careful to avoid nested
      calls to lock_ufs and to get the lock order right with
      respect to other mutexes, in particular lock_super.
      
      I did not make any attempt to prove that the big kernel
      lock is not needed in a particular place in the code,
      which is very possible.
      
      The mutex has a significant performance impact, so it is only
      used on SMP or PREEMPT configurations.
      
      As Nick Piggin noticed, any allocation inside of the lock
      may end up deadlocking when we get to ufs_getfrag_block
      in the reclaim task, so we now use GFP_NOFS.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Tested-by: NNick Bowler <nbowler@elliptictech.com>
      Cc: Evgeniy Dushistov <dushistov@mail.ru>
      Cc: Nick Piggin <npiggin@gmail.com>
      788257d6
  18. 10 8月, 2010 4 次提交
    • A
      switch ufs to ->evict_inode() · 58e8268c
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      58e8268c
    • C
      get rid of block_write_begin_newtrunc · 155130a4
      Christoph Hellwig 提交于
      Move the call to vmtruncate to get rid of accessive blocks to the callers
      in preparation of the new truncate sequence and rename the non-truncating
      version to block_write_begin.
      
      While we're at it also remove several unused arguments to block_write_begin.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      155130a4
    • C
      introduce __block_write_begin · 6e1db88d
      Christoph Hellwig 提交于
      Split up the block_write_begin implementation - __block_write_begin is a new
      trivial wrapper for block_prepare_write that always takes an already
      allocated page and can be either called from block_write_begin or filesystem
      code that already has a page allocated.  Remove the handling of already
      allocated pages from block_write_begin after switching all callers that
      do it to __block_write_begin.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6e1db88d
    • C
      clean up write_begin usage for directories in pagecache · f4e420dc
      Christoph Hellwig 提交于
      For filesystem that implement directories in pagecache we call
      block_write_begin with an already allocated page for this code, while the
      normal regular file write path uses the default block_write_begin behaviour.
      
      Get rid of the __foofs_write_begin helper and opencode the normal write_begin
      call in foofs_write_begin, while adding a new foofs_prepare_chunk helper for
      the directory code.  The added benefit is that foofs_prepare_chunk has
      a much saner calling convention.
      
      Note that the interruptible flag passed into block_write_begin is always
      ignored if we already pass in a page (see next patch for details), and
      we never were doing truncations of exessive blocks for this case either so we
      can switch directly to block_write_begin_newtrunc.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f4e420dc
  19. 24 5月, 2010 1 次提交
    • J
      ufs: Remove dead quota code · 8f45c33d
      Jan Kara 提交于
      UFS quota is non-functional at least since 2.6.12 because dq_op was set
      to NULL. Since the filesystem exists mainly to allow cooperation with Solaris
      and quota format isn't standard, just remove the dead code.
      
      CC: Evgeniy Dushistov <dushistov@mail.ru>
      Signed-off-by: NJan Kara <jack@suse.cz>
      8f45c33d
  20. 22 5月, 2010 1 次提交
  21. 06 3月, 2010 1 次提交
  22. 05 3月, 2010 2 次提交
    • C
      dquot: cleanup dquot initialize routine · 871a2931
      Christoph Hellwig 提交于
      Get rid of the initialize dquot operation - it is now always called from
      the filesystem and if a filesystem really needs it's own (which none
      currently does) it can just call into it's own routine directly.
      
      Rename the now static low-level dquot_initialize helper to __dquot_initialize
      and vfs_dq_init to dquot_initialize to have a consistent namespace.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      871a2931
    • C
      dquot: move dquot initialization responsibility into the filesystem · 907f4554
      Christoph Hellwig 提交于
      Currently various places in the VFS call vfs_dq_init directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the initialization.   For most metadata operations
      this is a straight forward move into the methods, but for truncate and
      open it's a bit more complicated.
      
      For truncate we currently only call vfs_dq_init for the sys_truncate case
      because open already takes care of it for ftruncate and open(O_TRUNC) - the
      new code causes an additional vfs_dq_init for those which is harmless.
      
      For open the initialization is moved from do_filp_open into the open method,
      which means it happens slightly earlier now, and only for regular files.
      The latter is fine because we don't need to initialize it for operations
      on special files, and we already do it as part of the namespace operations
      for directories.
      
      Add a dquot_file_open helper that filesystems that support generic quotas
      can use to fill in ->open.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      907f4554
  23. 19 6月, 2009 1 次提交
  24. 28 3月, 2009 2 次提交
  25. 28 4月, 2008 1 次提交
  26. 09 2月, 2008 1 次提交
  27. 08 2月, 2008 1 次提交
  28. 17 10月, 2007 2 次提交
  29. 18 4月, 2007 1 次提交