Re: [patch 1/3] add the fsblock layer

Previous thread: [PATCH] Guard against a potential NULL pointer dereference in old_capi_manufacturer() by Jesper Juhl on Sunday, June 24, 2007 - 3:34 pm. (1 message)

Next thread: [PATCH][ISDN] fix possible NULL deref on low memory condition in capidrv.c::send_message() by Jesper Juhl on Sunday, June 24, 2007 - 4:07 pm. (1 message)
From: Neil Brown
Date: Sunday, June 24, 2007 - 4:01 pm

I've only had a very quick look, but this line looks *very* wrong.
You should be using PG_private.

There should never be any confusion about whether ->private has
buffers or blocks attached as the only routines that ever look in
->private are address_space operations  (or should be.  I think 'NULL'
is sometimes special cased, as in try_to_release_page.  It would be
good to do some preliminary work and tidy all that up).

Why do you think you need PG_blocks?

NeilBrown
-

From: Nick Piggin
Date: Monday, June 25, 2007 - 12:41 am

There is a lot of confusion, actually :)
But as you see in the patch, I added a couple more aops APIs, and
am working toward decoupling it as much as possible. It's pretty

Block device pagecache (buffer cache) has to be able to accept
attachment of either buffers or blocks for filesystem metadata,
and call into either buffer.c or fsblock.c based on that.

If the page flag is really important, we can do some awful hack
like assuming the first long of the private data is flags, and
those flags will tell us whether the structure is a buffer_head
or fsblock ;) But for now it is just easier to use a page flag.

-- 
SUSE Labs, Novell Inc.
-

From: Chris Mason
Date: Monday, June 25, 2007 - 5:29 am

The block device pagecache isn't special, and certainly isn't that much
code.  I would suggest keeping it buffer head specific and making a
second variant that does only fsblocks.  This is mostly to keep the
semantics of PagePrivate sane, lets not fuzz the line.

-chris

-

From: Nick Piggin
Date: Monday, June 25, 2007 - 7:34 pm

That would require a new inode and address_space for the fsblock
type blockdev pagecache, wouldn't it? I just can't think of a
better non-intrusive way of allowing a buffer_head filesystem and
an fsblock filesystem to live on the same blkdev together.

-- 
SUSE Labs, Novell Inc.
-

From: Christoph Hellwig
Date: Saturday, June 30, 2007 - 3:40 am

Yes.  That's easily possible, XFS already does it for it's own
buffer cache.

-

Previous thread: [PATCH] Guard against a potential NULL pointer dereference in old_capi_manufacturer() by Jesper Juhl on Sunday, June 24, 2007 - 3:34 pm. (1 message)

Next thread: [PATCH][ISDN] fix possible NULL deref on low memory condition in capidrv.c::send_message() by Jesper Juhl on Sunday, June 24, 2007 - 4:07 pm. (1 message)