[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ntfs-cvs
Subject:    [Linux-NTFS-cvs] CVS: dynamic-disk/linux/fs/partitions check.c,1.2.2.3,1.2.2.4 check.h,1.1.1.1,1.1.1
From:       Richard Russon <flatcap () users ! sourceforge ! net>
Date:       2001-10-08 12:47:15
[Download RAW message or body]


Changes by: flatcap

Update of /cvsroot/linux-ntfs/dynamic-disk/linux/fs/partitions
In directory usw-pr-cvs1:/tmp/cvs-serv29963/linux/fs/partitions

Modified Files:
      Tag: kernel-latest
	check.c check.h ldm.c ldm.h 
Log Message:
Al Viro's changes


Index: check.c
===================================================================
RCS file: /cvsroot/linux-ntfs/dynamic-disk/linux/fs/partitions/check.c,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -U2 -r1.2.2.3 -r1.2.2.4
--- check.c	2001/10/08 12:41:15	1.2.2.3
+++ check.c	2001/10/08 12:47:13	1.2.2.4
@@ -39,5 +39,5 @@
 int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/
 
-static int (*check_part[])(struct gendisk *hd, kdev_t dev, unsigned long first_sect, \
int first_minor) = { +static int (*check_part[])(struct gendisk *hd, struct \
block_device *bdev, unsigned long first_sect, int first_minor) = {  #ifdef \
CONFIG_ACORN_PARTITION  acorn_partition,
@@ -178,4 +178,13 @@
  		return buf;
  	}
+	if (hd->major == ATARAID_MAJOR) {
+		int disk = minor >> hd->minor_shift;
+		int part = minor & (( 1 << hd->minor_shift) - 1);
+		if (part == 0)
+			sprintf(buf, "%s/d%d", maj, disk);
+		else
+			sprintf(buf, "%s/d%dp%d", maj, disk, part);
+		return buf;
+	}
 	if (part)
 		sprintf(buf, "%s%c%d", maj, unit+'a', part);
@@ -207,47 +216,4 @@
 }
 
-unsigned int get_ptable_blocksize(kdev_t dev)
-{
-	int ret = 1024;
-
-	/*
-	 * See whether the low-level driver has given us a minumum blocksize.
-	 * If so, check to see whether it is larger than the default of 1024.
-	 */
-	if (!blksize_size[MAJOR(dev)])
-		return ret;
-
-	/*
-	 * Check for certain special power of two sizes that we allow.
-	 * With anything larger than 1024, we must force the blocksize up to
-	 * the natural blocksize for the device so that we don't have to try
-	 * and read partial sectors.  Anything smaller should be just fine.
-	 */
-
-	switch (blksize_size[MAJOR(dev)][MINOR(dev)]) {
-		case 2048:
-			ret = 2048;
-			break;
-		case 4096:
-			ret = 4096;
-			break;
-		case 8192:
-			ret = 8192;
-			break;
-		case 1024:
-		case 512:
-		case 256:
-		case 0:
-			/*
-			 * These are all OK.
-			 */
-			break;
-		default:
-			panic("Strange blocksize for partition table\n");
-	}
-
-	return ret;
-}
-
 static void check_partition(struct gendisk *hd, kdev_t dev, int first_part_minor)
 {
@@ -255,4 +221,5 @@
 	static int first_time = 1;
 	unsigned long first_sector;
+	struct block_device *bdev;
 	char buf[64];
 	int i;
@@ -279,10 +246,21 @@
 	else
 		printk(KERN_INFO " %s:", disk_name(hd, MINOR(dev), buf));
-	for (i = 0; check_part[i]; i++)
-		if (check_part[i](hd, dev, first_sector, first_part_minor))
+	bdev = bdget(kdev_t_to_nr(dev));
+	bdev->bd_inode->i_size = (loff_t)hd->part[MINOR(dev)].nr_sects << 9;
+	for (i = 0; check_part[i]; i++) {
+		int res;
+		res = check_part[i](hd, bdev, first_sector, first_part_minor);
+		if (res) {
+			if (res < 0 &&  warn_no_part)
+				printk(" unable to read partition table\n");
 			goto setup_devfs;
+		}
+	}
 
 	printk(" unknown partition table\n");
 setup_devfs:
+	invalidate_bdev(bdev, 1);
+	truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
+	bdput(bdev);
 	i = first_part_minor - 1;
 	devfs_register_partitions (hd, i, hd->sizes ? 0 : 1);
@@ -419,3 +397,26 @@
 		blk_size[dev->major] = dev->sizes;
 	}
+}
+
+unsigned char *read_dev_sector(struct block_device *bdev, unsigned long n, Sector \
*p) +{
+	struct address_space *mapping = bdev->bd_inode->i_mapping;
+	int sect = PAGE_CACHE_SIZE / 512;
+	struct page *page;
+
+	page = read_cache_page(mapping, n/sect,
+			(filler_t *)mapping->a_ops->readpage, NULL);
+	if (!IS_ERR(page)) {
+		wait_on_page(page);
+		if (!Page_Uptodate(page))
+			goto fail;
+		if (PageError(page))
+			goto fail;
+		p->v = page;
+		return (unsigned char *)page_address(page) + 512 * (n % sect);
+fail:
+		page_cache_release(page);
+	}
+	p->v = NULL;
+	return NULL;
 }

