lkml.org 
[lkml]   [1999]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] minor pre5-2.3.9 fixes

On Sat, 26 Jun 1999, Linus Torvalds wrote:

> > Anyway, I'll reboot into my current kernel, verify that it works (and that
> > none of my asserts trigger), and make a pre-5 so that we can synch up.
>
> Rebooted, verified, looks good.

hm, not so good here, didnt even boot because genhd.c had some ugly code
that now gets properly caught by make_request(). I'm not sure wether the
attached patch is the best solution - but my system boots with it.

-- mingo
--- linux/drivers/block/genhd.c.orig Sun Jun 27 01:26:37 1999
+++ linux/drivers/block/genhd.c Sun Jun 27 01:41:37 1999
@@ -285,10 +285,10 @@
hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size;
this_sector = first_sector + START_SECT(p) * sector_size;
dev = MKDEV(hd->major, current_minor);
- brelse(bh);
+ bforget(bh);
}
done:
- brelse(bh);
+ bforget(bh);
}

#ifdef CONFIG_SOLARIS_X86_PARTITION
@@ -304,13 +304,13 @@
return;
v = (struct solaris_x86_vtoc *)(bh->b_data + 512);
if(v->v_sanity != SOLARIS_X86_VTOC_SANE) {
- brelse(bh);
+ bforget(bh);
return;
}
printk(" <solaris:");
if(v->v_version != 1) {
printk(" cannot handle version %ld vtoc>", v->v_version);
- brelse(bh);
+ bforget(bh);
return;
}
for(i=0; i<SOLARIS_X86_NUMSLICE; i++) {
@@ -326,7 +326,7 @@
add_partition(hd, current_minor, s->s_start+offset, s->s_size);
current_minor++;
}
- brelse(bh);
+ bforget(bh);
printk(" >");
}
#endif
@@ -389,7 +389,7 @@
bh->b_state = 0;
l = (struct bsd_disklabel *) (bh->b_data+512);
if (l->d_magic != BSD_DISKMAGIC) {
- brelse(bh);
+ bforget(bh);
return;
}

@@ -402,7 +402,7 @@
if (p->p_fstype != BSD_FS_UNUSED)
check_and_add_bsd_partition(hd, p, dev);
}
- brelse(bh);
+ bforget(bh);

}
#endif
@@ -425,7 +425,7 @@
l = (struct unixware_disklabel *) (bh->b_data+512);
if (le32_to_cpu(l->d_magic) != UNIXWARE_DISKMAGIC ||
le32_to_cpu(l->vtoc.v_magic) != UNIXWARE_DISKMAGIC2) {
- brelse(bh);
+ bforget(bh);
return;
}
printk(" <unixware:");
@@ -441,7 +441,7 @@
}
p++;
}
- brelse(bh);
+ bforget(bh);
printk(" >");
}
#endif
@@ -477,7 +477,7 @@
check_table:
#endif
if (*(unsigned short *) (0x1fe + data) != cpu_to_le16(MSDOS_LABEL_MAGIC)) {
- brelse(bh);
+ bforget(bh);
return 0;
}
p = (struct partition *) (0x1be + data);
@@ -515,7 +515,7 @@
* adjustments to fool fdisk/LILO and partition check.
*/
if (ide_xlate_1024(dev, 1, " [DM6:DDO]")) {
- brelse(bh);
+ bforget(bh);
goto read_mbr; /* start over with new MBR */
}
} else if (sig <= 0x1ae &&
@@ -627,7 +627,7 @@
}
}
printk("\n");
- brelse(bh);
+ bforget(bh);
return 1;
}

@@ -682,12 +682,12 @@
partition = label->d_partitions;
if (label->d_magic != DISKLABELMAGIC) {
printk("magic: %08x\n", label->d_magic);
- brelse(bh);
+ bforget(bh);
return 0;
}
if (label->d_magic2 != DISKLABELMAGIC) {
printk("magic2: %08x\n", label->d_magic2);
- brelse(bh);
+ bforget(bh);
return 0;
}
for (i = 0 ; i < label->d_npartitions; i++, partition++) {
@@ -700,7 +700,7 @@
current_minor++;
}
printk("\n");
- brelse(bh);
+ bforget(bh);
return 1;
}

