public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Compile fixes for 2.5.1-pre4
@ 2001-11-30 19:01 Gertjan van Wingerde
  2001-11-30 19:12 ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Gertjan van Wingerde @ 2001-11-30 19:01 UTC (permalink / raw)
  To: axboe, torvalds; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

Jens/Linux,

Please find attached a patch on 2.5.1-pre4 with compile fixes for:
	1. zftape code
	2. ISDN divert code
	3. Linear MD code
	4. RAID-0 MD code

	MvG/Best regards,

		Gertjan

[-- Attachment #2: patch-2.5.1-pre4-fixes --]
[-- Type: text/plain, Size: 5567 bytes --]

diff -u --recursive linux-2.5.1-preX/drivers/char/ftape/zftape/zftape-init.c linux-2.5.x/drivers/char/ftape/zftape/zftape-init.c
--- linux-2.5.1-preX/drivers/char/ftape/zftape/zftape-init.c	Fri Nov 30 19:31:00 2001
+++ linux-2.5.x/drivers/char/ftape/zftape/zftape-init.c	Fri Nov 30 19:47:19 2001
@@ -114,7 +114,7 @@
 	TRACE_FUN(ft_t_flow);
 
 	TRACE(ft_t_flow, "called for minor %d", MINOR(ino->i_rdev));
-	if ( test_and_set_bit(0,&busy_flag) )) {
+	if ( test_and_set_bit(0,&busy_flag) ) {
 		TRACE_ABORT(-EBUSY, ft_t_warn, "failed: already busy");
 	}
 	if ((MINOR(ino->i_rdev) & ~(ZFT_MINOR_OP_MASK | FTAPE_NO_REWIND))
diff -u --recursive linux-2.5.1-preX/drivers/isdn/divert/divert_procfs.c linux-2.5.x/drivers/isdn/divert/divert_procfs.c
--- linux-2.5.1-preX/drivers/isdn/divert/divert_procfs.c	Fri Nov 30 19:31:02 2001
+++ linux-2.5.x/drivers/isdn/divert/divert_procfs.c	Fri Nov 30 19:49:33 2001
@@ -58,7 +58,6 @@
 	else
 		divert_info_tail->next = ib;	/* follows existing messages */
 	divert_info_tail = ib;	/* new tail */
-	restore_flags(flags);
 
 	/* delete old entrys */
 	while (divert_info_head->next) {
@@ -70,7 +69,7 @@
 		} else
 			break;
 	}			/* divert_info_head->next */
-	spin_lock_irqrestore( &divert_info_lock, flags );
+	spin_unlock_irqrestore( &divert_info_lock, flags );
 	wake_up_interruptible(&(rd_queue));
 }				/* put_info_buffer */
 
@@ -163,14 +162,13 @@
 		inf->usage_cnt--;
 		inf = inf->next;
 	}
-	restore_flags(flags);
 	if (if_used <= 0)
 		while (divert_info_head) {
 			inf = divert_info_head;
 			divert_info_head = divert_info_head->next;
 			kfree(inf);
 		}
-	spin_unlock_irq( &divert_info_lock, flags );
+	spin_unlock_irqrestore( &divert_info_lock, flags );
 	return (0);
 }				/* isdn_divert_close */
 
diff -u --recursive linux-2.5.1-preX/drivers/md/linear.c linux-2.5.x/drivers/md/linear.c
--- linux-2.5.1-preX/drivers/md/linear.c	Sun Sep 30 21:26:06 2001
+++ linux-2.5.x/drivers/md/linear.c	Wed Nov 28 21:18:02 2001
@@ -119,22 +119,21 @@
 	return 0;
 }
 
