1. 10 7月, 2007 1 次提交
  2. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  3. 17 5月, 2007 1 次提交
    • C
      Remove SLAB_CTOR_CONSTRUCTOR · a35afb83
      Christoph Lameter 提交于
      SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a35afb83
  4. 09 5月, 2007 2 次提交
  5. 08 5月, 2007 1 次提交
    • C
      slab allocators: Remove SLAB_DEBUG_INITIAL flag · 50953fe9
      Christoph Lameter 提交于
      I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
      SLAB.
      
      I think its purpose was to have a callback after an object has been freed
      to verify that the state is the constructor state again?  The callback is
      performed before each freeing of an object.
      
      I would think that it is much easier to check the object state manually
      before the free.  That also places the check near the code object
      manipulation of the object.
      
      Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
      compiled with SLAB debugging on.  If there would be code in a constructor
      handling SLAB_DEBUG_INITIAL then it would have to be conditional on
      SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
      in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
      use of, difficult to understand and there are easier ways to accomplish the
      same effect (i.e.  add debug code before kfree).
      
      There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
      clear in fs inode caches.  Remove the pointless checks (they would even be
      pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.
      
      This is the last slab flag that SLUB did not support.  Remove the check for
      unimplemented flags from SLUB.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50953fe9
  6. 07 5月, 2007 2 次提交
  7. 03 5月, 2007 1 次提交
  8. 01 5月, 2007 19 次提交
    • S
      [GFS2] Uncomment sprintf_symbol calling code · 37fde8ca
      Steven Whitehouse 提交于
      Now that the patch from -mm has gone upstream, we can uncomment the code
      in GFS2 which uses sprintf_symbol.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Robert Peterson <rpeterso@redhat.com>
      37fde8ca
    • A
      [GFS2] printk warning fixes · f391a4ea
      akpm@linux-foundation.org 提交于
      alpha:
      
      fs/gfs2/dir.c: In function 'gfs2_dir_read_leaf':
      fs/gfs2/dir.c:1322: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'sector_t'
      fs/gfs2/dir.c: In function 'gfs2_dir_read':
      fs/gfs2/dir.c:1455: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type '__u64'
      
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f391a4ea
    • S
      [GFS2] Patch to fix mmap of stuffed files · bf126aee
      Steven Whitehouse 提交于
      If a stuffed file is mmaped and a page fault is generated at some offset
      above the initial page, we need to create a zero page to hang the buffer
      heads off before we can unstuff the file. This is a fix for bz #236087
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      bf126aee
    • J
      [GFS2] use lib/parser for parsing mount options · 476c006b
      Josef Bacik 提交于
      This patch converts the mount option parsing to use the kernels lib/parser stuff
      like all of the other filesystems.  I tested this and it works well.  Thank you,
      Signed-off-by: NJosef Bacik <jwhiter@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      476c006b
    • R
      [GFS2] lockdump improvements · 5f882096
      Robert Peterson 提交于
      The patch below consists of the following changes (in code order):
      
      1. I fixed a minor compiler warning regarding the printing of
         a kernel symbol address.
      2. I implemented a suggestion from Dave Teigland that moves
         the debugfs information for gfs2 into a subdirectory so
         we can easily expand our use of debugfs in the future.
         The current code keeps the glock information in:
         /debug/gfs2/<fs>
         With the patch, the new code keeps the glock information in:
         /debug/gfs2/<fs>/glock
         That will allow us to create more debugfs files in the future.
      3. This fixes a bug whereby a failed mount attempt causes the
         debugfs file to not be deleted.  Failed mount attempts should
         always clean up after themselves, including deleting the
         debugfs file and/or directory.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5f882096
    • S
      [GFS2] Patch to detect corrupt number of dir entries in leaf and/or inode blocks · bdd19a22
      Steven Whitehouse 提交于
      This patch detects when the number of entries in a leaf block or inode
      block (in the case of stuffed directories) is corrupt and informs the
      user. It prevents us from running off the end of the array thats been
      allocated for the sorting in this case,
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      bdd19a22
    • R
      [GFS2] bz 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump) · 7a0079d9
      Robert Peterson 提交于
      This is for Bugzilla Bug 236008: Kernel gpf doing cat /debugfs/gfs2/xxx
      (lock dump) seen at the "gfs2 summit".  This also fixes the bug that caused
      garbage to be printed by the "initialized at" field.  I apologize for the
      kludge, but that code will all be ripped out anyway when the official
      sprint_symbol function becomes available in the Linux kernel.  I also
      changed some formatting so that spaces are replaced by proper tabs.
      Signed-off-by: NRobert Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7a0079d9
    • S
      [GFS2] Fix bz 234168 (ignoring rgrp flags) · a43a4906
      Steven Whitehouse 提交于
      Ths following patch makes GFS2 use the rgrp flags properly. Although
      there are also separate flags for both data and metadata as well, I've
      not implemented these as there seems little use for them. On the
      otherhand, the "noalloc" flag is generally useful for future changes we
      might which to make, so this ensures that we interpret it correctly.
      
      In addition I fixed the comment above the function which was incorrect.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      a43a4906
    • S
      [GFS2] Set drop_count to 0 (off) by default · f01963f2
      Steven Whitehouse 提交于
      This sets the drop_count to 0 by default which is a better default
      for most people.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f01963f2
    • D
      [GFS2] use log_error before LM_OUT_ERROR · b9af8a78
      David Teigland 提交于
      We always want to see the details of the error returned to gfs, but
      log_debug is often turned off, so use log_error (printk).
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b9af8a78
    • R
      [GFS2] Red Hat bz 228540: owner references · 04b933f2
      Robert Peterson 提交于
      In Testing the previously posted and accepted patch for
      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228540
      I uncovered some gfs2 badness.  It turns out that the current
      gfs2 code saves off a process pointer when glocks is taken
      in both the glock and glock holder structures.  Those
      structures will persist in memory long after the process has
      ended; pointers to poisoned memory.
      
      This problem isn't caused by the 228540 fix; the new capability
      introduced by the fix just uncovered the problem.
      
      I wrote this patch that avoids saving process pointers
      and instead saves off the process pid.  Rather than
      referencing the bad pointers, it now does process lookups.
      There is special code that makes the output nicer for
      printing holder information for processes that have ended.
      
      This patch also adds a stub for the new "sprint_symbol"
      function that exists in Andrew Morton's -mm patch set, but
      won't go into the base kernel until 2.6.22, since it adds
      functionality but doesn't fix a bug.
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      04b933f2
    • B
      [GFS2] flush the log if a transaction can't allocate space · 172e045a
      Benjamin Marzinski 提交于
      This is a fix for bz #208514. When GFS2 frees up space, the freed blocks
      aren't available for reuse until the resource group is successfully written
      to the ondisk journal. So in rare cases, GFS2 operations will fail, saying
      that the filesystem is out of space, when in reality, you are just waiting for
      a log flush. For instance, on a 1Gig filesystem, if I continually write 10 Mb
      to a file, and then truncate it, after a hundred interations, the write will
      fail with -ENOSPC, even though the filesystem is just 1% full.
      
      The attached patch calls a log flush in these cases.  I tested this patch
      fairly heavily to check if there were any locking issues that I missed, and
      it seems to work just fine. Also, this patch only does the log flush if
      get_local_rgrp makes a complete loop of resource groups without skipping
      any do to locking issues. The code would be slightly simpler if it just always
      did the log flush after the first failed pass, and you could only ever have
      to go through the loop twice, instead of up to three times. However, I guessed
      that failing to find a rg simply do to locking issues would be common enough
      to skip the log flush in that case, but I'm not certain that this is the right
      way to go. Either way, I don't suppose this code will be hit all that often.
      Signed-off-by: NBenjamin E. Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      172e045a
    • B
      [GFS2] Fix log entry list corruption · 68835625
      Benjamin Marzinski 提交于
      When glock_lo_add and rg_lo_add attempt to add an element to the log, they
      check to see if has already been added before locking the log. If another
      process adds that element to the log in this window between the check and
      locking the log, the element will be added to the list twice. This causes
      the log element list to become corrupted in such a way that the log element
      can never be successfully removed from the list. This patch pulls the
      list_empty() check inside the log lock, to remove this window.
      Signed-off-by: NBenjamin E. Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      68835625
    • S
      [GFS2] Speed up lock_dlm's locking (move sprintf) · f35ac346
      Steven Whitehouse 提交于
      The following patch speeds up lock_dlm's locking by moving the sprintf
      out from the lock acquisition path and into the lock creation path. This
      reduces the amount of CPU time used in acquiring locks by a fair amount.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Acked-by: NDavid Teigland <teigland@redhat.com>
      f35ac346
    • S
      [GFS2] Fix a bug on i386 due to evaluation order · 420d2a10
      Steven Whitehouse 提交于
      Since gcc didn't evaluate the last two terms of the expression in
      glock.c:1881 as a constant expression, it resulted in an error on
      i386 due to the lack of a 64bit divide instruction. This adds some
      brackets to fix the problem.
      
      This was reported by Andrew Morton.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      420d2a10
    • S
      [GFS2] Fix bz 224480 and cleanup glock demotion code · 3b8249f6
      Steven Whitehouse 提交于
      This patch prevents the printing of a warning message in cases where
      the fs is functioning normally by handing off responsibility for
      unlinked, but still open inodes, to another node for eventual deallocation.
      Also, there is now an improved system for ensuring that such requests
      to other nodes do not get lost. The callback on the iopen lock is
      only ever called when i_nlink == 0 and when a node is unable to deallocate
      it due to it still being in use on another node. When a node receives
      the callback therefore, it knows that i_nlink must be zero, so we mark
      it as such (in gfs2_drop_inode) in order that it will then attempt
      deallocation of the inode itself.
      
      As an additional benefit, queuing a demote request no longer requires
      a memory allocation. This simplifies the code for dealing with gfs2_holders
      as it removes one special case.
      
      There are two new fields in struct gfs2_glock. gl_demote_state is the
      state which the remote node has requested and gl_demote_time is the
      time when the request came in. Both fields are only valid when the
      GLF_DEMOTE flag is set in gl_flags.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      3b8249f6
    • J
      [GFS2] Fix bz 231380, unlock page before dequeing glocks in gfs2_commit_write · 1de91390
      Josef Whiter 提交于
      If we are writing a file, and in the middle of writing the file
      another node attempts to get a shared lock on that file (by doing a du for
      example) the process doing the writing will hang waiting on lock_page.  The
      reason for this is because when we have waiters on a exclusive glock, we will go
      through and flush out all dirty pages associated with that inode and release the
      lock.  The problem is that when we flush the dirty pages, we could hit a page
      that we have locked durring the generic_file_buffered_write part of this
      operation.  This patch unlocks the page before we go to dequeue the lock and
      locks it immediatly afterwards, since generic_file_buffered_write needs the page
      locked when the commit_write is completed.  This patch resolves the problem,
      however if somebody sees a better way to do this please don't hesistate to yell.
      Signed-off-by: NJosef Whiter <jwhiter@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1de91390
    • J
      [GFS2] fix bz 231369, gfs2 will oops if you specify an invalid mount option · 5c7342d8
      Josef Whiter 提交于
      If you specify an invalid mount option when trying to mount a gfs2 filesystem,
      gfs2 will oops.  The attached patch resolves this problem.
      Signed-off-by: NJosef Whiter <jwhiter@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5c7342d8
    • R
      [GFS2] Add gfs2_tool lockdump support to gfs2 (bz 228540) · 7c52b166
      Robert Peterson 提交于
      The attached patch resolves bz 228540.  This adds the capability
      for gfs2 to dump gfs2 locks through the debugfs file system.
      This used to exist in gfs1 as "gfs_tool lockdump" but it's missing from
      gfs2 because all the ioctls were stripped out.  Please see the bugzilla
      for more history about the fix.  This patch is also attached to the bugzilla
      record.
      
      The patch is against Steve Whitehouse's latest nmw git tree kernel
      (2.6.21-rc1) and has been tested on system trin-10.
      Signed-off-by: NRobert Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7c52b166
  9. 08 3月, 2007 11 次提交
  10. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a