]> git.neil.brown.name Git - history.git/commit
[PATCH] md: Allow md to select between superblock formats
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 14 Mar 2003 10:09:20 +0000 (02:09 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 14 Mar 2003 10:09:20 +0000 (02:09 -0800)
commita3a173cd2d5db3a807a63e79a6f3ec8bce058129
tree74fa74abda54e5f0b684105cb4117f55fdfac9f8
parentb931e4595b0c1ba56decec4c85354b772675c58e
[PATCH] md: Allow md to select between superblock formats

The code to understand a specific superblock format is
already highly localised in md.  This patch defines a
user-space interface for selecting which superblock format
to use, and obeys that selection.

Md currently has a concept of 3 version numbers:
 A major version number
 A minor version number
 A patch version number

There historically seems to be some confusion about whether
these refer to a version of the superblock layout,
or a version of the software.

We will now define that:
   the "major_version" defines the superblock handler.
      '0' is the current superblock format.  All new formats
          will need new numbers.
   the "minor_version" can specify minor variations in the
      superblock, such as different location on the device
   the "patch_version" will be used to indicate new extenstions
      to the software.. patch_version=1 will mean multiple superblock
      support.

A superblock version number is selected by specifing major_version
in SET_ARRAY_INFO ioctl.

This patch:
  Updates Documentation/md.txt with details of new interface.
  Generalises desc_nr handling and makes sure that an array never
  has two devices with the same desc_nr.
  makes sure mddev->major_version is always valid and is 0 by default.
  uses mddev->major_version to select superblock handlers.
  Modifies set_array_info to just record version number if raid_disks==0
  Makes sure max_disks is always set correctly.
  Determines device size when reading superblock, or a hot-add/add-new.
Documentation/md.txt
drivers/md/md.c