-static int linear_make_request (mddev_t *mddev,
-			int rw, struct buffer_head * bh)
+static int linear_make_request (mddev_t *mddev, int rw, struct bio *bio)
 {
         linear_conf_t *conf = mddev_to_conf(mddev);
         struct linear_hash *hash;
         dev_info_t *tmp_dev;
         long block;
 
-	block = bh->b_rsector >> 1;
+	block = bio->bi_sector >> 1;
 	hash = conf->hash_table + (block / conf->smallest->size);
   
 	if (block >= (hash->dev0->size + hash->dev0->offset)) {
 		if (!hash->dev1) {
 			printk ("linear_make_request : hash->dev1==NULL for block %ld\n",
 						block);
-			buffer_IO_error(bh);
+			bio_io_error(bio);
 			return 0;
 		}
 		tmp_dev = hash->dev1;
@@ -144,11 +143,11 @@
 	if (block >= (tmp_dev->size + tmp_dev->offset)
 				|| block < tmp_dev->offset) {
 		printk ("linear_make_request: Block %ld out of bounds on dev %s size %ld offset %ld\n", block, kdevname(tmp_dev->dev), tmp_dev->size, tmp_dev->offset);
-		buffer_IO_error(bh);
+		bio_io_error(bio);
 		return 0;
 	}
-	bh->b_rdev = tmp_dev->dev;
-	bh->b_rsector = bh->b_rsector - (tmp_dev->offset << 1);
+	bio->bi_dev = tmp_dev->dev;
+	bio->bi_sector = bio->bi_sector - (tmp_dev->offset << 1);
 
 	return 1;
 }
diff -u --recursive linux-2.5.1-preX/drivers/md/raid0.c linux-2.5.x/drivers/md/raid0.c
--- linux-2.5.1-preX/drivers/md/raid0.c	Sun Sep 30 21:26:06 2001
+++ linux-2.5.x/drivers/md/raid0.c	Thu Nov 29 19:27:53 2001
@@ -223,8 +223,7 @@
  * Of course, those facts may not be valid anymore (and surely won't...)
  * Hey guys, there's some work out there ;-)
  */
-static int raid0_make_request (mddev_t *mddev,
-			       int rw, struct buffer_head * bh)
+static int raid0_make_request (mddev_t *mddev, int rw, struct bio *bio)
 {
 	unsigned int sect_in_chunk, chunksize_bits,  chunk_size;
 	raid0_conf_t *conf = mddev_to_conf(mddev);
@@ -235,11 +234,11 @@
 
 	chunk_size = mddev->param.chunk_size >> 10;
 	chunksize_bits = ffz(~chunk_size);
-	block = bh->b_rsector >> 1;
+	block = bio->bi_sector >> 1;
 	hash = conf->hash_table + block / conf->smallest->size;
 
 	/* Sanity check */
-	if (chunk_size < (block % chunk_size) + (bh->b_size >> 10))
+	if (chunk_size < (block % chunk_size) + (bio->bi_size >> 10))
 		goto bad_map;
  
 	if (!hash)
@@ -255,7 +254,7 @@
 	} else
 		zone = hash->zone0;
     
-	sect_in_chunk = bh->b_rsector & ((chunk_size<<1) -1);
+	sect_in_chunk = bio->bi_sector & ((chunk_size<<1) -1);
 	chunk = (block - zone->zone_offset) / (zone->nb_dev << chunksize_bits);
 	tmp_dev = zone->dev[(block >> chunksize_bits) % zone->nb_dev];
 	rsect = (((chunk << chunksize_bits) + zone->dev_offset)<<1)
@@ -265,8 +264,8 @@
 	 * The new BH_Lock semantics in ll_rw_blk.c guarantee that this
 	 * is the only IO operation happening on this bh.
 	 */
-	bh->b_rdev = tmp_dev->dev;
-	bh->b_rsector = rsect;
+	bio->bi_dev = tmp_dev->dev;
+	bio->bi_sector = rsect;
 
 	/*
 	 * Let the main block layer submit the IO and resolve recursion:
@@ -274,7 +273,7 @@
 	return 1;
 
 bad_map:
-	printk ("raid0_make_request bug: can't convert block across chunks or bigger than %dk %ld %d\n", chunk_size, bh->b_rsector, bh->b_size >> 10);
+	printk ("raid0_make_request bug: can't convert block across chunks or bigger than %dk %ld %d\n", chunk_size, bio->bi_sector, bio->bi_size >> 10);
 	goto outerr;
 bad_hash:
 	printk("raid0_make_request bug: hash==NULL for block %ld\n", block);
@@ -285,7 +284,7 @@
 bad_zone1:
 	printk ("raid0_make_request bug: hash->zone1==NULL for block %ld\n", block);
  outerr:
-	buffer_IO_error(bh);
+	bio_io_error(bio);
 	return 0;
 }
 			   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:01 Compile fixes for 2.5.1-pre4 Gertjan van Wingerde
@ 2001-11-30 19:12 ` Jens Axboe
  2001-11-30 19:26   ` Gertjan van Wingerde
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2001-11-30 19:12 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: torvalds, linux-kernel

On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> 	3. Linear MD code
> 	4. RAID-0 MD code

Have you verified that it works, or are these just compile fixes?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:12 ` Jens Axboe
@ 2001-11-30 19:26   ` Gertjan van Wingerde
  2001-11-30 19:31     ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Gertjan van Wingerde @ 2001-11-30 19:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: torvalds, linux-kernel

Jens Axboe wrote:

> On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> 
>>	3. Linear MD code
>>	4. RAID-0 MD code
>>
> 
> Have you verified that it works, or are these just compile fixes?
> 
> 

They are just compile fixes. However, these are pretty simple conversions.

-- 
	MvG,

		Gertjan

----------

Gertjan van Wingerde
Geessinkweg 177
7544 TX Enschede
The Netherlands
E-mail: gwingerde@home.nl


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:26   ` Gertjan van Wingerde
@ 2001-11-30 19:31     ` Jens Axboe
  2001-11-30 19:57       ` Gertjan van Wingerde
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2001-11-30 19:31 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: torvalds, linux-kernel

On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> Jens Axboe wrote:
> 
> >On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> >
> >>	3. Linear MD code
> >>	4. RAID-0 MD code
> >>
> >
> >Have you verified that it works, or are these just compile fixes?
> >
> >
> 
> They are just compile fixes. However, these are pretty simple conversions.

Note that there is no straight conversion between before having a 1-1
mapping between a buffer_head and a data element and now potentially a
1-n mapping with bio. If you are just remapping, no problem.

So I'd rather not take these patches unless you've looked into why it
_does_ (or maybe does not) work. I'll make note to review them soon, ok?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:31     ` Jens Axboe
@ 2001-11-30 19:57       ` Gertjan van Wingerde
  2001-11-30 19:58         ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Gertjan van Wingerde @ 2001-11-30 19:57 UTC (permalink / raw)
  To: Jens Axboe; +Cc: torvalds, linux-kernel

Jens Axboe wrote:

> On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> 
>>Jens Axboe wrote:
>>
>>
>>>On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
>>>
>>>
>>>>	3. Linear MD code
>>>>	4. RAID-0 MD code
>>>>
>>>>
>>>Have you verified that it works, or are these just compile fixes?
>>>
>>>
>>>
>>They are just compile fixes. However, these are pretty simple conversions.
>>
> 
> Note that there is no straight conversion between before having a 1-1
> mapping between a buffer_head and a data element and now potentially a
> 1-n mapping with bio. If you are just remapping, no problem.
> 
> So I'd rather not take these patches unless you've looked into why it
> _does_ (or maybe does not) work. I'll make note to review them soon, ok?
> 
> 

Okay. BTW I'm currently setting up my machine to run some tests on this 
code (I'll have to find some current version of raidtools first :-(.

-- 
	MvG,

		Gertjan

----------

Gertjan van Wingerde
Geessinkweg 177
7544 TX Enschede
The Netherlands
E-mail: gwingerde@home.nl


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:57       ` Gertjan van Wingerde
@ 2001-11-30 19:58         ` Jens Axboe
  2001-11-30 21:31           ` Gertjan van Wingerde
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2001-11-30 19:58 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: torvalds, linux-kernel

On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> >Note that there is no straight conversion between before having a 1-1
> >mapping between a buffer_head and a data element and now potentially a
> >1-n mapping with bio. If you are just remapping, no problem.
> >
> >So I'd rather not take these patches unless you've looked into why it
> >_does_ (or maybe does not) work. I'll make note to review them soon, ok?
> >
> >
> 
> Okay. BTW I'm currently setting up my machine to run some tests on this 
> code (I'll have to find some current version of raidtools first :-(.

Excellent, thanks for doing this. We definitely need more people
starting to pick up the pieces.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 19:58         ` Jens Axboe
@ 2001-11-30 21:31           ` Gertjan van Wingerde
  2001-11-30 21:33             ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Gertjan van Wingerde @ 2001-11-30 21:31 UTC (permalink / raw)
  To: Jens Axboe; +Cc: torvalds, linux-kernel

Jens Axboe wrote:

> On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> 
>>>Note that there is no straight conversion between before having a 1-1
>>>mapping between a buffer_head and a data element and now potentially a
>>>1-n mapping with bio. If you are just remapping, no problem.
>>>
>>>So I'd rather not take these patches unless you've looked into why it
>>>_does_ (or maybe does not) work. I'll make note to review them soon, ok?
>>>
>>>
>>>
>>Okay. BTW I'm currently setting up my machine to run some tests on this 
>>code (I'll have to find some current version of raidtools first :-(.
>>
> 
> Excellent, thanks for doing this. We definitely need more people
> starting to pick up the pieces.
> 
> 

Jens,

I've tested the linear and RAID-0 code in my own environment. The code
survived some basic tests (starting, reading/writing, etc.) and some
heavy-duty read-write tests.

Based on these tests I'd say that the patches are fine.

-- 
	MvG,

		Gertjan

----------

Gertjan van Wingerde
Geessinkweg 177
7544 TX Enschede
The Netherlands
E-mail: gwingerde@home.nl


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compile fixes for 2.5.1-pre4
  2001-11-30 21:31           ` Gertjan van Wingerde
@ 2001-11-30 21:33             ` Jens Axboe
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2001-11-30 21:33 UTC (permalink / raw)
  To: Gertjan van Wingerde; +Cc: torvalds, linux-kernel

On Fri, Nov 30 2001, Gertjan van Wingerde wrote:
> I've tested the linear and RAID-0 code in my own environment. The code
> survived some basic tests (starting, reading/writing, etc.) and some
> heavy-duty read-write tests.

Excellent, thanks a lot. Applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-11-30 21:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-30 19:01 Compile fixes for 2.5.1-pre4 Gertjan van Wingerde
2001-11-30 19:12 ` Jens Axboe
2001-11-30 19:26   ` Gertjan van Wingerde
2001-11-30 19:31     ` Jens Axboe
2001-11-30 19:57       ` Gertjan van Wingerde
2001-11-30 19:58         ` Jens Axboe
2001-11-30 21:31           ` Gertjan van Wingerde
2001-11-30 21:33             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox