2001-11-06 00:57:46

by David Dyck

[permalink] [raw]
Subject: 2.4.14 doesn't compile: deactivate_page not defined in loop.c



drivers/block/block.o: In function `lo_send':
drivers/block/block.o(.text+0x8ad9): undefined reference to `deactivate_page'
drivers/block/block.o(.text+0x8b19): undefined reference to `deactivate_page'


a grep from deactivate_page only shows up in linux/drivers/block/loop.c




2001-11-06 01:30:46

by Erik Andersen

[permalink] [raw]
Subject: Re: 2.4.14 doesn't compile: deactivate_page not defined in loop.c

On Mon Nov 05, 2001 at 04:57:18PM -0800, David Dyck wrote:
>
>
> drivers/block/block.o: In function `lo_send':
> drivers/block/block.o(.text+0x8ad9): undefined reference to `deactivate_page'
> drivers/block/block.o(.text+0x8b19): undefined reference to `deactivate_page'
>
>
> a grep from deactivate_page only shows up in linux/drivers/block/loop.c

It used to be in mm/swap.c but it no longer is....
Looks like the loop device needs some surgery,

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

2001-11-06 01:40:57

by Chris Wright

[permalink] [raw]
Subject: Re: 2.4.14 doesn't compile: deactivate_page not defined in loop.c

* David Dyck ([email protected]) wrote:
>
>
> drivers/block/block.o: In function `lo_send':
> drivers/block/block.o(.text+0x8ad9): undefined reference to `deactivate_page'
> drivers/block/block.o(.text+0x8b19): undefined reference to `deactivate_page'
>
>
> a grep from deactivate_page only shows up in linux/drivers/block/loop.c

appears that deactivate_page was removed (see patch-2.4.14). the patch
below Works For Me with limited testing (mount loop back, write,
unmount, remount, stuff i wrote is still there ;-). YMMV.

cheers,
-chris

diff -X /home/chris/dontdiff -Naur linux-2.4.14/drivers/block/loop.c linux-2.4.14-loop/drivers/block/loop.c
--- linux-2.4.14/drivers/block/loop.c Thu Oct 25 13:58:34 2001
+++ linux-2.4.14-loop/drivers/block/loop.c Mon Nov 5 17:06:08 2001
@@ -207,7 +207,6 @@
index++;
pos += size;
UnlockPage(page);
- deactivate_page(page);
page_cache_release(page);
}
return 0;
@@ -218,7 +217,6 @@
kunmap(page);
unlock:
UnlockPage(page);
- deactivate_page(page);
page_cache_release(page);
fail:
return -1;

2001-11-06 01:51:28

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.14 doesn't compile: deactivate_page not defined in loop.c

On Mon, Nov 05, 2001 at 05:35:17PM -0800, Chris Wright wrote:
> * David Dyck ([email protected]) wrote:
> >
> >
> > drivers/block/block.o: In function `lo_send':
> > drivers/block/block.o(.text+0x8ad9): undefined reference to `deactivate_page'
> > drivers/block/block.o(.text+0x8b19): undefined reference to `deactivate_page'
> >
> >
> > a grep from deactivate_page only shows up in linux/drivers/block/loop.c
>
> appears that deactivate_page was removed (see patch-2.4.14). the patch
> below Works For Me with limited testing (mount loop back, write,
> unmount, remount, stuff i wrote is still there ;-). YMMV.

no idea why deactivate_page disappeared, it made sense to deactivate the
lower level cache, it doesn't worth to keep two caches with duplicate
information, the higher level cache is faster so we'd better get rid of
the lowlevel cache ASAP, hence the deactivate_page in loop.c.

Andrea

2001-11-06 02:18:21

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.4.14 doesn't compile: deactivate_page not defined in loop.c


On Tue, 6 Nov 2001, Andrea Arcangeli wrote:
>
> no idea why deactivate_page disappeared, it made sense to deactivate the
> lower level cache

Answer me this:

How would it get activated in the first place?

Right. By being accessed multiple times, that's how. Which you claim it
won't be - in which case de-activating it is a no-op, and unnecessary.

Now, there's another possibility: that it _does_ get accessed multiple
times, _despite_ being the lower-level cache. In which case de-activating
it is the wrong thing to do.

So we basically have two cases. And in neither case does it make sense to
de-activate the page. Eh?

Linus