2006-09-05 21:06:48

by Badari Pulavarty

[permalink] [raw]
Subject: Re: BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()

Will Simoneau wrote:
> Has anyone seen this before? These three traces occured at different times
> today when three new user accounts (and associated quotas) were created. This
> machine is an NFS server which uses quotas on an ext3 fs (dir_index is on).
> Kernel is 2.6.17.11 on an x86 smp w/64G highmem; 4G ram is installed. The
> affected filesystem is on a software raid1 of two hardware raid0 volumes from a
> megaraid card.
>
> BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
> <c01c5140> ext3_getblk+0x98/0x2a6 <c03b2806> md_wakeup_thread+0x26/0x2a
> <c01c536d> ext3_bread+0x1f/0x88 <c01cedf9> ext3_quota_read+0x136/0x1ae
> <c018b683> v1_read_dqblk+0x61/0xac <c0188f32> dquot_acquire+0xf6/0x107
> <c01ceaba> ext3_acquire_dquot+0x46/0x68 <c01897d4> dqget+0x155/0x1e7
> <c018a97b> dquot_transfer+0x3e0/0x3e9 <c016fe52> dput+0x23/0x13e
>
Made me curious and looking around on what the warning is coming ? Few
basic questions ..
Do you have CONFIG_LBD ?

I see the ext3_getblk() used "long" for "block" &
ext3_get_blocks_handle() expects "sector_t"
for "block". Wondering if you are running into 64-bit -to- 32-bit
conversion issues .. ?

Thanks,
Badari



2006-09-05 21:45:34

by Will Simoneau

[permalink] [raw]
Subject: Re: BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()

On 14:06 Tue 05 Sep , Badari Pulavarty wrote:
> Will Simoneau wrote:
> >Has anyone seen this before? These three traces occured at different times
> >today when three new user accounts (and associated quotas) were created.
> >This
> >machine is an NFS server which uses quotas on an ext3 fs (dir_index is on).
> >Kernel is 2.6.17.11 on an x86 smp w/64G highmem; 4G ram is installed. The
> >affected filesystem is on a software raid1 of two hardware raid0 volumes
> >from a
> >megaraid card.
> >
> >BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
> > <c01c5140> ext3_getblk+0x98/0x2a6 <c03b2806> md_wakeup_thread+0x26/0x2a
> > <c01c536d> ext3_bread+0x1f/0x88 <c01cedf9> ext3_quota_read+0x136/0x1ae
> > <c018b683> v1_read_dqblk+0x61/0xac <c0188f32> dquot_acquire+0xf6/0x107
> > <c01ceaba> ext3_acquire_dquot+0x46/0x68 <c01897d4> dqget+0x155/0x1e7
> > <c018a97b> dquot_transfer+0x3e0/0x3e9 <c016fe52> dput+0x23/0x13e
> >
> Made me curious and looking around on what the warning is coming ? Few
> basic questions ..
> Do you have CONFIG_LBD ?
>
> I see the ext3_getblk() used "long" for "block" &
> ext3_get_blocks_handle() expects "sector_t"
> for "block". Wondering if you are running into 64-bit -to- 32-bit
> conversion issues .. ?
>
> Thanks,
> Badari
>

CONFIG_LBD is on. GCC is 'Gentoo 3.3.5.20050130-r1', if it matters.
FWIW, the machine is running 32-bit, although the cpus appear to support
EM64T. The filesystem's size is 138410144 1k-blocks; ext3 is using 4k
blocks/inodes.

This was not a problem on the previous kernel which was 2.6.13-rc3 with
the assert on net/ipv4/tcp_output.c:918 disabled (from memory, even the
line number ;-) ).


Attachments:
(No filename) (1.63 kB)
(No filename) (189.00 B)
Download all attachments

2006-09-05 22:40:28

by Badari Pulavarty

[permalink] [raw]
Subject: Re: BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()

