1. 07 5月, 2009 2 次提交
    • N
      md/raid10: don't clear bitmap during recovery if array will still be degraded. · 18055569
      NeilBrown 提交于
      If we have a raid10 with multiple missing devices, and we recover just
      one of these to a spare, then we risk (depending on the bitmap and
      array chunk size) clearing bits of the bitmap for which recovery isn't
      complete (because a device is still missing).
      
      This can lead to a subsequent "re-add" being recovered without
      any IO happening, which would result in loss of data.
      
      This patch takes the safe approach of not clearing bitmap bits
      if the array will still be degraded.
      
      This patch is suitable for all active -stable kernels.
      
      Cc: stable@kernel.org
      Signed-off-by: NNeilBrown <neilb@suse.de>
      18055569
    • N
      md: fix loading of out-of-date bitmap. · b74fd282
      NeilBrown 提交于
      When md is loading a bitmap which it knows is out of date, it fills
      each page with 1s and writes it back out again.  However the
      write_page call makes used of bitmap->file_pages and
      bitmap->last_page_size which haven't been set correctly yet.  So this
      can sometimes fail.
      
      Move the setting of file_pages and last_page_size to before the call
      to write_page.
      
      This bug can cause the assembly on an array to fail, thus making the
      data inaccessible.  Hence I think it is a suitable candidate for
      -stable.
      
      Cc: stable@kernel.org
      Reported-by: NVojtech Pavlik <vojtech@suse.cz>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      b74fd282
  2. 03 5月, 2009 36 次提交
  3. 02 5月, 2009 2 次提交
    • H
      m32r: use __stringify() macro in assembler.h · 9cd67243
      Hirokazu Takata 提交于
      Replace #x with __stringify(x).
      Also, #ifndef __STR is removed and undefine __STR macro at the beginning.
      
      The __STR() macro is still remained, because the assembler.h might be
      included from assembly codes as well as C codes.
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      9cd67243
    • H
      m32r: build fix for __stringify macro · 9c88b06d
      Hirokazu Takata 提交于
      This patch fixes the following build error of 2.6.30-rc3-git2:
      
            AS      arch/m32r/kernel/head.o
          In file included from /include/linux/init.h:7,
                           from /arch/m32r/kernel/head.S:11:
          /include/linux/stringify.h:9: error: syntax error in macro parameter list
          /include/linux/stringify.h:10: error: syntax error in macro parameter list
      
      This build error was caused at __HEAD macro in arch/m32r/kernel/head.S,
      which uses __stringify() macro.
      
      Remove -traditional option from EXTRA_AFLAGS for the m32r,
      because the __stringify() macro depends on the gcc's variadic macro
      extension function, due to commit:
      
          Make __stringify support variable argument macros too
          commit: 8f7c2c37Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      9c88b06d