[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: 2.3.29: ramdisk still broken.
From:       Mike Galbraith <mikeg () weiden ! de>
Date:       1999-11-30 19:52:27
[Download RAW message or body]

On Tue, 30 Nov 1999, Stephen C. Tweedie wrote:

> Hi,
> 
> > What I'd like to do is to set up an address space (still have to figure
> > out exactly howto.. swap_state.c) and use page cache functions to map
> > and unmap the incoming data into the ramdisk's address space.  Trouble
> > is, it looks like a page can only be in one address space.. correct?
> 
> Yes.

<double drat>

> > For blocksize = PAGE_SIZE ramdisks, I _think_ I could avoid the copy by
> > keeping track of allocated blocks and when a write request comes in do
> > something like..
> 
> >	if (block_table[blk] != request_bh->b_page) {
> >		if (block_table[blk])
> >			put_page(block_table[blk]);
> >		get_page(request_bh->b_page);
> >		block_table[blk] = request_bh->b_page;
> >	}
> 
> That should work, *if* you are sure that there are no other users of the
> old buffer_head at the time.  You'd have to take the appropriate buffer
> cache spinlock to make sure of that.

OK, and thanks. Thinking isn't too far bent to continue trying things.

	-Mike


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic