string: factorize skip_spaces and export it to be generally available
[safe/jmp/linux-2.6] / Documentation / md.txt
index 18fad68..188f476 100644 (file)
@@ -233,9 +233,9 @@ All md devices contain:
 
   resync_start
      The point at which resync should start.  If no resync is needed,
-     this will be a very large number.  At array creation it will
-     default to 0, though starting the array as 'clean' will
-     set it much larger.
+     this will be a very large number (or 'none' since 2.6.30-rc1).  At
+     array creation it will default to 0, though starting the array as
+     'clean' will set it much larger.
 
    new_dev
      This file can be written but not read.  The value written should
@@ -322,6 +322,22 @@ All md devices contain:
      'backlog' sets a limit on the number of concurrent background
      writes.  If there are more than this, new writes will by
      synchronous.
+  bitmap/metadata
+     This can be either 'internal' or 'external'.
+     'internal' is the default and means the metadata for the bitmap
+     is stored in the first 256 bytes of the allocated space and is
+     managed by the md module.
+     'external' means that bitmap metadata is managed externally to
+     the kernel (i.e. by some userspace program)
+  bitmap/can_clear
+     This is either 'true' or 'false'.  If 'true', then bits in the
+     bitmap will be cleared when the corresponding blocks are thought
+     to be in-sync.  If 'false', bits will never be cleared.
+     This is automatically set to 'false' if a write happens on a
+     degraded array, or if the array becomes degraded during a write.
+     When metadata is managed externally, it should be set to true
+     once the array becomes non-degraded, and this fact has been
+     recorded in the metadata.
      
      
      
@@ -363,8 +379,9 @@ Each directory contains:
        Writing "writemostly" sets the writemostly flag.
        Writing "-writemostly" clears the writemostly flag.
        Writing "blocked" sets the "blocked" flag.
-       Writing "-blocked" clear the "blocked" flag and allows writes
+       Writing "-blocked" clears the "blocked" flag and allows writes
                to complete.
+       Writing "in_sync" sets the in_sync flag.
 
        This file responds to select/poll. Any change to 'faulty'
        or 'blocked' causes an event.
@@ -401,6 +418,24 @@ Each directory contains:
         array.  If a value less than the current component_size is
         written, it will be rejected.
 
+      recovery_start
+
+        When the device is not 'in_sync', this records the number of
+       sectors from the start of the device which are known to be
+       correct.  This is normally zero, but during a recovery
+       operation is will steadily increase, and if the recovery is
+       interrupted, restoring this value can cause recovery to
+       avoid repeating the earlier blocks.  With v1.x metadata, this
+       value is saved and restored automatically.
+
+       This can be set whenever the device is not an active member of
+       the array, either before the array is activated, or before
+       the 'slot' is set.
+
+       Setting this to 'none' is equivalent to setting 'in_sync'.
+       Setting to any other value also clears the 'in_sync' flag.
+       
+
 
 An active md device will also contain and entry for each active device
 in the array.  These are named