1. 14 7月, 2007 12 次提交
    • D
      [XFS] Flush the block device before closing it on unmount. · f4a9f28a
      David Chinner 提交于
      SGI-PV: 965630
      SGI-Modid: xfs-linux-melb:xfs-kern:28774a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      f4a9f28a
    • D
      [XFS] xfs_bmapi fails to update the previous extent pointer · 4e5ae838
      David Chinner 提交于
      When processing multiple extent maps, xfs_bmapi needs to keep track of the
      extent behind the one it is currently working on to be able to trim extent
      ranges correctly. Failing to update the previous pointer can result in
      corrupted extent lists in memory and this will result in panics or assert
      failures.
      
      Update the previous pointer correctly when we move to the next extent to
      process.
      
      SGI-PV: 965631
      SGI-Modid: xfs-linux-melb:xfs-kern:28773a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NVlad Apostolov <vapo@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      4e5ae838
    • D
      [XFS] Fix the transaction flags to make lazy superblock counters work. · 210c6f1c
      David Chinner 提交于
      SGI-PV: 964999
      SGI-Modid: xfs-linux-melb:xfs-kern:28653a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      210c6f1c
    • D
      [XFS] Lazy Superblock Counters · 92821e2b
      David Chinner 提交于
      When we have a couple of hundred transactions on the fly at once, they all
      typically modify the on disk superblock in some way.
      create/unclink/mkdir/rmdir modify inode counts, allocation/freeing modify
      free block counts.
      
      When these counts are modified in a transaction, they must eventually lock
      the superblock buffer and apply the mods. The buffer then remains locked
      until the transaction is committed into the incore log buffer. The result
      of this is that with enough transactions on the fly the incore superblock
      buffer becomes a bottleneck.
      
      The result of contention on the incore superblock buffer is that
      transaction rates fall - the more pressure that is put on the superblock
      buffer, the slower things go.
      
      The key to removing the contention is to not require the superblock fields
      in question to be locked. We do that by not marking the superblock dirty
      in the transaction. IOWs, we modify the incore superblock but do not
      modify the cached superblock buffer. In short, we do not log superblock
      modifications to critical fields in the superblock on every transaction.
      In fact we only do it just before we write the superblock to disk every
      sync period or just before unmount.
      
      This creates an interesting problem - if we don't log or write out the
      fields in every transaction, then how do the values get recovered after a
      crash? the answer is simple - we keep enough duplicate, logged information
      in other structures that we can reconstruct the correct count after log
      recovery has been performed.
      
      It is the AGF and AGI structures that contain the duplicate information;
      after recovery, we walk every AGI and AGF and sum their individual
      counters to get the correct value, and we do a transaction into the log to
      correct them. An optimisation of this is that if we have a clean unmount
      record, we know the value in the superblock is correct, so we can avoid
      the summation walk under normal conditions and so mount/recovery times do
      not change under normal operation.
      
      One wrinkle that was discovered during development was that the blocks
      used in the freespace btrees are never accounted for in the AGF counters.
      This was once a valid optimisation to make; when the filesystem is full,
      the free space btrees are empty and consume no space. Hence when it
      matters, the "accounting" is correct. But that means the when we do the
      AGF summations, we would not have a correct count and xfs_check would
      complain. Hence a new counter was added to track the number of blocks used
      by the free space btrees. This is an *on-disk format change*.
      
      As a result of this, lazy superblock counters are a mkfs option and at the
      moment on linux there is no way to convert an old filesystem. This is
      possible - xfs_db can be used to twiddle the right bits and then
      xfs_repair will do the format conversion for you. Similarly, you can
      convert backwards as well. At some point we'll add functionality to
      xfs_admin to do the bit twiddling easily....
      
      SGI-PV: 964999
      SGI-Modid: xfs-linux-melb:xfs-kern:28652a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      92821e2b
    • A
      [XFS] Use generic shrinker interfaces in XFS. · 3260f78a
      Andrew Morton 提交于
      SGI-PV: 964986
      SGI-Modid: xfs-linux-melb:xfs-kern:28642a
      Signed-Off-By: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      3260f78a
    • D
      [XFS] Make hole punching at EOF atomic. · 92dfe8d2
      David Chinner 提交于
      If hole punching at EOF is done as two steps (i.e. truncate then extend)
      the file is in a transient state between the two steps where an
      application can see the incorrect file size. Punching a hole to EOF needs
      to be treated in teh same way as all other hole punching cases so that the
      file size is never seen to change.
      
      SGI-PV: 962012
      SGI-Modid: xfs-linux-melb:xfs-kern:28641a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NVlad Apostolov <vapo@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      92dfe8d2
    • D
      [XFS] Fix vmalloc leak on mount/unmount. · 511105b3
      David Chinner 提交于
      When setting the length of the iclogbuf to write out we should just be
      changing the desired byte count rather completely reassociating the buffer
      memory with the buffer. Reassociating the buffer memory changes the
      apparent length of the buffer and hence when we free the buffer, we don't
      free all the vmap()d space we originally allocated.
      
      SGI-PV: 964983
      SGI-Modid: xfs-linux-melb:xfs-kern:28640a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      511105b3
    • C
      [XFS] Fix double free in xfs_buf_get_noaddr error handling path · ca165b88
      Christoph Hellwig 提交于
      SGI-PV: 964983
      SGI-Modid: xfs-linux-melb:xfs-kern:28639a
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      ca165b88
    • D
      [XFS] Fix use-after-free during log unmount. · 3db296f3
      David Chinner 提交于
      Don't reference the log buffer after running the callbacks as the callback
      can trigger the log buffers to be freed during unmount.
      
      SGI-PV: 964545
      SGI-Modid: xfs-linux-melb:xfs-kern:28567a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      3db296f3
    • D
      [XFS] Sleeping with the ilock waiting for I/O completion is Bad. · 40095b64
      David Chinner 提交于
      Recent fixes to the filesystem freezing code introduced a vn_iowait call
      in the middle of the sync code. Unfortunately, at the point where this
      call was added we are holding the ilock. The ilock is needed by I/O
      completion for unwritten extent conversion and now updating the file size.
      Hence I/o cannot complete if we hold the ilock while waiting for I/O
      completion.
      
      Fix up the bug and clean the code up around it.
      
      SGI-PV: 963674
      SGI-Modid: xfs-linux-melb:xfs-kern:28566a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      40095b64
    • N
      [XFS] Don't grow filesystems past the size they can index. · 4cc929ee
      Nathan Scott 提交于
      When growing a filesystem we don't check to see if the new size overflows
      the page cache index range, so we can do silly things like grow a
      filesystem page 16TB on a 32bit. Check new filesystem sizes against the
      limits the kernel can support.
      
      SGI-PV: 957886
      SGI-Modid: xfs-linux-melb:xfs-kern:28563a
      Signed-Off-By: NNathan Scott <nscott@aconex.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      4cc929ee
    • C
      [XFS] Only use refcounted pages for I/O · 1fa40b01
      Christoph Hellwig 提交于
      Many block drivers (aoe, iscsi) really want refcountable pages in bios,
      which is what almost everyone send down. XFS unfortunately has a few
      places where it sends down buffers that may come from kmalloc, which
      breaks them.
      
      Fix the places that use kmalloc()d buffers.
      
      SGI-PV: 964546
      SGI-Modid: xfs-linux-melb:xfs-kern:28562a
      Signed-Off-By: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      1fa40b01
  2. 10 7月, 2007 1 次提交
  3. 19 6月, 2007 1 次提交
  4. 29 5月, 2007 1 次提交
  5. 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
  6. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  7. 09 5月, 2007 2 次提交
  8. 08 5月, 2007 16 次提交
  9. 23 3月, 2007 1 次提交
  10. 21 2月, 2007 1 次提交
  11. 15 2月, 2007 2 次提交
    • E
      [PATCH] sysctl: remove insert_at_head from register_sysctl · 0b4d4147
      Eric W. Biederman 提交于
      The semantic effect of insert_at_head is that it would allow new registered
      sysctl entries to override existing sysctl entries of the same name.  Which is
      pain for caching and the proc interface never implemented.
      
      I have done an audit and discovered that none of the current users of
      register_sysctl care as (excpet for directories) they do not register
      duplicate sysctl entries.
      
      So this patch simply removes the support for overriding existing entries in
      the sys_sysctl interface since no one uses it or cares and it makes future
      enhancments harder.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b4d4147
    • 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
  12. 13 2月, 2007 1 次提交