On Tue, 2006-09-05 at 17:47 -0400, Will Simoneau wrote:
> On 14:06 Tue 05 Sep , Badari Pulavarty wrote:
> > Will Simoneau wrote:
> > >Has anyone seen this before? These three traces occured at different times
> > >today when three new user accounts (and associated quotas) were created.
> > >This
> > >machine is an NFS server which uses quotas on an ext3 fs (dir_index is on).
> > >Kernel is 2.6.17.11 on an x86 smp w/64G highmem; 4G ram is installed. The
> > >affected filesystem is on a software raid1 of two hardware raid0 volumes
> > >from a
> > >megaraid card.
> > >
> > >BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
> > > <c01c5140> ext3_getblk+0x98/0x2a6 <c03b2806> md_wakeup_thread+0x26/0x2a
> > > <c01c536d> ext3_bread+0x1f/0x88 <c01cedf9> ext3_quota_read+0x136/0x1ae
> > > <c018b683> v1_read_dqblk+0x61/0xac <c0188f32> dquot_acquire+0xf6/0x107
> > > <c01ceaba> ext3_acquire_dquot+0x46/0x68 <c01897d4> dqget+0x155/0x1e7
> > > <c018a97b> dquot_transfer+0x3e0/0x3e9 <c016fe52> dput+0x23/0x13e

I think, we found your problem.

ext3_getblk() is not handling HOLE correctly. Does this patch help ?
Mingming, what do you think ?

Thanks,
Badari

ext3_get_blocks_handle() returns number of blocks it mapped.
It returns 0 in case of HOLE. ext3_getblk() should handle
HOLE properly (currently its dumping warning stack and
returning -EIO).

