1. 21 9月, 2006 1 次提交
  2. 19 9月, 2006 4 次提交
  3. 17 9月, 2006 4 次提交
  4. 16 9月, 2006 1 次提交
  5. 09 9月, 2006 2 次提交
    • T
      [PATCH] NFS: large non-page-aligned direct I/O clobbers memory · e9f7bee1
      Trond Myklebust 提交于
      The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can
      allow data->npages to be one larger than rpages.  This causes a page
      pointer to be written beyond the end of the pagevec in nfs_read_data (or
      nfs_write_data).
      
      Fix this by making nfs_(read|write)_alloc() calculate the size of the
      pagevec array, and initialise data->npages.
      
      Also get rid of the redundant argument to nfs_commit_alloc().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e9f7bee1
    • 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
  6. 07 9月, 2006 6 次提交
  7. 02 9月, 2006 1 次提交
  8. 30 8月, 2006 1 次提交
  9. 28 8月, 2006 11 次提交
    • A
      [PATCH] /proc/meminfo: don't put spaces in names · f5ef68da
      Andrew Morton 提交于
      None of the other /proc/meminfo lines have a space in the identifier.  This
      post-2.6.17 addition has the potential to break existing parsers, so use an
      underscore instead (like Committed_AS).
      
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f5ef68da
    • D
      [PATCH] fix up lockdep trace in fs/exec.c · 513627d7
      Dave Jones 提交于
      This fixes the locking error noticed by lockdep:
      
        =============================================
        [ INFO: possible recursive locking detected ]
        ---------------------------------------------
        init/1 is trying to acquire lock:
         (&sighand->siglock){....}, at: [<c047a78a>] flush_old_exec+0x3ae/0x859
      
        but task is already holding lock:
         (&sighand->siglock){....}, at: [<c047a77a>] flush_old_exec+0x39e/0x859
      
        other info that might help us debug this:
        2 locks held by init/1:
         #0:  (tasklist_lock){..--}, at: [<c047a76a>] flush_old_exec+0x38e/0x859
         #1:  (&sighand->siglock){....}, at: [<c047a77a>] flush_old_exec+0x39e/0x859
      
        stack backtrace:
         [<c04051e1>] show_trace_log_lvl+0x54/0xfd
         [<c040579d>] show_trace+0xd/0x10
         [<c04058b6>] dump_stack+0x19/0x1b
         [<c043b33a>] __lock_acquire+0x773/0x997
         [<c043bacf>] lock_acquire+0x4b/0x6c
         [<c060630b>] _spin_lock+0x19/0x28
         [<c047a78a>] flush_old_exec+0x3ae/0x859
         [<c0498053>] load_elf_binary+0x4aa/0x1628
         [<c0479cab>] search_binary_handler+0xa7/0x24e
         [<c047b577>] do_execve+0x15b/0x1f9
         [<c04022b4>] sys_execve+0x29/0x4d
         [<c0403faf>] syscall_call+0x7/0xb
      Signed-off-by: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      513627d7
    • I
      [PATCH] lockdep: annotate reiserfs · 4df46240
      Ingo Molnar 提交于
      reiserfs seems to have another locking level layer for the i_mutex due to the
      xattrs-are-a-directory thing.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4df46240
    • B
      [PATCH] Manage jbd allocations from its own slabs · ea817398
      Badari Pulavarty 提交于
      JBD currently allocates commit and frozen buffers from slabs.  With
      CONFIG_SLAB_DEBUG, its possible for an allocation to cross the page
      boundary causing IO problems.
      
      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200127
      
      So, instead of allocating these from regular slabs - manage allocation from
      its own slabs and disable slab debug for these slabs.
      
      [akpm@osdl.org: cleanups]
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ea817398
    • M
      [PATCH] eventpoll.c compile fix · 45f17e0c
      Masoud Asgharifard Sharbiani 提交于
      Fix two compile failures in eventpoll.c code which would happen if
      DEBUG_EPOLL is bigger than zero.
      Signed-off-by: NMasoud Sharbiani <masouds@google.com>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      45f17e0c
    • E
      [PATCH] ufs: truncate correction · ecdc6394
      Evgeniy Dushistov 提交于
      1) When we allocated last fragment in ufs_truncate, we read page, check
         if block mapped to address, and if not trying to allocate it.  This is
         wrong behaviour, fragment may be NOT allocated, but mapped, this
         happened because of "block map" function not checked allocated fragment
         or not, it just take address of the first fragment in the block, add
         offset of fragment and return result, this is correct behaviour in
         almost all situation except call from ufs_truncate.
      
      2) Almost all implementation of UFS, which I can investigate have such
         "defect": if you have full disk, and try truncate file, for example 3GB
         to 2MB, and have hole in this region, truncate return -ENOSPC.  I tried
         evade from this problem, but "block allocation" algorithm is tied to
         right value of i_lastfrag, and fix of this corner case may slow down of
         ordinaries scenarios, so this patch makes behavior of "truncate"
         operations similar to what other UFS implementations do.
      Signed-off-by: NEvgeniy Dushistov <dushistov@mail.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ecdc6394
    • E
      [PATCH] ufs: write to hole in big file · c37336b0
      Evgeniy Dushistov 提交于
      On UFS, this scenario:
      	open(O_TRUNC)
      	lseek(1024 * 1024 * 80)
      	write("A")
      	lseek(1024 * 2)
      	write("A")
      
      may cause access to invalid address.
      
      This happened because of "goal" is calculated in wrong way in block
      allocation path, as I see this problem exists also in 2.4.
      
      We use construction like this i_data[lastfrag], i_data array of pointers to
      direct blocks, indirect and so on, it has ceratain size ~20 elements, and
      lastfrag may have value for example 40000.
      
      Also this patch fixes related to handling such scenario issues, wrong
      zeroing metadata, in case of block(not fragment) allocation, and wrong goal
      calculation, when we allocate block
      Signed-off-by: NEvgeniy Dushistov <dushistov@mail.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c37336b0
    • M
      [PATCH] ext3 filesystem bogus ENOSPC with reservation fix · 08fb306f
      Mingming Cao 提交于
      To handle the earlier bogus ENOSPC error caused by filesystem full of block
      reservation, current code falls back to non block reservation, starts to
      allocate block(s) from the goal allocation block group as if there is no
      block reservation.
      
      Current code needs to re-load the corresponding block group descriptor for
      the initial goal block group in this case.  The patch fixes this.
      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>
      08fb306f
    • A
      [PATCH] ext2: prevent div-by-zero on corrupted fs · 607eb266
      Andries Brouwer 提交于
      Mounting an ext2 filesystem with zero s_inodes_per_group will cause a
      divide error.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      607eb266
    • A
      [PATCH] Fix for minix crash · f5fb09fa
      Andries Brouwer 提交于
      Mounting a (corrupt) minix filesystem with zero s_zmap_blocks
      gives a spectacular crash on my 2.6.17.8 system, no doubt
      because minix/inode.c does an unconditional
      	minix_set_bit(0,sbi->s_zmap[0]->b_data);
      
      [akpm@osdl.org: make labels conistent while we're there]
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f5fb09fa
    • P
      [PATCH] lockdep: fix blkdev_open() warning · 6946bd63
      Peter Zijlstra 提交于
      On Wed, 2006-08-09 at 07:57 +0200, Rolf Eike Beer wrote:
      > =============================================
      > [ INFO: possible recursive locking detected ]
      > ---------------------------------------------
      > parted/7929 is trying to acquire lock:
      >  (&bdev->bd_mutex){--..}, at: [<c105eb8d>] __blkdev_put+0x1e/0x13c
      >
      > but task is already holding lock:
      >  (&bdev->bd_mutex){--..}, at: [<c105eec6>] do_open+0x72/0x3a8
      >
      > other info that might help us debug this:
      > 1 lock held by parted/7929:
      >  #0:  (&bdev->bd_mutex){--..}, at: [<c105eec6>] do_open+0x72/0x3a8
      > stack backtrace:
      >  [<c1003aad>] show_trace_log_lvl+0x58/0x15b
      >  [<c100495f>] show_trace+0xd/0x10
      >  [<c1004979>] dump_stack+0x17/0x1a
      >  [<c102dee5>] __lock_acquire+0x753/0x99c
      >  [<c102e3b0>] lock_acquire+0x4a/0x6a
      >  [<c1204501>] mutex_lock_nested+0xc8/0x20c
      >  [<c105eb8d>] __blkdev_put+0x1e/0x13c
      >  [<c105ecc4>] blkdev_put+0xa/0xc
      >  [<c105f18a>] do_open+0x336/0x3a8
      >  [<c105f21b>] blkdev_open+0x1f/0x4c
      >  [<c1057b40>] __dentry_open+0xc7/0x1aa
      >  [<c1057c91>] nameidata_to_filp+0x1c/0x2e
      >  [<c1057cd1>] do_filp_open+0x2e/0x35
      >  [<c1057dd7>] do_sys_open+0x38/0x68
      >  [<c1057e33>] sys_open+0x16/0x18
      >  [<c1002845>] sysenter_past_esp+0x56/0x8d
      
      OK, I'm having a look here; its all new to me so bear with me.
      
      blkdev_open() calls
        do_open(bdev, ...,BD_MUTEX_NORMAL) and takes
          mutex_lock_nested(&bdev->bd_mutex, BD_MUTEX_NORMAL)
      
      then something fails, and we're thrown to:
      
      out_first: where
          if (bdev != bdev->bd_contains)
            blkdev_put(bdev->bd_contains) which is
              __blkdev_put(bdev->bd_contains, BD_MUTEX_NORMAL) which does
                mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_NORMAL) <--- lockdep trigger
      
      When going to out_first, dbev->bd_contains is either bdev or whole, and
      since we take the branch it must be whole. So it seems to me the
      following patch would be the right one:
      
      [akpm@osdl.org: compile fix]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6946bd63
  10. 27 8月, 2006 1 次提交
  11. 25 8月, 2006 8 次提交