@@ -747,7 +747,7 @@
if (be16_to_cpu(label->magic) != SUN_LABEL_MAGIC) {
printk("Dev %s Sun disklabel: bad magic %04x\n",
kdevname(dev), be16_to_cpu(label->magic));
- brelse(bh);
+ bforget(bh);
return 0;
}
/* Look at the checksum */
@@ -757,7 +757,7 @@
if(csum) {
printk("Dev %s Sun disklabel: Csum bad, label corrupted\n",
kdevname(dev));
- brelse(bh);
+ bforget(bh);
return 0;
}
/* All Sun disks have 8 partition entries */
@@ -773,7 +773,7 @@
current_minor++;
}
printk("\n");
- brelse(bh);
+ bforget(bh);
return 1;
}

@@ -821,7 +821,7 @@
if(be32_to_cpu(magic) != SGI_LABEL_MAGIC) {
printk("Dev %s SGI disklabel: bad magic %08x\n",
kdevname(dev), magic);
- brelse(bh);
+ bforget(bh);
return 0;
}
ui = ((unsigned int *) (label + 1)) - 1;
@@ -832,7 +832,7 @@
if(csum) {
printk("Dev %s SGI disklabel: csum bad, label corrupted\n",
kdevname(dev));
- brelse(bh);
+ bforget(bh);
return 0;
}
/* All SGI disk labels have 16 partitions, disks under Linux only
@@ -849,7 +849,7 @@
current_minor++;
}
printk("\n");
- brelse(bh);
+ bforget(bh);
return 1;
}

@@ -903,7 +903,7 @@
*(u32 *)(&bh->b_data[0xdc]) = 0;
if (checksum_block((u32 *)bh->b_data,
htonl(rdb->rdb_SummedLongs) & 0x7F)) {
- brelse(bh);
+ bforget(bh);
printk("Dev %s: RDB in block %d has bad checksum\n",
kdevname(dev),blk);
continue;
@@ -913,7 +913,7 @@
}
printk(" RDSK");
blk = htonl(rdb->rdb_PartitionList);
- brelse(bh);
+ bforget(bh);
for (part = 1; blk > 0 && part <= 16; part++) {
if (!(bh = bread(dev,blk,blocksize))) {
printk("Dev %s: unable to read partition block %d\n",
@@ -940,7 +940,7 @@
current_minor++;
res = 1;
}
- brelse(bh);
+ bforget(bh);
}
printk("\n");
break;
@@ -1021,12 +1021,12 @@
}
md = (struct mac_driver_desc *) bh->b_data;
if (be16_to_cpu(md->signature) != MAC_DRIVER_MAGIC) {
- brelse(bh);
+ bforget(bh);
return 0;
}
secsize = be16_to_cpu(md->block_size);
if (secsize >= dev_bsize) {
- brelse(bh);
+ bforget(bh);
dev_pos = secsize;
if ((bh = bread(dev, secsize/dev_bsize, dev_bsize)) == 0) {
printk("%s: error reading partition table\n",
@@ -1036,14 +1036,14 @@
}
part = (struct mac_partition *) (bh->b_data + secsize - dev_pos);
if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) {
- brelse(bh);
+ bforget(bh);
return 0; /* not a MacOS disk */
}
blocks_in_map = be32_to_cpu(part->map_count);
for (blk = 1; blk <= blocks_in_map; ++blk) {
pos = blk * secsize;
if (pos >= dev_pos + dev_bsize) {
- brelse(bh);
+ bforget(bh);
dev_pos = pos;
if ((bh = bread(dev, pos/dev_bsize, dev_bsize)) == 0) {
printk("%s: error reading partition table\n",
@@ -1074,7 +1074,7 @@

++current_minor;
}
- brelse(bh);
+ bforget(bh);
printk("\n");
return 1;
}
@@ -1133,7 +1133,7 @@
if (!xbh)
{
printk (" block %ld read failed\n", partsect);
- brelse(bh);
+ bforget(bh);
return 0;
}
if (partsect & 1)
@@ -1152,17 +1152,17 @@

if (!(xrs->part[1].flg & 1)) {
/* end of linked partition list */
- brelse( xbh );
+ bforget( xbh );
break;
}
if (memcmp( xrs->part[1].id, "XGM", 3 ) != 0) {
printk( "\nID of extended partition is not XGM!\n" );
- brelse( xbh );
+ bforget( xbh );
break;
}

partsect = xrs->part[1].st + extensect;
- brelse (xbh);
+ bforget (xbh);
minor++;
if (minor >= m_lim) {
printk( "\nMaximum number of partitions reached!\n" );
@@ -1208,7 +1208,7 @@
}
}
#endif
- brelse (bh);
+ bforget (bh);

printk ("\n");
\
 
 \ /
  Last update: 2005-03-22 13:52    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site