Signed-off-by: Badari Pulavarty <[email protected]>
---
fs/ext3/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Index: linux-2.6.18-rc5/fs/ext3/inode.c
===================================================================
--- linux-2.6.18-rc5.orig/fs/ext3/inode.c 2006-08-27 20:41:48.000000000 -0700
+++ linux-2.6.18-rc5/fs/ext3/inode.c 2006-09-05 15:32:57.000000000 -0700
@@ -1009,11 +1009,12 @@ struct buffer_head *ext3_getblk(handle_t
buffer_trace_init(&dummy.b_history);
err = ext3_get_blocks_handle(handle, inode, block, 1,
&dummy, create, 1);
- if (err == 1) {
+ /*
+ * ext3_get_blocks_handle() returns number of blocks
+ * mapped. 0 in case of a HOLE.
+ */
+ if (err > 0) {
err = 0;
- } else if (err >= 0) {
- WARN_ON(1);
- err = -EIO;
}
*errp = err;
if (!err && buffer_mapped(&dummy)) {



2006-09-05 23:19:26

by Mingming Cao

[permalink] [raw]
Subject: Re: BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()

Badari Pulavarty wrote:
> On Tue, 2006-09-05 at 17:47 -0400, Will Simoneau wrote:
>
>>On 14:06 Tue 05 Sep , Badari Pulavarty wrote:
>>
>>>Will Simoneau wrote:
>>>
>>>>Has anyone seen this before? These three traces occured at different times
>>>>today when three new user accounts (and associated quotas) were created.
>>>>This
>>>>machine is an NFS server which uses quotas on an ext3 fs (dir_index is on).
>>>>Kernel is 2.6.17.11 on an x86 smp w/64G highmem; 4G ram is installed. The
>>>>affected filesystem is on a software raid1 of two hardware raid0 volumes
>>>
>>>>from a
>>>
>>>>megaraid card.
>>>>
>>>>BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
>>>><c01c5140> ext3_getblk+0x98/0x2a6 <c03b2806> md_wakeup_thread+0x26/0x2a
>>>><c01c536d> ext3_bread+0x1f/0x88 <c01cedf9> ext3_quota_read+0x136/0x1ae
>>>><c018b683> v1_read_dqblk+0x61/0xac <c0188f32> dquot_acquire+0xf6/0x107
>>>><c01ceaba> ext3_acquire_dquot+0x46/0x68 <c01897d4> dqget+0x155/0x1e7
>>>><c018a97b> dquot_transfer+0x3e0/0x3e9 <c016fe52> dput+0x23/0x13e
>
>
> I think, we found your problem.
>
> ext3_getblk() is not handling HOLE correctly. Does this patch help ?
> Mingming, what do you think ?

Looks correct to me, ext3_get_blocks_handle() returning 0 is a valid
case when the block is not being mapped(hole).

It would be nice to add a WARN_ON() in the ext3_get_blocks_handle() code
when we allocating more than requested (maxblocks) blocks...:)

Mingming


> Badari
>
> ext3_get_blocks_handle() returns number of blocks it mapped.
> It returns 0 in case of HOLE. ext3_getblk() should handle
> HOLE properly (currently its dumping warning stack and
> returning -EIO).
>
> Signed-off-by: Badari Pulavarty <[email protected]>
> ---
> fs/ext3/inode.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> Index: linux-2.6.18-rc5/fs/ext3/inode.c
> ===================================================================
> --- linux-2.6.18-rc5.orig/fs/ext3/inode.c 2006-08-27 20:41:48.000000000 -0700
> +++ linux-2.6.18-rc5/fs/ext3/inode.c 2006-09-05 15:32:57.000000000 -0700
> @@ -1009,11 +1009,12 @@ struct buffer_head *ext3_getblk(handle_t
> buffer_trace_init(&dummy.b_history);
> err = ext3_get_blocks_handle(handle, inode, block, 1,
> &dummy, create, 1);
> - if (err == 1) {
> + /*
> + * ext3_get_blocks_handle() returns number of blocks
> + * mapped. 0 in case of a HOLE.
> + */
> + if (err > 0) {
> err = 0;
> - } else if (err >= 0) {
> - WARN_ON(1);
> - err = -EIO;
> }
> *errp = err;
> if (!err && buffer_mapped(&dummy)) {
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



2006-09-06 01:52:12

by Will Simoneau

[permalink] [raw]
Subject: Re: BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()

On 15:43 Tue 05 Sep , Badari Pulavarty wrote:
> On Tue, 2006-09-05 at 17:47 -0400, Will Simoneau wrote:
> > On 14:06 Tue 05 Sep , Badari Pulavarty wrote:
> > > Will Simoneau wrote:
> > > >Has anyone seen this before? These three traces occured at different times
> > > >today when three new user accounts (and associated quotas) were created.
> > > >This
> > > >machine is an NFS server which uses quotas on an ext3 fs (dir_index is on).
> > > >Kernel is 2.6.17.11 on an x86 smp w/64G highmem; 4G ram is installed. The
> > > >affected filesystem is on a software raid1 of two hardware raid0 volumes
> > > >from a
> > > >megaraid card.
> > > >
> > > >BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
> > > > <c01c5140> ext3_getblk+0x98/0x2a6 <c03b2806> md_wakeup_thread+0x26/0x2a
> > > > <c01c536d> ext3_bread+0x1f/0x88 <c01cedf9> ext3_quota_read+0x136/0x1ae
> > > > <c018b683> v1_read_dqblk+0x61/0xac <c0188f32> dquot_acquire+0xf6/0x107
> > > > <c01ceaba> ext3_acquire_dquot+0x46/0x68 <c01897d4> dqget+0x155/0x1e7
> > > > <c018a97b> dquot_transfer+0x3e0/0x3e9 <c016fe52> dput+0x23/0x13e
>
> I think, we found your problem.
>
> ext3_getblk() is not handling HOLE correctly. Does this patch help ?
> Mingming, what do you think ?
>
> Thanks,
> Badari
>
> ext3_get_blocks_handle() returns number of blocks it mapped.
> It returns 0 in case of HOLE. ext3_getblk() should handle
> HOLE properly (currently its dumping warning stack and
> returning -EIO).
>
> Signed-off-by: Badari Pulavarty <[email protected]>
> ---
> fs/ext3/inode.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> Index: linux-2.6.18-rc5/fs/ext3/inode.c
> ===================================================================
> --- linux-2.6.18-rc5.orig/fs/ext3/inode.c 2006-08-27 20:41:48.000000000 -0700
> +++ linux-2.6.18-rc5/fs/ext3/inode.c 2006-09-05 15:32:57.000000000 -0700
> @@ -1009,11 +1009,12 @@ struct buffer_head *ext3_getblk(handle_t
> buffer_trace_init(&dummy.b_history);
> err = ext3_get_blocks_handle(handle, inode, block, 1,
> &dummy, create, 1);
> - if (err == 1) {
> + /*
> + * ext3_get_blocks_handle() returns number of blocks
> + * mapped. 0 in case of a HOLE.
> + */
> + if (err > 0) {
> err = 0;
> - } else if (err >= 0) {
> - WARN_ON(1);
> - err = -EIO;
> }
> *errp = err;
> if (!err && buffer_mapped(&dummy)) {

Unfortunately this will be difficult for me to test as the machine is a
production server, I will try it when I get a chance to offline for a
few minutes.


Attachments:
(No filename) (2.47 kB)
(No filename) (189.00 B)
Download all attachments