1. 04 7月, 2013 1 次提交
  2. 31 7月, 2012 1 次提交
    • J
      nilfs2: Convert to new freezing mechanism · 2c22b337
      Jan Kara 提交于
      We change nilfs_page_mkwrite() to provide proper freeze protection for
      writeable page faults (we must wait for frozen filesystem even if the
      page is fully mapped).
      
      We remove all vfs_check_frozen() checks since they are now handled by
      the generic code.
      
      CC: linux-nilfs@vger.kernel.org
      CC: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2c22b337
  3. 21 6月, 2012 1 次提交
    • R
      nilfs2: ensure proper cache clearing for gc-inodes · fbb24a3a
      Ryusuke Konishi 提交于
      A gc-inode is a pseudo inode used to buffer the blocks to be moved by
      garbage collection.
      
      Block caches of gc-inodes must be cleared every time a garbage collection
      function (nilfs_clean_segments) completes.  Otherwise, stale blocks
      buffered in the caches may be wrongly reused in successive calls of the GC
      function.
      
      For user files, this is not a problem because their gc-inodes are
      distinguished by a checkpoint number as well as an inode number.  They
      never buffer different blocks if either an inode number, a checkpoint
      number, or a block offset differs.
      
      However, gc-inodes of sufile, cpfile and DAT file can store different data
      for the same block offset.  Thus, the nilfs_clean_segments function can
      move incorrect block for these meta-data files if an old block is cached.
      I found this is really causing meta-data corruption in nilfs.
      
      This fixes the issue by ensuring cache clear of gc-inodes and resolves
      reported GC problems including checkpoint file corruption, b-tree
      corruption, and the following warning during GC.
      
        nilfs_palloc_freev: entry number 307234 already freed.
        ...
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Tested-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: <stable@vger.kernel.org>	[2.6.37+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fbb24a3a
  4. 22 11月, 2011 1 次提交
    • T
      freezer: unexport refrigerator() and update try_to_freeze() slightly · a0acae0e
      Tejun Heo 提交于
      There is no reason to export two functions for entering the
      refrigerator.  Calling refrigerator() instead of try_to_freeze()
      doesn't save anything noticeable or removes any race condition.
      
      * Rename refrigerator() to __refrigerator() and make it return bool
        indicating whether it scheduled out for freezing.
      
      * Update try_to_freeze() to return bool and relay the return value of
        __refrigerator() if freezing().
      
      * Convert all refrigerator() users to try_to_freeze().
      
      * Update documentation accordingly.
      
      * While at it, add might_sleep() to try_to_freeze().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Christoph Hellwig <hch@infradead.org>
      a0acae0e
  5. 11 6月, 2011 1 次提交
  6. 10 5月, 2011 7 次提交
  7. 09 3月, 2011 7 次提交
  8. 02 3月, 2011 1 次提交
  9. 10 1月, 2011 3 次提交
  10. 27 10月, 2010 1 次提交
    • M
      mm: add account_page_writeback() · f629d1c9
      Michael Rubin 提交于
      To help developers and applications gain visibility into writeback
      behaviour this patch adds two counters to /proc/vmstat.
      
        # grep nr_dirtied /proc/vmstat
        nr_dirtied 3747
        # grep nr_written /proc/vmstat
        nr_written 3618
      
      These entries allow user apps to understand writeback behaviour over time
      and learn how it is impacting their performance.  Currently there is no
      way to inspect dirty and writeback speed over time.  It's not possible for
      nr_dirty/nr_writeback.
      
      These entries are necessary to give visibility into writeback behaviour.
      We have /proc/diskstats which lets us understand the io in the block
      layer.  We have blktrace for more in depth understanding.  We have
      e2fsprogs and debugsfs to give insight into the file systems behaviour,
      but we don't offer our users the ability understand what writeback is
      doing.  There is no way to know how active it is over the whole system, if
      it's falling behind or to quantify it's efforts.  With these values
      exported users can easily see how much data applications are sending
      through writeback and also at what rates writeback is processing this
      data.  Comparing the rates of change between the two allow developers to
      see when writeback is not able to keep up with incoming traffic and the
      rate of dirty memory being sent to the IO back end.  This allows folks to
      understand their io workloads and track kernel issues.  Non kernel
      engineers at Google often use these counters to solve puzzling performance
      problems.
      
      Patch #4 adds a pernode vmstat file with nr_dirtied and nr_written
      
      Patch #5 add writeback thresholds to /proc/vmstat
      
      Currently these values are in debugfs. But they should be promoted to
      /proc since they are useful for developers who are writing databases
      and file servers and are not debugging the kernel.
      
      The output is as below:
      
       # grep threshold /proc/vmstat
       nr_pages_dirty_threshold 409111
       nr_pages_dirty_background_threshold 818223
      
      This patch:
      
      This allows code outside of the mm core to safely manipulate page
      writeback state and not worry about the other accounting.  Not using these
      routines means that some code will lose track of the accounting and we get
      bugs.
      
      Modify nilfs2 to use interface.
      Signed-off-by: NMichael Rubin <mrubin@google.com>
      Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Reviewed-by: NWu Fengguang <fengguang.wu@intel.com>
      Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Jiro SEKIBA <jir@unicus.jp>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f629d1c9
  11. 23 10月, 2010 9 次提交
  12. 23 7月, 2010 4 次提交
    • R
      nilfs2: do not update log cursor for small change · 32502047
      Ryusuke Konishi 提交于
      Super blocks of nilfs are periodically overwritten in order to record
      the recent log position.  This shortens recovery time after unclean
      unmount, but the current implementation performs the update even for a
      few blocks of change.  If the filesystem gets small changes slowly and
      continually, super blocks may be updated excessively.
      
      This moderates the issue by skipping update of log cursor if it does
      not cross a segment boundary.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      32502047
    • J
      nilfs2: sync super blocks in turns · b2ac86e1
      Jiro SEKIBA 提交于
      This will sync super blocks in turns instead of syncing duplicate
      super blocks at the time.  This will help searching valid super root
      when super block is written into disk before log is written, which is
      happen when barrier-less block devices are unmounted uncleanly.  In
      the situation, old super block likely points to valid log.
      
      This patch introduces ns_sbwcount member to the nilfs object and adds
      nilfs_sb_will_flip() function; ns_sbwcount counts how many times super
      blocks write back to the disk.  And, nilfs_sb_will_flip() decides
      whether flipping required or not based on the count of ns_sbwcount to
      sync super blocks asymmetrically.
      
      The following functions are also changed:
      
       - nilfs_prepare_super(): flips super blocks according to the
         argument.  The argument is calculated by nilfs_sb_will_flip()
         function.
      
       - nilfs_cleanup_super(): sets "clean" flag to both super blocks if
         they point to the same checkpoint.
      
      To update both of super block information, caller of
      nilfs_commit_super must set the information on both super blocks.
      Signed-off-by: NJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      b2ac86e1
    • J
      nilfs2: introduce nilfs_prepare_super · d26493b6
      Jiro SEKIBA 提交于
      This function checks validity of super block pointers.
      If first super block is invalid, it will swap the super blocks.
      The function should be called before any super block information updates.
      Caller must obtain nilfs->ns_sem.
      Signed-off-by: NJiro SEKIBA <jir@unicus.jp>
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      d26493b6
    • R
      nilfs2: get rid of macros for segment summary information · 4762077c
      Ryusuke Konishi 提交于
      This removes macros to test segment summary flags and redefines a few
      relevant macros with inline functions.
      Signed-off-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      4762077c
  13. 10 5月, 2010 3 次提交