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
--- 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 via email to