Changes by: flatcap
Update of /cvsroot/linux-ntfs/dynamic-disk/patch
In directory usw-pr-cvs1:/tmp/cvs-serv8357/patch
Added Files:
linux-2.4.18-ldm linux-2.4.19-pre10-ldm linux-2.5.23-ldm
linux-2.5.24-ldm readme remove-non-kernel
Log Message:
patches for current kernels
updates to configuration & docs
--- NEW FILE ---
diff -urN linux-2.4.18/Documentation/Configure.help linux-2.4.18-ldm/Documentation/Configure.help
--- linux-2.4.18/Documentation/Configure.help Mon May 27 23:07:29 2002
+++ linux-2.4.18-ldm/Documentation/Configure.help Sun Jun 23 16:42:51 2002
@@ -14876,7 +14876,7 @@
Say Y here if you would like to use hard disks under Linux which
were partitioned on a Macintosh.
-Windows Logical Disk Manager (Dynamic Disk) support (EXPERIMENTAL)
+Windows Logical Disk Manager (Dynamic Disk) support
CONFIG_LDM_PARTITION
Say Y here if you would like to use hard disks under Linux which
were partitioned using Windows 2000's or XP's Logical Disk Manager.
@@ -14884,15 +14884,14 @@
Windows 2000 introduced the concept of Dynamic Disks to get around
the limitations of the PC's partitioning scheme. The Logical Disk
- Manager allows the user to repartion a disk and create spanned,
+ Manager allows the user to repartition a disk and create spanned,
mirrored, striped or RAID volumes, all without the need for
[...2513 lines suppressed...]
+
+cleanup:
+ ldm_free_vblks (&ldb->v_dgrp);
+ ldm_free_vblks (&ldb->v_disk);
+ ldm_free_vblks (&ldb->v_volu);
+ ldm_free_vblks (&ldb->v_comp);
+ ldm_free_vblks (&ldb->v_part);
out:
- kfree(ph);
- kfree(toc);
- kfree(vm);
- kfree(dk);
+ kfree (ldb);
return err;
-no_mem:
- printk(LDM_CRIT "Not enough memory to allocate required buffers.\n");
- err = -1;
- goto out;
}
-
--- NEW FILE ---
diff -urN linux-2.4.19-pre10/Documentation/Configure.help linux-2.4.19-pre10-ldm/Documentation/Configure.help
--- linux-2.4.19-pre10/Documentation/Configure.help Fri Jun 21 16:03:57 2002
+++ linux-2.4.19-pre10-ldm/Documentation/Configure.help Fri Jun 21 16:05:55 2002
@@ -15233,7 +15233,7 @@
Say Y here if you would like to use hard disks under Linux which
were partitioned on a Macintosh.
-Windows Logical Disk Manager (Dynamic Disk) support (EXPERIMENTAL)
+Windows Logical Disk Manager (Dynamic Disk) support
CONFIG_LDM_PARTITION
Say Y here if you would like to use hard disks under Linux which
were partitioned using Windows 2000's or XP's Logical Disk Manager.
@@ -15241,15 +15241,14 @@
Windows 2000 introduced the concept of Dynamic Disks to get around
the limitations of the PC's partitioning scheme. The Logical Disk
- Manager allows the user to repartion a disk and create spanned,
+ Manager allows the user to repartition a disk and create spanned,
mirrored, striped or RAID volumes, all without the need for
[...2513 lines suppressed...]
+
+cleanup:
+ ldm_free_vblks (&ldb->v_dgrp);
+ ldm_free_vblks (&ldb->v_disk);
+ ldm_free_vblks (&ldb->v_volu);
+ ldm_free_vblks (&ldb->v_comp);
+ ldm_free_vblks (&ldb->v_part);
out:
- kfree(ph);
- kfree(toc);
- kfree(vm);
- kfree(dk);
+ kfree (ldb);
return err;
-no_mem:
- printk(LDM_CRIT "Not enough memory to allocate required buffers.\n");
- err = -1;
- goto out;
}
-
--- NEW FILE ---
diff -urN linux-2.5.23/Documentation/ldm.txt linux-2.5.23-ldm/Documentation/ldm.txt
--- linux-2.5.23/Documentation/ldm.txt Thu Jan 1 01:00:00 1970
+++ linux-2.5.23-ldm/Documentation/ldm.txt Fri Jun 21 12:49:17 2002
@@ -0,0 +1,102 @@
+
+ LDM - Logical Disk Manager (Dynamic Disks)
+ ------------------------------------------
+
+Overview
+--------
+
+Windows 2000 and XP use a new partitioning scheme. It is a complete
+replacement for the MSDOS style partitions. It stores its information in a
+1MiB journalled database at the end of the physical disk. The size of
+partitions is limited only by disk space. The maximum number of partitions is
+nearly 2000.
+
+Any partitions created under the LDM are called "Dynamic Disks". There are no
+longer any primary or extended partitions. Normal MSDOS style partitions are
[...2799 lines suppressed...]
+};
+
+struct ldmdb { /* Cache of the database */
+ struct privhead ph;
+ struct tocblock toc;
+ struct vmdb vm;
+ struct list_head v_dgrp;
+ struct list_head v_disk;
+ struct list_head v_volu;
+ struct list_head v_comp;
+ struct list_head v_part;
};
-int ldm_partition(struct gendisk *hd, struct block_device *bdev,
- unsigned long first_sector, int first_part_minor);
+int ldm_partition (struct gendisk *hd, struct block_device *bdev,
+ unsigned long first_sector, int first_minor);
#endif /* _FS_PT_LDM_H_ */
--- NEW FILE ---
diff -urN linux-2.5.24/Documentation/ldm.txt linux-2.5.24-ldm/Documentation/ldm.txt
--- linux-2.5.24/Documentation/ldm.txt Thu Jan 1 01:00:00 1970
+++ linux-2.5.24-ldm/Documentation/ldm.txt Fri Jun 21 12:49:17 2002
@@ -0,0 +1,102 @@
+
+ LDM - Logical Disk Manager (Dynamic Disks)
+ ------------------------------------------
+
+Overview
+--------
+
+Windows 2000 and XP use a new partitioning scheme. It is a complete
+replacement for the MSDOS style partitions. It stores its information in a
+1MiB journalled database at the end of the physical disk. The size of
+partitions is limited only by disk space. The maximum number of partitions is
+nearly 2000.
+
+Any partitions created under the LDM are called "Dynamic Disks". There are no
+longer any primary or extended partitions. Normal MSDOS style partitions are
[...2799 lines suppressed...]
+};
+
+struct ldmdb { /* Cache of the database */
+ struct privhead ph;
+ struct tocblock toc;
+ struct vmdb vm;
+ struct list_head v_dgrp;
+ struct list_head v_disk;
+ struct list_head v_volu;
+ struct list_head v_comp;
+ struct list_head v_part;
};
-int ldm_partition(struct gendisk *hd, struct block_device *bdev,
- unsigned long first_sector, int first_part_minor);
+int ldm_partition (struct gendisk *hd, struct block_device *bdev,
+ unsigned long first_sector, int first_minor);
#endif /* _FS_PT_LDM_H_ */
--- NEW FILE ---
If you want to add the latest LDM driver to the kernel you can use the patches
in this directory.
Patch For Kernel
linux-2.4.18-ldm 2.4.17 or 2.4.18
linux-2.4.19-pre10-ldm 2.4.19-pre10 or later
linux-2.5.23-ldm 2.5.23 or earlier
linux-2.5.24-ldm 2.5.24 or later
--- NEW FILE ---
--- src/ldm.c Fri Jun 21 15:37:16 2002
+++ kernel/ldm.c Sun Jun 23 17:12:45 2002
@@ -32,19 +32,6 @@
#include "check.h"
#include "msdos.h"
-#ifdef CONFIG_LDM_EXPORT_SYMBOLS
-# define static
-#endif
-
-#ifdef CONFIG_BLK_DEV_MD
-extern void md_autodetect_dev (kdev_t dev);
-#endif
-
-#ifdef CONFIG_LDM_MD
-extern void ldm_md_addpart (const u8 *dg_guid, u32 objid, u8 comptype,
- u8 n, u8 parts, u8 chunk_s, kdev_t dev);
-#endif
-
typedef enum {
FALSE = 0,
TRUE = 1
@@ -603,32 +590,6 @@
}
/**
- * ldm_find_vblk - Search a linked list of VBLKs for a given object id
- * @lh_vl: Head of a linked list of VBLKs
- * @id: Object id to find
- *
- * Return: Pointer, A matching vblk was found
- * NULL, No match, or an error
- */
-#ifdef CONFIG_BLK_DEV_MD
-static struct vblk * ldm_find_vblk (const struct list_head *lh_vl, u64 id)
-{
- struct list_head *item;
-
- BUG_ON (!lh_vl);
-
- list_for_each (item, lh_vl) {
- struct vblk *vb = list_entry (item, struct vblk, list);
- if (vb->obj_id == id)
- return vb;
- }
-
- ldm_debug ("Search for vblk #%llu failed!", (unsigned long long) id);
- return NULL;
-}
-#endif
-
-/**
* ldm_get_disk_objid - Search a linked list of vblk's for a given Disk Id
* @ldb: ldmdb struct
*
@@ -732,10 +693,6 @@
/* Create the data partitions */
list_for_each (item, &ldb->v_part) {
struct vblk *vb;
-#ifdef CONFIG_BLK_DEV_MD /* CONFIG_LDM_MD implies CONFIG_BLK_DEV_MD */
- struct vblk *v, *c;
- const kdev_t dev = mk_kdev (hd->major, minor);
-#endif
vb = list_entry (item, struct vblk, list);
part = &vb->vblk.part;
@@ -746,33 +703,6 @@
part->start + ldb->ph.logical_disk_start, part->size))
continue; /* Already logged */
minor++;
-#ifdef CONFIG_BLK_DEV_MD
- /* Try to get parent component */
- c = ldm_find_vblk (&ldb->v_comp, part->parent_id);
- if (!c) {
- ldm_error ("Can't find VBLK's parent (component).");
- continue;
- }
-
- /* Try to get parent volume */
- v = ldm_find_vblk (&ldb->v_volu, c->vblk.comp.parent_id);
- if (v == NULL) {
- ldm_error ("Can't find VBLK's parent (volume).");
- continue;
- }
-
- /* Notify md of RAID autodetect part types */
- if (v->vblk.volu.partition_type == LINUX_RAID_PARTITION) {
- md_autodetect_dev (dev);
- continue;
- }
- /* Register to LDM_MD */
-#ifdef CONFIG_LDM_MD
- ldm_md_addpart (v->vblk.volu.guid, c->obj_id,
- c->vblk.comp.type, part->partnum, c->vblk.comp.children,
- c->vblk.comp.chunksize / (4096 / 512), dev);
-#endif
-#endif
}
printk ("\n");
|