All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [Fwd: [Bug 9732] New: oops in extent code via ext4_fallocate]
Date: Sat, 12 Jan 2008 22:01:44 +0530	[thread overview]
Message-ID: <20080112163144.GA6546@skywalker> (raw)
In-Reply-To: <4787D498.1050202@redhat.com>

On Fri, Jan 11, 2008 at 02:42:00PM -0600, Eric Sandeen wrote:

> 
> The BUG_ON is:
> 
>         BUG_ON(*logical < le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len));
> 
> where these were the values:
> 
>         logical 8 ee_block 0 ee_len 32776
> 
> Haven't looked further into it yet.
> 

Not able to reproduce. Why is it calling ext4_ext_search_left for that
value of logical ? ext4_ext_get_blocks should have found that the
logical belong to an already existing extent and return from there. It
should have returned from

2365      if (create == EXT4_CREATE_UNINITIALIZED_EXT)
2366               goto out;


root@qemu-image:/ext4# /root/testfallocate  -f a 0 100
# FALLOCATE TEST REPORT #
        New blocks preallocated = 0.
        Number of bytes preallocated = 0
        Old file size = 100, New file size 100.
        Old num blocks = 4, New num blocks 4.


### TESTS PASSED ###
root@qemu-image:/ext4# ls -alh a
-rw-r--r-- 1 root root 100 Jan  9 16:23 a
root@qemu-image:/ext4# /root/truncate  ./a 50
root@qemu-image:/ext4# ls -alh a
-rw-r--r-- 1 root root 50 Jan  9 16:23 a
root@qemu-image:/ext4# /root/testfallocate  -f a 0 100
# FALLOCATE TEST REPORT #
        New blocks preallocated = 0.
        Number of bytes preallocated = 0
        Old file size = 50, New file size 100.
        Old num blocks = 4, New num blocks 4.


### TESTS PASSED ###
root@qemu-image:/ext4# ls -alh a
-rw-r--r-- 1 root root 100 Jan  9 16:23 a
root@qemu-image:/ext4# more /proc/mounts  | grep ext4dev
/dev/hdc /ext4 ext4dev rw,nodelalloc,data=writeback 0 0
root@qemu-image:/ext4#

The third fallocate should result in calling ext4_ext_get_blocks two
times. The first call with logical 0 and max 100 and it will return with
allocated 50. Then call again with logical 50 and max 50.

Something else is wrong.

-aneesh

  reply	other threads:[~2008-01-12 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 20:42 [Fwd: [Bug 9732] New: oops in extent code via ext4_fallocate] Eric Sandeen
2008-01-12 16:31 ` Aneesh Kumar K.V [this message]
2008-01-12 16:41   ` Eric Sandeen
2008-01-12 16:44     ` Eric Sandeen
     [not found]       ` <1200343767.4197.7.camel@localhost.localdomain>
2008-01-15 12:52         ` checkpatch.pl warnings Aneesh Kumar K.V
2008-01-15 19:34           ` Mingming Cao
2008-01-12 18:14 ` [PATCH] ext4: use ext4_ext_get_actual_len instead of directly using ext4_extent.ee_len Aneesh Kumar K.V
2008-01-14 10:35   ` Aneesh Kumar K.V

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=20080112163144.GA6546@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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.