lkml.org 
[lkml]   [2001]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH 2.5.1.4: fix rd.c build


On Fri, 30 Nov 2001, Jens Axboe wrote:

> On Fri, Nov 30 2001, Alexander Viro wrote:
> >
> >
> > On Fri, 30 Nov 2001, Jens Axboe wrote:
> >
> > > Actually, this is not even enough if rd receives a multi page bio.
> > > Something like this should work, untested.
> > >
> > > @@ -237,9 +238,9 @@
> > > err = -EIO;
> >
> > Make it err = 0...
>
> Explain

Think what happens if you have all these pages in page cache. Already.
Returning -EIO is hardly a good idea in that case. Look through the
loop - we assign err in the body only if we have to allocate a new
page.

Notice that any bh brings the page in. I.e. for smaller-than-page ones
you are going to have a lot of fun...

>From -pre2:

@@ -227,19 +227,18 @@
commit_write: ramdisk_commit_write,
};

-static int rd_blkdev_pagecache_IO(int rw, struct buffer_head * sbh, int minor)
+static int rd_blkdev_pagecache_IO(int rw, struct bio *sbh, int minor)
{
struct address_space * mapping;
unsigned long index;
int offset, size, err;

err = -EIO;
- err = 0;
mapping = rd_bdev[minor]->bd_inode->i_mapping;

Sure, one of these assignments had to go away. You'd picked the wrong one,
though...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.072 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site