>>>>> "daniel" == Daniel Phillips <[EMAIL PROTECTED]>
>writes:
Hi
daniel> Yes, so either of these would be more consistent:
daniel> create_empty_buffers (page, inode);
daniel> or
daniel> create_empty_buffers (page, dev, blocksize);
daniel> As a primitive, I like the second one more because it's not tied
daniel> specifically to an inode. Why should a memory_operations mapping
daniel> always have an inode? For now I'm just going to export
daniel> create_empty_buffers as it is and if it changes later, ok fine, this
daniel> work is experimental anyway.
if everybody agrees, here is the patch against test8 using the second
alternative.
diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/fs/buffer.c
working/fs/buffer.c
--- base/fs/buffer.c Sun Sep 10 19:33:36 2000
+++ working/fs/buffer.c Wed Sep 13 20:28:14 2000
@@ -1330,7 +1343,7 @@
return 1;
}
-static void create_empty_buffers(struct page *page, struct inode *inode, unsigned
long blocksize)
+static void create_empty_buffers(struct page *page, kdev_t dev, unsigned long
+blocksize)
{
struct buffer_head *bh, *head, *tail;
@@ -1340,7 +1353,7 @@
bh = head;
do {
- bh->b_dev = inode->i_dev;
+ bh->b_dev = dev;
bh->b_blocknr = 0;
bh->b_end_io = end_buffer_io_bad;
tail = bh;
@@ -1393,7 +1406,7 @@
BUG();
if (!page->buffers)
- create_empty_buffers(page, inode, inode->i_sb->s_blocksize);
+ create_empty_buffers(page, inode->i_dev, inode->i_sb->s_blocksize);
head = page->buffers;
block = page->index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
@@ -1449,7 +1462,7 @@
blocksize = inode->i_sb->s_blocksize;
if (!page->buffers)
- create_empty_buffers(page, inode, blocksize);
+ create_empty_buffers(page, inode->i_dev, blocksize);
head = page->buffers;
bbits = inode->i_sb->s_blocksize_bits;
@@ -1559,7 +1572,7 @@
PAGE_BUG(page);
blocksize = inode->i_sb->s_blocksize;
if (!page->buffers)
- create_empty_buffers(page, inode, blocksize);
+ create_empty_buffers(page, inode->i_dev, blocksize);
head = page->buffers;
blocks = PAGE_CACHE_SIZE >> inode->i_sb->s_blocksize_bits;
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]