All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Dmitri Monakhov <dmonakhov@openvz.org>
Cc: Solofo.Ramangalahy@bull.net, linux-ext4@vger.kernel.org
Subject: Re: [2.6.25-rc5-ext4-36c86] attempt to access beyond end of device
Date: Wed, 19 Mar 2008 21:19:19 -0500	[thread overview]
Message-ID: <47E1C9A7.6000200@redhat.com> (raw)
In-Reply-To: <20080318162301.GA8432@dmon-lap.sw.ru>

Dmitri Monakhov wrote:
> On 10:49 Tue 18 Mar     , Solofo.Ramangalahy@bull.net wrote:
> Content-Description: message body and .signature
>> Hello,
>>
>> During stress testing (workload: racer from ltp + fio/iometer), here
>> is an error I am encountering:
> Confirm this issue happens after ~30secs of ltp fsstress.
> 
> This happens because of error in ext4_get_block()
> ext4_get_block()
> { 
> ...
> 	ret = ext4_get_blocks_wrap(handle, inode, iblock,
>                                         max_blocks, bh_result, create, 0);
>         if (ret > 0) {
>                 r2 = ret;
>                 bh_result->b_size = (ret << inode->i_blkbits);
> # Setting b_size, if ret > 1 then bh_result is broken because
> #  b_size must always be equal to FS logical block size(1<<inode->i_blkbits)

I don't think that's quite right.

this bh is a dummy bh, right, which just gives us info on the mapping.

static int ext4_get_block(struct inode *inode, sector_t iblock,
                        struct buffer_head *bh_result, int create)
{
        handle_t *handle = ext4_journal_current_handle();
        int ret = 0, started = 0;
        unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;

for starters, ext3 does exactly the same thing.

Also look for example at get_more_blocks():

                map_bh->b_state = 0;
                map_bh->b_size = fs_count << dio->inode->i_blkbits;
...
                ret = (*dio->get_block)(dio->inode, fs_startblk,
                                                map_bh, create);

or do_mpage_readpage():

        nblocks = map_bh->b_size >> blkbits;

....

                if (block_in_file < last_block) {
                        map_bh->b_size = (last_block-block_in_file) <<
blkbits;
                        if (get_block(inode, block_in_file, map_bh, 0))
                                goto confused;
                        *first_logical_block = block_in_file;
                }

the bh->b_size can be more than a block; in this case it's not a problem.

maybe some buffer tracing would be in order?

-Eric

  reply	other threads:[~2008-03-20  2:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18  9:49 [2.6.25-rc5-ext4-36c86] attempt to access beyond end of device Solofo.Ramangalahy
2008-03-18 16:23 ` Dmitri Monakhov
2008-03-20  2:19   ` Eric Sandeen [this message]
2008-03-19 11:35 ` Andreas Dilger
2008-03-19 11:56   ` Solofo.Ramangalahy
2008-03-20  2:39 ` Eric Sandeen
2008-03-20  3:04   ` Solofo.Ramangalahy
2008-03-20  8:16   ` Dmitri Monakhov
2008-03-20 12:09     ` Aneesh Kumar K.V
2008-03-20 14:04       ` delayed allocation result in BUG at fs/buffer.c:2880! Dmitri Monakhov
     [not found]         ` <20080320151645.GA23301@skywalker>
     [not found]           ` <1206033709.3637.15.camel@localhost.localdomain>
2008-03-20 18:02             ` Aneesh Kumar K.V
2008-03-20 18:18               ` Mingming Cao
2008-03-21  0:49     ` [2.6.25-rc5-ext4-36c86] attempt to access beyond end of device Mingming Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47E1C9A7.6000200@redhat.com \
    --to=sandeen@redhat.com \
    --cc=Solofo.Ramangalahy@bull.net \
    --cc=dmonakhov@openvz.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.