1. 24 5月, 2007 1 次提交
  2. 10 2月, 2007 1 次提交
    • N
      [PATCH] md: avoid possible BUG_ON in md bitmap handling · da6e1a32
      Neil Brown 提交于
      md/bitmap tracks how many active write requests are pending on blocks
      associated with each bit in the bitmap, so that it knows when it can clear
      the bit (when count hits zero).
      
      The counter has 14 bits of space, so if there are ever more than 16383, we
      cannot cope.
      
      Currently the code just calles BUG_ON as "all" drivers have request queue
      limits much smaller than this.
      
      However is seems that some don't.  Apparently some multipath configurations
      can allow more than 16383 concurrent write requests.
      
      So, in this unlikely situation, instead of calling BUG_ON we now wait
      for the count to drop down a bit.  This requires a new wait_queue_head,
      some waiting code, and a wakeup call.
      
      Tested by limiting the counter to 20 instead of 16383 (writes go a lot slower
      in that case...).
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      da6e1a32
  3. 22 10月, 2006 1 次提交
  4. 03 10月, 2006 1 次提交
    • P
      [PATCH] md: new sysfs interface for setting bits in the write-intent-bitmap · 9b1d1dac
      Paul Clements 提交于
      Add a new sysfs interface that allows the bitmap of an array to be dirtied.
      The interface is write-only, and is used as follows:
      
      echo "1000" > /sys/block/md2/md/bitmap
      
      (dirty the bit for chunk 1000 [offset 0] in the in-memory and on-disk
      bitmaps of array md2)
      
      echo "1000-2000" > /sys/block/md1/md/bitmap
      
      (dirty the bits for chunks 1000-2000 in md1's bitmap)
      
      This is useful, for example, in cluster environments where you may need to
      combine two disjoint bitmaps into one (following a server failure, after a
      secondary server has taken over the array).  By combining the bitmaps on
      the two servers, a full resync can be avoided (This was discussed on the
      list back on March 18, 2005, "[PATCH 1/2] md bitmap bug fixes" thread).
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9b1d1dac
  5. 27 6月, 2006 2 次提交
    • N
      [PATCH] md/bitmap: change md/bitmap file handling to use bmap to file blocks · d785a06a
      NeilBrown 提交于
      If md is asked to store a bitmap in a file, it tries to hold onto the page
      cache pages for that file, manipulate them directly, and call a cocktail of
      operations to write the file out.  I don't believe this is a supportable
      approach.
      
      This patch changes the approach to use the same approach as swap files.  i.e.
      bmap is used to enumerate all the block address of parts of the file and we
      write directly to those blocks of the device.
      
      swapfile only uses parts of the file that provide a full pages at contiguous
      addresses.  We don't have that luxury so we have to cope with pages that are
      non-contiguous in storage.  To handle this we attach buffers to each page, and
      store the addresses in those buffers.
      
      With this approach the pagecache may contain data which is inconsistent with
      what is on disk.  To alleviate the problems this can cause, md invalidates the
      pagecache when releasing the file.  If the file is to be examined while the
      array is active (a non-critical but occasionally useful function), O_DIRECT io
      must be used.  And new version of mdadm will have support for this.
      
      This approach simplifies a lot of code:
       - we no longer need to keep a list of pages which we need to wait for,
         as the b_endio function can keep track of how many outstanding
         writes there are.  This saves a mempool.
       - -EAGAIN returns from write_page are no longer possible (not sure if
          they ever were actually).
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d785a06a
    • N
      [PATCH] md/bitmap: remove bitmap writeback daemon · 0b79ccf0
      NeilBrown 提交于
      md/bitmap currently has a separate thread to wait for writes to the bitmap
      file to complete (as we cannot get a callback on that action).
      
      However this isn't needed as bitmap_unplug is called from process context and
      waits for the writeback thread to do it's work.  The same result can be
      achieved by doing the waiting directly in bitmap_unplug.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0b79ccf0
  6. 09 11月, 2005 1 次提交
  7. 10 9月, 2005 1 次提交
  8. 05 8月, 2005 1 次提交
  9. 16 7月, 2005 1 次提交
  10. 22 6月, 2005 3 次提交