1. 03 10月, 2012 1 次提交
  2. 31 7月, 2012 1 次提交
  3. 12 7月, 2012 1 次提交
  4. 01 6月, 2012 2 次提交
    • A
      fat: switch to fsinfo_inode · 78491189
      Artem Bityutskiy 提交于
      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: 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>
      78491189
    • 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
  5. 30 5月, 2012 1 次提交
  6. 06 5月, 2012 1 次提交
  7. 21 3月, 2012 1 次提交
  8. 07 1月, 2012 1 次提交
  9. 04 1月, 2012 1 次提交
    • A
      vfs: fix the stupidity with i_dentry in inode destructors · 6b520e05
      Al Viro 提交于
      Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
      it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
      the cost of taking it into inode_init_always() will be negligible for pipes
      and sockets and negative for everything else.  Not to mention the removal of
      boilerplate code from ->destroy_inode() instances...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6b520e05
  10. 15 12月, 2011 1 次提交
  11. 02 11月, 2011 1 次提交
  12. 17 8月, 2011 2 次提交
  13. 21 7月, 2011 2 次提交
  14. 12 4月, 2011 3 次提交
  15. 14 3月, 2011 1 次提交
  16. 10 3月, 2011 1 次提交
  17. 13 1月, 2011 1 次提交
  18. 07 1月, 2011 2 次提交
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  19. 05 10月, 2010 1 次提交
    • A
      BKL: Remove BKL from fat · 3768744c
      Arnd Bergmann 提交于
      The lock_kernel in fat_put_super is not needed because
      it only protects the super block itself and we know that
      no other thread can reach it because we are about to
      kfree the object.
      
      In the two fill_super functions, this converts the locking
      to use lock_super like elsewhere in the fat code. This
      is probably not needed either, but is consistent and puts
      us on the safe side.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Jan Blunck <jblunck@infradead.org>
      3768744c
  20. 10 8月, 2010 3 次提交
  21. 28 5月, 2010 1 次提交
  22. 25 5月, 2010 1 次提交
  23. 16 3月, 2010 1 次提交
  24. 06 3月, 2010 1 次提交
  25. 10 2月, 2010 1 次提交
  26. 21 11月, 2009 1 次提交
  27. 24 9月, 2009 1 次提交
    • T
      fs: Make unload_nls() NULL pointer safe · 6d729e44
      Thomas Gleixner 提交于
      Most call sites of unload_nls() do:
      	if (nls)
      		unload_nls(nls);
      
      Check the pointer inside unload_nls() like we do in kfree() and
      simplify the call sites.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Steve French <sfrench@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6d729e44
  28. 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
  29. 01 8月, 2009 1 次提交
  30. 20 6月, 2009 1 次提交
  31. 12 6月, 2009 2 次提交