1. 08 12月, 2006 2 次提交
  2. 12 10月, 2006 1 次提交
    • D
      [PATCH] ext3: errors behaviour fix · 2245d7c2
      Dmitry Mishin 提交于
      Current error behaviour for ext2 and ext3 filesystems does not fully
      correspond to the documentation and should be fixed.
      
      According to man 8 mount, ext2 and ext3 file systems allow to set one of 3
      different on-errors behaviours:
      
        ---- start of quote man 8 mount ----
      
        errors=continue / errors=remount-ro / errors=panic
      
          Define the behaviour when an error is encountered.  (Either ignore
          errors and just mark the file system erroneous and continue, or remount
          the file system read-only, or panic and halt the system.) The default is
          set in the filesystem superblock, and can be changed using tune2fs(8).
      
        ---- end of quote ----
      
      However EXT3_ERRORS_CONTINUE is not read from the superblock, and thus
      ERRORS_CONT is not saved on the sbi->s_mount_opt.  It leads to the incorrect
      handle of errors on ext3.
      
      Then we've checked corresponding code in ext2 and discovered that it is buggy
      as well:
      
      - EXT2_ERRORS_CONTINUE is not read from the superblock (the same);
      
      - parse_option() does not clean the alternative values and thus something
        like (ERRORS_CONT|ERRORS_RO) can be set;
      
      - if options are omitted, parse_option() does not set any of these options.
      
      Therefore it is possible to set any combination of these options on the ext2:
      
      - none of them may be set: EXT2_ERRORS_CONTINUE on superblock / empty mount
        options;
      
      - any of them may be set using mount options;
      
      - 2 any options may be set: by using EXT2_ERRORS_RO/EXT2_ERRORS_PANIC on the
        superblock and other value in mount options;
      
      - and finally all three options may be set by adding third option in remount.
      
      Currently ext2 uses these values only in ext2_error() and it is not leading to
      any noticeable troubles.  However somebody may be discouraged when he will try
      to workaround EXT2_ERRORS_PANIC on the superblock by using errors=continue in
      mount options.
      
      This patch:
      
      EXT3_ERRORS_CONTINUE should be taken from the superblock as default value for
      error behaviour.
      Signed-off-by: NDmitry Mishin <dim@openvz.org>
      Acked-by: NVasily Averin <vvs@sw.ru>
      Acked-by: NKirill Korotaev <dev@openvz.org>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2245d7c2
  3. 01 10月, 2006 7 次提交
  4. 27 9月, 2006 13 次提交
  5. 17 9月, 2006 2 次提交
  6. 09 9月, 2006 1 次提交
    • B
      [PATCH] ext3_getblk() should handle HOLE correctly · 3665d0e5
      Badari Pulavarty 提交于
      It has been reported that ext3_getblk() is not doing the right thing and
      triggering following WARN():
      
      BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
       <c01c5140> ext3_getblk+0x98/0x2a6  <c03b2806> md_wakeup_thread+0x26/0x2a
       <c01c536d> ext3_bread+0x1f/0x88  <c01cedf9> ext3_quota_read+0x136/0x1ae
       <c018b683> v1_read_dqblk+0x61/0xac  <c0188f32> dquot_acquire+0xf6/0x107
       <c01ceaba> ext3_acquire_dquot+0x46/0x68  <c01897d4> dqget+0x155/0x1e7
       <c018a97b> dquot_transfer+0x3e0/0x3e9  <c016fe52> dput+0x23/0x13e
       <c01c7986> ext3_setattr+0xc3/0x240  <c0120f66> current_fs_time+0x52/0x6a
       <c017320e> notify_change+0x2bd/0x30d  <c0159246> chown_common+0x9c/0xc5
       <c02a222c> strncpy_from_user+0x3b/0x68  <c0167fe6> do_path_lookup+0xdf/0x266
       <c016841b> __user_walk_fd+0x44/0x5a  <c01592b9> sys_chown+0x4a/0x55
       <c015a43c> vfs_write+0xe7/0x13c  <c01695d4> sys_mkdir+0x1f/0x23
       <c0102a97> syscall_call+0x7/0xb
      
      Looking at the code, it looks like it's not handle HOLE correctly.  It ends
      up returning -EIO.  Here is the patch to fix it.
      
      If we really want to be paranoid, we can allow return values 0 (HOLE), 1
      (we asked for one block) and return -EIO for more than 1 block.  But I
      really don't see a reason for doing it - all we need is the block# here.
      (doesn't matter how many blocks are mapped).
      
      ext3_get_blocks_handle() returns number of blocks it mapped.  It returns 0
      in case of HOLE.  ext3_getblk() should handle HOLE properly (currently its
      dumping warning stack and returning -EIO).
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3665d0e5
  7. 28 8月, 2006 1 次提交
  8. 01 8月, 2006 2 次提交
  9. 11 7月, 2006 1 次提交
  10. 04 7月, 2006 1 次提交
    • A
      [PATCH] lockdep: annotate the quota code · 5c81a419
      Arjan van de Ven 提交于
      The quota code plays interesting games with the lock ordering; to quote Jan:
      
      | i_mutex of inode containing quota file is acquired after all other
      | quota locks. i_mutex of all other inodes is acquired before quota
      | locks. Quota code makes sure (by resetting inode operations and
      | setting special flag on inode) that noone tries to enter quota code
      | while holding i_mutex on a quota file...
      
      The good news is that all of this special case i_mutex grabbing happens in the
      (per filesystem) low level quota write function.  For this special case we
      need a new I_MUTEX_* nesting level, since this just entirely outside any of
      the regular VFS locking rules for i_mutex.  I trust Jan on his blue eyes that
      this is not ever going to deadlock; and based on that the patch below is what
      it takes to inform lockdep of these very interesting new locking rules.
      
      The new locking rule for the I_MUTEX_QUOTA nesting level is that this is the
      deepest possible level of nesting for i_mutex, and that this only should be
      used in quota write (and possibly read) function of filesystems.  This makes
      the lock ordering of the I_MUTEX_* levels:
      
      I_MUTEX_PARENT -> I_MUTEX_CHILD -> I_MUTEX_NORMAL -> I_MUTEX_QUOTA
      
      Has no effect on non-lockdep kernels.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c81a419
  11. 01 7月, 2006 1 次提交
  12. 29 6月, 2006 1 次提交
  13. 27 6月, 2006 1 次提交
  14. 26 6月, 2006 5 次提交
  15. 23 6月, 2006 1 次提交
    • M
      [PATCH] percpu counter data type changes to suppport more than 2**31 ext3 free blocks counter · 0216bfcf
      Mingming Cao 提交于
      The percpu counter data type are changed in this set of patches to support
      more users like ext3 who need more than 32 bit to store the free blocks
      total in the filesystem.
      
      - Generic perpcu counters data type changes.  The size of the global counter
        and local counter were explictly specified using s64 and s32.  The global
        counter is changed from long to s64, while the local counter is changed from
        long to s32, so we could avoid doing 64 bit update in most cases.
      
      - Users of the percpu counters are updated to make use of the new
        percpu_counter_init() routine now taking an additional parameter to allow
        users to pass the initial value of the global counter.
      Signed-off-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0216bfcf