Re: 2.6.21-ext4-1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Amit K. Arora
Date: Wednesday, May 9, 2007 - 7:36 am

On Wed, May 09, 2007 at 09:24:49AM +1000, David Chinner wrote:

Hi David,

I updated the above testcase to use fallocate() and ran it on the
ext4 (with the fallocate patches applied).
It threw following message on console :

# ./a.out 2000 /home/test/mnt/testfile
BUG: at fs/buffer.c:1640 __block_write_full_page()
08c6fcd0:  [<080572a7>] dump_stack+0x1b/0x1d
08c6fce8:  [<080c0d07>] __block_write_full_page+0xc4/0x24a
08c6fd10:  [<080c21e0>] block_write_full_page+0xb0/0xb8
08c6fd40:  [<0810c6a3>] ext4_ordered_writepage+0xcb/0x139
08c6fd80:  [<08091ba8>] generic_writepages+0x178/0x2a0
08c6fdfc:  [<08091cfd>] do_writepages+0x2d/0x38
08c6fe10:  [<0808cea2>] __filemap_fdatawrite_range+0x62/0x6d
08c6fe88:  [<0808cec5>] filemap_fdatawrite+0x18/0x1d
08c6fea8:  [<080bf4bf>] do_fsync+0x26/0x67
08c6fec0:  [<080bf521>] __do_fsync+0x21/0x35
08c6fed8:  [<080bf542>] sys_fsync+0xd/0xf
08c6fee8:  [<08058cac>] handle_syscall+0x8c/0xa4
08c6ff64:  [<0806728a>] handle_trap+0xc1/0xc9
08c6ff80:  [<08067683>] userspace+0x123/0x166
08c6ffd8:  [<080589db>] fork_handler+0xa0/0xa2
08c6fffc:  [<a55a5a5a>] 0xa55a5a5a

This is coming from:
fs/buffer.c
   1628		if (block > last_block) {
   1629			..........
   ...			.........
   1639		} else if (!buffer_mapped(bh) && buffer_dirty(bh)) {
=> 1640			WARN_ON(bh->b_size != blocksize);
   1641			err = get_block(inode, block, bh, 1);
   1642			..........
   ...			.........
   1649		}

Thus, I think in ext4 also we may need to have ->page_mkwrite
implemented.

I came across a patch you had submitted couple of months back which
implemented a generic block_page_mkwrite() function, to which any file
system could hook easily. Here is the link:
http://lkml.org/lkml/2007/3/18/198

Any idea when is it going to be in the mainline ? Not sure if it is
already part of some -mm kernel, but I did not find it in 2.6.21.
Or, since there was a talk of ->fault() replacing ->page_mkwrite() the
patch is not in the pipeline now ?

And, how does XFS behave now if we write to mmapped preallocated blocks,
since XFS also doesn't have ->page_mkwrite() implemented as of date ?

Thanks!
--
Regards,
Amit Arora

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.21-ext4-1, Theodore Ts'o, (Mon Apr 30, 8:14 am)
Re: 2.6.21-ext4-1, Theodore Tso, (Mon Apr 30, 8:58 am)
Re: 2.6.21-ext4-1, Alex Tomas, (Mon Apr 30, 9:24 am)
Re: 2.6.21-ext4-1, Jeff Garzik, (Mon Apr 30, 10:16 am)
Re: 2.6.21-ext4-1, Theodore Tso, (Mon Apr 30, 10:45 am)
Re: 2.6.21-ext4-1, Mingming Cao, (Mon May 7, 1:56 pm)
Re: 2.6.21-ext4-1, David Chinner, (Mon May 7, 7:50 pm)
Re: 2.6.21-ext4-1, Mingming Cao, (Tue May 8, 3:05 pm)
Re: 2.6.21-ext4-1, David Chinner, (Tue May 8, 4:24 pm)
Re: 2.6.21-ext4-1, Amit K. Arora, (Wed May 9, 7:36 am)
Re: 2.6.21-ext4-1, Eric Sandeen, (Wed May 9, 7:52 am)