1. 24 5月, 2010 5 次提交
  2. 22 5月, 2010 7 次提交
    • J
      BKL: Remove BKL from ext2 filesystem · e0a5cbac
      Jan Blunck 提交于
      The BKL is still used in ext2_put_super(), ext2_fill_super(), ext2_sync_fs()
      ext2_remount() and ext2_write_inode(). From these calls ext2_put_super(),
      ext2_fill_super() and ext2_remount() are protected against each other by
      the struct super_block s_umount rw semaphore. The call in ext2_write_inode()
      could only protect the modification of the ext2_sb_info through
      ext2_update_dynamic_rev() against concurrent ext2_sync_fs() or ext2_remount().
      ext2_fill_super() and ext2_put_super() can be left out because you need a
      valid filesystem reference in all three cases, which you do not have when
      you are one of these functions.
      
      If the BKL is only protecting the modification of the ext2_sb_info it can
      safely be removed since this is protected by the struct ext2_sb_info s_lock.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e0a5cbac
    • J
      ext2: Add ext2_sb_info s_lock spinlock · c15271f4
      Jan Blunck 提交于
      Add a spinlock that protects against concurrent modifications of
      s_mount_state, s_blocks_last, s_overhead_last and the content of the
      superblock's buffer pointed to by sbi->s_es. The spinlock is now used in
      ext2_xattr_update_super_block() which was setting the
      EXT2_FEATURE_COMPAT_EXT_ATTR flag on the superblock without protection
      before. Likewise the spinlock is used in ext2_show_options() to have a
      consistent view of the mount options.
      
      This is a preparation patch for removing the BKL from ext2 in the next
      patch.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c15271f4
    • J
      ext2: Move ext2_write_super() out of ext2_setup_super() · 4c96a68b
      Jan Blunck 提交于
      Move ext2_write_super() out of ext2_setup_super() as a preparation for the
      next patch that adds a new lock for superblock fields.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4c96a68b
    • J
      ext2: Fold ext2_commit_super() into ext2_sync_super() · ee6921eb
      Jan Blunck 提交于
      Both function originally did similar things except that ext2_sync_super()
      is returning after the call to sync_dirty_buffer(sbh). Therefore this
      patch adds a wait flag to tell ext2_sync_super() if it has to call
      sync_dirty_buffer() to wait for in-progress I/O to finish.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ee6921eb
    • J
      ext2: Remove duplicate code from ext2_sync_fs() · 20da9baf
      Jan Blunck 提交于
      Depending in the state (valid or unchecked) of the filesystem either
      ext2_sync_super() or ext2_commit_super() is called. If the filesystem is
      currently valid (it is checked), we first mark it unchecked and afterwards
      duplicate the work that ext2_sync_super() is doing later. Therefore this
      patch removes the duplicate code and calls ext2_sync_super() directly after
      marking the filesystem unchecked.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      20da9baf
    • J
      ext2: Set the write time in ext2_sync_fs() · 269c8db3
      Jan Blunck 提交于
      This is probably a typo since the write time should actually be updated by
      ext2_sync_fs() instead of the mount time.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      269c8db3
    • J
      ext2: Use ext2_clear_super_error() in ext2_sync_fs() · 2b8120ef
      Jan Blunck 提交于
      ext2_sync_fs() used to duplicate the code from ext2_clear_super_error().
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2b8120ef
  3. 05 3月, 2010 2 次提交
  4. 16 12月, 2009 1 次提交
  5. 10 12月, 2009 2 次提交
    • S
      ext2: clear uptodate flag on super block I/O error · 2074abfe
      Stephen Hemminger 提交于
      This fixes a WARN backtrace in mark_buffer_dirty() that occurs during
      unmount when a USB or floppy device is removed. I reported this a kernel
      regression, but looks like it might have been there for longer
      than that.
      
      The super block update from a previous operation has marked the buffer
      as in error, and the flag has to be cleared before doing the update.
      (Similar code already exists in ext4).
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2074abfe
    • A
      ext2: Unify log messages in ext2 · 2314b07c
      Alexey Fisher 提交于
      make messages produced by ext2 more unified. It should be
      easy to parse.
      
      dmesg before patch:
      [ 4893.684892] reservations ON
      [ 4893.684896] xip option not supported
      [ 4893.684961] EXT2-fs warning: mounting ext3 filesystem as ext2
      [ 4893.684964] EXT2-fs warning: maximal mount count reached, running
      e2fsck is recommended
      [ 4893.684990] EXT II FS: 0.5b, 95/08/09, bs=1024, fs=1024, gc=2,
      bpg=8192, ipg=1280, mo=80010]
      
      dmesg after patch:
      [ 4893.684892] EXT2-fs (loop0): reservations ON
      [ 4893.684896] EXT2-fs (loop0): xip option not supported
      [ 4893.684961] EXT2-fs (loop0): warning: mounting ext3 filesystem as
      ext2
      [ 4893.684964] EXT2-fs (loop0): warning: maximal mount count reached,
      running e2fsck is recommended
      [ 4893.684990] EXT2-fs (loop0): 0.5b, 95/08/09, bs=1024, fs=1024, gc=2,
      bpg=8192, ipg=1280, mo=80010]
      Signed-off-by: NAlexey Fisher <bug-track@fisher-privat.net>
      Reviewed-by: NAndreas Dilger <adilger@sun.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2314b07c
  6. 24 6月, 2009 1 次提交
  7. 12 6月, 2009 4 次提交
  8. 18 5月, 2009 1 次提交
  9. 27 4月, 2009 1 次提交
  10. 26 3月, 2009 1 次提交
  11. 12 2月, 2009 1 次提交
    • C
      ext2/xip: refuse to change xip flag during remount with busy inodes · 0e4a9b59
      Carsten Otte 提交于
      For a reason that I was unable to understand in three months of debugging,
      mount ext2 -o remount stopped working properly when remounting from
      regular operation to xip, or the other way around.  According to a git
      bisect search, the problem was introduced with the VM_MIXEDMAP/PTE_SPECIAL
      rework in the vm:
      
      commit 70688e4d
      Author: Nick Piggin <npiggin@suse.de>
      Date:   Mon Apr 28 02:13:02 2008 -0700
      
          xip: support non-struct page backed memory
      
      In the failing scenario, the filesystem is mounted read only via root=
      kernel parameter on s390x.  During remount (in rc.sysinit), the inodes of
      the bash binary and its libraries are busy and cannot be invalidated (the
      bash which is running rc.sysinit resides on subject filesystem).
      Afterwards, another bash process (running ifup-eth) recurses into a
      subshell, runs dup_mm (via fork).  Some of the mappings in this bash
      process were created from inodes that could not be invalidated during
      remount.
      
      Both parent and child process crash some time later due to inconsistencies
      in their address spaces.  The issue seems to be timing sensitive, various
      attempts to recreate it have failed.
      
      This patch refuses to change the xip flag during remount in case some
      inodes cannot be invalidated.  This patch keeps users from running into
      that issue.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Jared Hulbert <jaredeh@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0e4a9b59
  12. 09 1月, 2009 1 次提交
  13. 14 10月, 2008 1 次提交
  14. 27 7月, 2008 1 次提交
  15. 26 7月, 2008 1 次提交
  16. 28 4月, 2008 4 次提交
  17. 09 2月, 2008 1 次提交
  18. 08 2月, 2008 1 次提交
  19. 07 2月, 2008 3 次提交
  20. 29 1月, 2008 1 次提交