~ubuntu-branches/ubuntu/karmic/mdadm/karmic

« back to all changes in this revision

Viewing changes to super0.c

  • Committer: Package Import Robot
  • Author(s): Scott James Remnant
  • Date: 2007-12-12 22:35:09 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20071212223509-10l2hitpp068jr53
Tags: 2.6.3+200709292116+4450e59-3ubuntu1
* Merge from debian unstable, remaining changes:
 * md activation:
  - We now have a single udev rule for both the real system and the
    initramfs, since doing things differently there will only result in bugs
    and confusion.
  - This rule runs "mdadm --assemble --scan --no-degraded", automatically
    activating any non-degraded device as their components are detected.
  - Drop the mdadm-raid init script, since this does the same thing.
  - Also drop mdadm-startall which uses the mdadm-raid init script, and its
    associated sgml file (thus dropping the build-dep on docbook-to-man)
  - Simplify the configuration, since we always autostart all devices so do
    not need to specify any required root devices, etc.
  - Drop the deprecated mdrun entirely.
  - Since udev autostarts arrays, much of the initramfs script can be
    dropped.
 * Install a new udev rule at 65 which runs vol_id on clean raid arrays.
   This will cause lvm, etc. to be run (since there is vol_id information
   present for the enclosed filesystem).
 * Depend on initramfs-tools, specifically a version that doesn't ship
   the mdrun script.  This way we can clean out a lot of the upgrade handling
   from the initramfs hook.
 * Just get initramfs to load the modules for us

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
        if (!get_dev_size(fd, NULL, &dsize))
625
625
                return 1;
626
626
 
627
 
        if (dsize < MD_RESERVED_SECTORS*2*512)
 
627
        if (dsize < MD_RESERVED_SECTORS*512)
628
628
                return 2;
629
629
 
630
630
        offset = MD_NEW_SIZE_SECTORS(dsize>>9);
731
731
        if (!get_dev_size(fd, devname, &dsize))
732
732
                return 1;
733
733
 
734
 
        if (dsize < MD_RESERVED_SECTORS*512 * 2) {
 
734
        if (dsize < MD_RESERVED_SECTORS*512) {
735
735
                if (devname)
736
736
                        fprintf(stderr, Name
737
737
                            ": %s is too small for md: size is %llu sectors.\n",
835
835
 
836
836
static __u64 avail_size0(struct supertype *st, __u64 devsize)
837
837
{
838
 
        if (devsize < MD_RESERVED_SECTORS*2)
 
838
        if (devsize < MD_RESERVED_SECTORS)
839
839
                return 0ULL;
840
840
        return MD_NEW_SIZE_SECTORS(devsize);
841
841
}
893
893
        if (!get_dev_size(fd, NULL, &dsize))
894
894
                return;
895
895
 
896
 
        if (dsize < MD_RESERVED_SECTORS*512 * 2)
 
896
        if (dsize < MD_RESERVED_SECTORS*512)
897
897
                return;
898
898
 
899
899
        offset = MD_NEW_SIZE_SECTORS(dsize>>9);
920
920
                return 1;
921
921
 
922
922
 
923
 
        if (dsize < MD_RESERVED_SECTORS*512 * 2)
924
 
        return -1;
 
923
        if (dsize < MD_RESERVED_SECTORS*512)
 
924
                return -1;
925
925
 
926
926
        offset = MD_NEW_SIZE_SECTORS(dsize>>9);
927
927