Index: check.h
===================================================================
RCS file: /cvsroot/linux-ntfs/dynamic-disk/linux/fs/partitions/check.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -U2 -r1.1.1.1 -r1.1.1.1.2.1
--- check.h	2001/06/16 20:29:39	1.1.1.1
+++ check.h	2001/10/08 12:47:13	1.1.1.1.2.1
@@ -5,8 +5,12 @@
 void add_gd_partition(struct gendisk *hd, int minor, int start, int size);
 
-/*
- * Get the default block size for this device
- */
-unsigned int get_ptable_blocksize(kdev_t dev);
+typedef struct {struct page *v;} Sector;
+
+unsigned char *read_dev_sector(struct block_device *, unsigned long, Sector *);
+
+static inline void put_dev_sector(Sector p)
+{
+	page_cache_release(p.v);
+}
 
 extern int warn_no_part;

Index: ldm.c
===================================================================
RCS file: /cvsroot/linux-ntfs/dynamic-disk/linux/fs/partitions/ldm.c,v
retrieving revision 1.25.2.4
retrieving revision 1.25.2.5
diff -U2 -r1.25.2.4 -r1.25.2.5
--- ldm.c	2001/09/09 12:42:10	1.25.2.4
+++ ldm.c	2001/10/08 12:47:13	1.25.2.5
@@ -179,8 +179,10 @@
 static int create_data_partitions(struct gendisk *hd,
 		const unsigned long first_sector, int first_part_minor,
-		const kdev_t dev, const struct vmdb *vm,
-		const struct privhead *ph, const struct ldmdisk *dk)
+		struct block_device *bdev, const struct vmdb *vm,
+		const struct privhead *ph, const struct ldmdisk *dk,
+		unsigned long base)
 {
-	struct buffer_head *bh;
+	Sector  sect;
+	unsigned char *data;
 	struct vblk *vb;
 	int vblk;
@@ -193,12 +195,12 @@
 		goto no_mem;
 	vsize   = vm->vblk_size;
-	if (vsize < 1 || vsize > LDM_BLOCKSIZE)
+	if (vsize < 1 || vsize > 512)
 		goto err_out;
-	perbuf  = LDM_BLOCKSIZE / vsize;
-	if (perbuf < 1 || LDM_BLOCKSIZE % vsize)
+	perbuf  = 512 / vsize;
+	if (perbuf < 1 || 512 % vsize)
 		goto err_out;
 					/* 512 == VMDB size */
-	lastbuf = (vm->last_vblk_seq - (512 / vsize)) / perbuf;
-	lastofs = (vm->last_vblk_seq - (512 / vsize)) % perbuf;
+	lastbuf = vm->last_vblk_seq / perbuf - 1;
+	lastofs = vm->last_vblk_seq % perbuf;
 	if (lastofs)
 		lastbuf++;
@@ -208,5 +210,6 @@
 	printk(" <");
 	for (buffer = 0; buffer < lastbuf; buffer++) {
-		if (!(bh = bread(dev, buffer + OFF_VBLK, LDM_BLOCKSIZE)))
+		data = read_dev_sector(bdev, base + 2*OFF_VBLK + buffer, &sect);
+		if (!data)
 			goto read_err;
 		for (vblk = 0; vblk < perbuf; vblk++) {
@@ -215,8 +218,8 @@
 			if (lastofs && buffer == lastbuf - 1 && vblk >= lastofs)
 				break;
-			block = bh->b_data + vsize * vblk;
-			if (block + vsize > (u8*)bh->b_data + LDM_BLOCKSIZE)
+			block = data + vsize * vblk;
+			if (block + vsize > data + 512)
 				goto brelse_out;
-			if (parse_vblk(block, LDM_BLOCKSIZE, vb) != 1)
+			if (parse_vblk(block, vsize, vb) != 1)
 				continue;
 			if (vb->vblk_type != VBLK_PART)
@@ -230,5 +233,5 @@
 				first_part_minor++;
 		}
-		brelse(bh);
+		put_dev_sector(sect);
 	}
 	printk(" >\n");
@@ -238,5 +241,5 @@
 	return err;
 brelse_out:
-	brelse(bh);
+	put_dev_sector(sect);
 	goto err_out;
 no_mem:
@@ -327,8 +330,10 @@
  * Return 1 on success and -1 on error, in which case @dk is undefined.
  */
-static int get_disk_objid(const kdev_t dev, const struct vmdb *vm,
-		const struct privhead *ph, struct ldmdisk *dk)
+static int get_disk_objid(struct block_device *bdev, const struct vmdb *vm,
+		const struct privhead *ph, struct ldmdisk *dk,
+		unsigned long base)
 {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	u8 *disk_id;
 	int vblk;
@@ -341,12 +346,12 @@
 		goto no_mem;
 	vsize   = vm->vblk_size;
-	if (vsize < 1 || vsize > LDM_BLOCKSIZE)
+	if (vsize < 1 || vsize > 512)
 		goto err_out;
-	perbuf  = LDM_BLOCKSIZE / vsize;
-	if (perbuf < 1 || LDM_BLOCKSIZE % vsize)
+	perbuf  = 512 / vsize;
+	if (perbuf < 1 || 512 % vsize)
 		goto err_out;
 					/* 512 == VMDB size */
-	lastbuf = (vm->last_vblk_seq - (512 / vsize)) / perbuf;
-	lastofs = (vm->last_vblk_seq - (512 / vsize)) % perbuf;
+	lastbuf = vm->last_vblk_seq / perbuf - 1;
+	lastofs = vm->last_vblk_seq % perbuf;
 	if (lastofs)
 		lastbuf++;
@@ -355,5 +360,6 @@
 		goto err_out;
 	for (buffer = 0; buffer < lastbuf; buffer++) {
-		if (!(bh = bread(dev, buffer + OFF_VBLK, LDM_BLOCKSIZE)))
+		data = read_dev_sector(bdev, base + 2*OFF_VBLK + buffer, &sect);
+		if (!data)
 			goto read_err;
 		for (vblk = 0; vblk < perbuf; vblk++) {
@@ -363,7 +369,7 @@
 			if (lastofs && buffer == lastbuf - 1 && vblk >= lastofs)
 				break;
-			block = bh->b_data + vblk * vsize;
+			block = data + vblk * vsize;
 			delta = vblk * vsize + 0x18;
-			if (delta >= LDM_BLOCKSIZE)
+			if (delta >= 512)
 				goto brelse_out;
 			if (block[0x13] != VBLK_DISK)
@@ -371,10 +377,9 @@
 			/* Calculate relative offsets. */
 			rel_objid = 1 + block[0x18];
-			if (delta + rel_objid >= LDM_BLOCKSIZE)
+			if (delta + rel_objid >= 512)
 				goto brelse_out;
 			rel_name  = 1 + block[0x18 + rel_objid] + rel_objid;
-			if (delta + rel_name >= LDM_BLOCKSIZE ||
-			    delta + rel_name + block[0x18 + rel_name] >=
-					LDM_BLOCKSIZE)
+			if (delta + rel_name >= 512 ||
+			    delta + rel_name + block[0x18 + rel_name] >= 512)
 				goto brelse_out;
 			err = get_vstr(block + 0x18 + rel_name, disk_id,
@@ -384,5 +389,5 @@
 			if (!strncmp(disk_id, ph->disk_id, DISK_ID_SIZE)) {
 				dk->obj_id = get_vnum(block + 0x18, &err);
-				brelse(bh);
+				put_dev_sector(sect);
 				if (err)
 					goto out;
@@ -394,5 +399,5 @@
 			}
 		}
-		brelse(bh);
+		put_dev_sector(sect);
 	}
 	err = -1;
@@ -401,5 +406,5 @@
 	return err;
 brelse_out:
-	brelse(bh);
+	put_dev_sector(sect);
 	goto err_out;
 no_mem:
@@ -458,15 +463,17 @@
  * Return 1 on success and -1 on error, in which case @vm is undefined.
  */
-static int validate_vmdb(const kdev_t dev, struct vmdb *vm)
+static int validate_vmdb(struct block_device *bdev, struct vmdb *vm, unsigned long \
base)  {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	int ret;
 
-	if (!(bh = bread(dev, OFF_VMDB, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_VMDB * 2 + 1, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read failed in validate_vmdb.\n");
 		return -1;
 	}
-	ret = parse_vmdb(bh->b_data + 0x200, vm);
-	brelse(bh);
+	ret = parse_vmdb(data, vm);
+	put_dev_sector(sect);
 	return ret;
 }
@@ -554,7 +561,10 @@
  * Return 1 on success and -1 on error, in which case @toc1 is undefined.
  */
-static int validate_tocblocks(const kdev_t devdb, struct tocblock *toc1)
+static int validate_tocblocks(struct block_device *bdev,
+			struct tocblock *toc1,
+			unsigned long base)
 {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	struct tocblock *toc2 = NULL, *toc3 = NULL, *toc4 = NULL;
 	int err;
@@ -570,37 +580,41 @@
 		goto no_mem;
 	/* Read and parse first toc. */
-	if (!(bh = bread(devdb, OFF_TOCBLOCK1, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_TOCBLOCK1 * 2 + 1, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 1 failed in validate_tocblocks.\n");
 		goto err_out;
 	}
-	err = parse_tocblock(bh->b_data + 0x0200, toc1);
-	brelse(bh);
+	err = parse_tocblock(data, toc1);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
 	/* Read and parse second toc. */
-	if (!(bh = bread(devdb, OFF_TOCBLOCK2, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_TOCBLOCK2 * 2, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 2 failed in validate_tocblocks.\n");
 		goto err_out;
 	}
-	err = parse_tocblock(bh->b_data, toc2);
-	brelse(bh);
+	err = parse_tocblock(data, toc2);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
 	/* Read and parse third toc. */
-	if (!(bh = bread(devdb, OFF_TOCBLOCK3, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_TOCBLOCK3 * 2 + 1, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 3 failed in validate_tocblocks.\n");
 		goto err_out;
 	}
-	err = parse_tocblock(bh->b_data + 0x0200, toc3);
-	brelse(bh);
+	err = parse_tocblock(data, toc3);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
 	/* Read and parse fourth toc. */
-	if (!(bh = bread(devdb, OFF_TOCBLOCK4, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_TOCBLOCK4 * 2, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 4 failed in validate_tocblocks.\n");
 		goto err_out;
 	}
-	err = parse_tocblock(bh->b_data, toc4);
-	brelse(bh);
+	err = parse_tocblock(data, toc4);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
@@ -666,7 +680,10 @@
  * Return 1 on succes and -1 on error.
  */
-static int validate_privheads(const kdev_t dev, const struct privhead *ph1)
+static int validate_privheads(struct block_device *bdev,
+			      const struct privhead *ph1,
+			      unsigned long base)
 {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	struct privhead *ph2 = NULL, *ph3 = NULL;
 	int err;
@@ -678,18 +695,20 @@
 	if (!ph3)
 		goto no_mem;
-	if (!(bh = bread(dev, OFF_PRIVHEAD2, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_PRIVHEAD2 * 2, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 1 failed in validate_privheads.\n");
 		goto err_out;
 	}
-	err = parse_privhead(bh->b_data, ph2);
-	brelse(bh);
+	err = parse_privhead(data, ph2);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
-	if (!(bh = bread(dev, OFF_PRIVHEAD3, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, base + OFF_PRIVHEAD3 * 2 + 1, &sect);
+	if (!data) {
 		printk(LDM_CRIT "Disk read 2 failed in validate_privheads.\n");
 		goto err_out;
 	}
-	err = parse_privhead(bh->b_data + 0x0200, ph3);
-	brelse(bh);
+	err = parse_privhead(data, ph3);
+	put_dev_sector(sect);
 	if (err != 1)
 		goto out;
@@ -808,25 +827,27 @@
  * Return 1 on succes, 0 if device is not a dynamic disk and -1 on error.
  */
-static int create_db_partition(struct gendisk *hd, const kdev_t dev,
+static int create_db_partition(struct gendisk *hd, struct block_device *bdev,
 		const unsigned long first_sector, const int first_part_minor,
 		struct privhead *ph)
 {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	int err;
 
-	if (!(bh = bread(dev, OFF_PRIVHEAD1, LDM_BLOCKSIZE))) {
+	data = read_dev_sector(bdev, OFF_PRIVHEAD1*2, &sect);
+	if (!data) {
 		printk(LDM_CRIT __FUNCTION__ "(): Device read failed.\n");
 		return -1;
 	}
-	if (BE64(bh->b_data) != MAGIC_PRIVHEAD) {
+	if (BE64(data) != MAGIC_PRIVHEAD) {
 		ldm_debug("Cannot find PRIVHEAD structure. Not a dynamic disk "
 				"or corrupt LDM database.\n");
 		return 0;
 	}
-	err = parse_privhead(bh->b_data, ph);
+	err = parse_privhead(data, ph);
 	if (err == 1)
 		err = create_partition(hd, first_part_minor, first_sector +
 				ph->config_start, ph->config_size);
-	brelse(bh);
+	put_dev_sector(sect);
 	return err;
 }
@@ -843,21 +864,21 @@
  * Return 1 if @dev is a dynamic disk, 0 if not and -1 on error.
  */
-static int validate_partition_table(const kdev_t dev)
+static int validate_partition_table(struct block_device *bdev)
 {
-	struct buffer_head *bh;
+	Sector sect;
+	unsigned char *data;
 	struct partition *p;
 	int i, nr_sfs;
 
-	if (!(bh = bread(dev, 0, LDM_BLOCKSIZE))) {
-		if (warn_no_part)
-			printk(LDM_ERR "Unable to read partition table.\n");
+	data = read_dev_sector(bdev, 0, &sect);
+	if (!data)
 		return -1;
-	}
-	if (*(u16*)(bh->b_data + 0x01FE) != cpu_to_le16(MSDOS_LABEL_MAGIC)) {
+
+	if (*(u16*)(data + 0x01FE) != cpu_to_le16(MSDOS_LABEL_MAGIC)) {
 		ldm_debug("No MS-DOS partition found.\n");
 		goto no_msdos_partition;
 	}
 	nr_sfs = 0;
-	p = (struct partition*)(bh->b_data + 0x01BE);
+	p = (struct partition*)(data + 0x01BE);
 	for (i = 0; i < 4; i++) {
 		if (!SYS_IND(p+i) || SYS_IND(p+i) == WIN2K_EXTENDED_PARTITION)
@@ -872,10 +893,10 @@
 		goto not_dynamic_disk;
 	ldm_debug("Parsed partition table successfully.\n");
-	brelse(bh);
+	put_dev_sector(sect);
 	return 1;
 not_dynamic_disk:
 	ldm_debug("Found basic MS-DOS partition, not a dynamic disk.\n");
 no_msdos_partition:
-	brelse(bh);
+	put_dev_sector(sect);
 	return 0;
 }
@@ -905,30 +926,18 @@
  *	-1 if an error occured.
  */
-int ldm_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector,
-		int first_part_minor)
+int ldm_partition(struct gendisk *hd, struct block_device *bdev,
+		unsigned long first_sector, int first_part_minor)
 {
-	kdev_t devdb;
 	struct privhead *ph  = NULL;
 	struct tocblock *toc = NULL;
 	struct vmdb     *vm  = NULL;
 	struct ldmdisk  *dk  = NULL;
+	unsigned long db_first;
 	int err;
 
 	if (!hd)
 		return 0;
-	err = (int)get_ptable_blocksize(dev);
-	if (err != LDM_BLOCKSIZE) {	/* 1024 bytes */
-		ldm_debug("Expected a blocksize of %d bytes, got %d instead.\n",
-				LDM_BLOCKSIZE, get_ptable_blocksize(dev));
-		return 0;
-	}
-	err = get_hardsect_size(dev); 
-	if (err != 512) {
-		ldm_debug("Expected a sector size of %d bytes, got %d "
-				"instead.\n", 512, get_hardsect_size(dev));
-		return 0;
-	}
 	/* Check the partition table. */
-	err = validate_partition_table(dev);
+	err = validate_partition_table(bdev);
 	if (err != 1)
 		return err;
@@ -936,11 +945,10 @@
 		goto no_mem;
 	/* Create the LDM database device. */
-	err = create_db_partition(hd, dev, first_sector, first_part_minor, ph);
+	err = create_db_partition(hd, bdev, first_sector, first_part_minor, ph);
 	if (err != 1)
 		goto out;
-	/* For convenience, work with the LDM database device from now on. */
-	devdb = MKDEV(MAJOR(dev), first_part_minor);
+	db_first = hd->part[first_part_minor].start_sect;
 	/* Check the backup privheads. */
-	err = validate_privheads(devdb, ph);
+	err = validate_privheads(bdev, ph, db_first);
 	if (err != 1)
 		goto out;
@@ -948,5 +956,5 @@
 	if (!(toc = (struct tocblock*)kmalloc(sizeof(*toc), GFP_KERNEL)))
 		goto no_mem;
-	err = validate_tocblocks(devdb, toc);
+	err = validate_tocblocks(bdev, toc, db_first);
 	if (err != 1)
 		goto out;
@@ -954,5 +962,5 @@
 	if (!(vm = (struct vmdb*)kmalloc(sizeof(*vm), GFP_KERNEL)))
 		goto no_mem;
-	err = validate_vmdb(devdb, vm);
+	err = validate_vmdb(bdev, vm, db_first);
 	if (err != 1)
 		goto out;
@@ -960,10 +968,10 @@
 	if (!(dk = (struct ldmdisk*)kmalloc(sizeof(*dk), GFP_KERNEL)))
 		goto no_mem;
-	err = get_disk_objid(devdb, vm, ph, dk);
+	err = get_disk_objid(bdev, vm, ph, dk, db_first);
 	if (err != 1)
 		goto out;
 	/* Finally, create the data partition devices. */
 	err = create_data_partitions(hd, first_sector, first_part_minor +
-			LDM_FIRST_PART_OFFSET, devdb, vm, ph, dk);
+			LDM_FIRST_PART_OFFSET, bdev, vm, ph, dk, db_first);
 	if (err == 1)
 		ldm_debug("Parsed LDM database successfully.\n");

Index: ldm.h
===================================================================
RCS file: /cvsroot/linux-ntfs/dynamic-disk/linux/fs/partitions/ldm.h,v
retrieving revision 1.13.2.3
retrieving revision 1.13.2.4
diff -U2 -r1.13.2.3 -r1.13.2.4
--- ldm.h	2001/08/13 01:28:01	1.13.2.3
+++ ldm.h	2001/10/08 12:47:13	1.13.2.4
@@ -145,6 +145,6 @@
 };
 
-int ldm_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector,
-		int first_part_minor);
+int ldm_partition(struct gendisk *hd, struct block_device *bdev,
+		unsigned long first_sector, int first_part_minor);
 
 #endif /* _FS_PT_LDM_H_ */


_______________________________________________
Linux-NTFS-cvs mailing list
Linux-NTFS-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-ntfs-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic