1. 22 6月, 2005 5 次提交
    • N
      [PATCH] md: optimised resync using Bitmap based intent logging · 32a7627c
      NeilBrown 提交于
      With this patch, the intent to write to some block in the array can be logged
      to a bitmap file.  Each bit represents some number of sectors and is set
      before any update happens, and only cleared when all writes relating to all
      sectors are complete.
      
      After an unclean shutdown, information in this bitmap can be used to optimise
      resync - only sectors which could be out-of-sync need to be updated.
      
      Also if a drive is removed and then added back into an array, the recovery can
      make use of the bitmap to optimise reconstruction.  This is not implemented in
      this patch.
      
      Currently the bitmap is stored in a file which must (obviously) be stored on a
      separate device.
      
      The patch only provided infrastructure.  It does not update any personalities
      to bitmap intent logging.
      
      Md arrays can still be used with no bitmap file.  This patch has minimal
      impact on such arrays.
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      32a7627c
    • N
      [PATCH] md: improve the interface to sync_request · 57afd89f
      NeilBrown 提交于
      1/ change the return value (which is number-of-sectors synced)
       from 'int' to 'sector_t'.
       The number of sectors is usually easily small enough to fit
       in an int, but if resync needs to abort, it may want to return
       the total number of remaining sectors, which could be large.
       Also errors cannot be returned as negative numbers now, so use
       0 instead
      2/ Add a 'skipped' return parameter to allow the array to report
       that it skipped the sectors.  This allows md to take this into account
       in the speed calculations.
       Currently there is no important skipping, but the bitmap-based-resync
       that is coming will use this.
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      57afd89f
    • N
      [PATCH] md: improve locking on 'safemode' and move superblock writes · 06d91a5f
      NeilBrown 提交于
      When md marks the superblock dirty before a write, it calls
      generic_make_request (to write the superblock) from within
      generic_make_request (to write the first dirty block), which could cause
      problems later.
      
      With this patch, the superblock write is always done by the helper thread, and
      write request are delayed until that write completes.
      
      Also, the locking around marking the array dirty and writing the superblock is
      improved to avoid possible races.
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      06d91a5f
    • N
      [PATCH] md: merge md_enter_safemode into md_check_recovery · fca4d848
      NeilBrown 提交于
      md_enter_safemode checks if it is time to mark the md superblock as 'clean'.
      i.e.  if all writes have completed and a suitable delay has passed.
      
      This is currently called from md_handle_safemode which in-turn is called
      (almost) every time md_check_recovery is called, and from the end of
      md_do_sync which causes the mddev->thread to run, which will always call
      md_check_recovery as well.
      
      So it doesn't need to be a separate function and fits quite well into
      md_check_recovery.
      
      The "almost" is because multipathd calls md_check_recovery but not
      md_handle_safemode.  This is OK because the code from md_enter_safemode is a
      no-op if mddev->safemode == 0, which it always is for a multipathd (providing
      we don't allow it to be set to 2 on a signal...)
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fca4d848
    • N
      [PATCH] md: make sure recovery happens when add_new_disk is used for hot_add · c361777f
      NeilBrown 提交于
      Currently if add_new_disk is used to hot-add a drive to a degraded array,
      recovery doesn't start ...  because we didn't tell it to.
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c361777f
  2. 06 5月, 2005 1 次提交
  3. 17 4月, 2005 4 次提交