All of lore.kernel.org
 help / color / mirror / Atom feed
From: Isaac Chanin <chanin@WPI.EDU>
To: Steve Olivieri <steve86@WPI.EDU>
Cc: Hans Reiser <reiser@namesys.com>,
	reiserfs-list@namesys.com,
	Alexander Zarochentcev <zam@namesys.com>,
	vs <vs@thebsh.namesys.com>
Subject: Re: Reiser4 SCSI Bug?
Date: Sun, 30 Oct 2005 22:48:49 -0500	[thread overview]
Message-ID: <43659421.1050608@wpi.edu> (raw)
In-Reply-To: <1993.130.215.169.201.1130725109.squirrel@webmail.WPI.EDU>

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

Steve Olivieri wrote:
> Hey guys,
> 
> I had a system running on reiser4 with Isaac's patch yesterday and all we
> going well.  Of course, then I deleted /var/db and portage went crazy and
> I decided to build the system again.
> 
> I attempted to do so today, using the same kernel as yesterday, but now
> I'm getting the same error as before.  To be a bit more specific,
> 
> reiser4[pdflush(218)]: writeout (fs/reiser4/vfs_ops.c:197)[nikita-31001):
> code: -12 at fs/reiser4/wander.c:1250
> WARNING: Flush failed: -12
> 
> I used to get a number of these errors (in fact, they continued until I
> would reboot with SysRq keys) but now I only seem to get one before
> everything hangs and I'm forced to reboot.
> 
> Hope to see a good fix soon,
> 
>  Steve
> 
> 


Hey Steve,

Not sure why that error would crop up again.  In any case, the attached 
patch uses the macro, moves the min check out of the loop, and fixes all 
of the occurances - so, it may be worth giving a try.

Isaac

[-- Attachment #2: biofix.patch --]
[-- Type: text/plain, Size: 856 bytes --]

--- linux-2.6.13-ck5/fs/reiser4/wander.c.old	2005-10-30 22:38:00.771463160 -0500
+++ linux-2.6.13-ck5/fs/reiser4/wander.c	2005-10-30 22:37:47.952411952 -0500
@@ -763,9 +763,10 @@
 		 nr, (unsigned long long)block);
 
 	max_blocks =
-	    bdev_get_queue(super->s_bdev)->max_sectors >> (super->
-							   s_blocksize_bits -
-							   9);
+	    min(BIO_MAX_PAGES,
+		bdev_get_queue(super->s_bdev)->max_sectors >> (super->
+							      s_blocksize_bits -
+							      9));
 
 	while (nr > 0) {
 		struct bio *bio;
@@ -1235,9 +1236,10 @@
 
 	block = *block_p;
 	max_blocks =
-	    bdev_get_queue(super->s_bdev)->max_sectors >> (super->
-							   s_blocksize_bits -
-							   9);
+	    min(BIO_MAX_PAGES,
+		bdev_get_queue(super->s_bdev)->max_sectors >> (super->
+							      s_blocksize_bits -
+							      9));
 
 	while (nr > 0) {
 		struct bio *bio;

  reply	other threads:[~2005-10-31  3:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28 17:49 Reiser4 SCSI Bug? Steve Olivieri
2005-10-29  0:27 ` Isaac Chanin
2005-10-29 16:06   ` Hans Reiser
2005-10-29 23:13     ` Isaac Chanin
2005-10-29 23:18       ` Hans Reiser
2005-10-29 23:33         ` Isaac Chanin
2005-10-30  3:22           ` Hans Reiser
2005-10-30  0:35             ` Isaac Chanin
2005-10-30  6:42               ` Hans Reiser
2005-10-31  2:18                 ` Steve Olivieri
2005-10-31  3:48                   ` Isaac Chanin [this message]
2005-10-31 18:31                     ` Steve Olivieri
2005-10-31  6:24       ` Alexander Zarochentsev
2005-10-31  7:42         ` Alexander Zarochentsev
2005-10-31  8:23           ` Hans Reiser
2005-10-30 22:36 ` Michael James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43659421.1050608@wpi.edu \
    --to=chanin@wpi.edu \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=steve86@WPI.EDU \
    --cc=vs@thebsh.namesys.com \
    --cc=zam@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.