mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: fix suboptimal seek_{data,hole} extents traversial
Date: Mon, 01 Dec 2014 14:25:46 +0300	[thread overview]
Message-ID: <87a937d32d.fsf@openvz.org> (raw)
In-Reply-To: <20141129175255.GC4362@thunk.org>

[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]

Theodore Ts'o <tytso@mit.edu> writes:

> On Fri, Nov 28, 2014 at 06:02:02PM +0300, Dmitry Monakhov wrote:
>> FYI: inline_data feature is fatally broken
>
> Thanks for finding the bugs!
>
>> 2) ext4_inline_data_fiemap(0 ignores start and len arguments from ext4_filemap()
>>    which obviously result in endless loop for anyone who want to use
>>    fiemap for inline files (which my patch try to do)
>
> Would this have been triggered using filefrag?  I just checked and
> noticed we don't have a filefrag test in xfstests; of course it would
> be impossible to test other than the filefrag -v command successfully
> completed, but maybe it might be worth adding such a test.
This works only because filefrag use big buffer. If one want to call
fiemap with start != 0 it will loop. So we definitely need a regression
test for fiemap. I'll do it.

BTW bug can be spotted even in case of filefrag -v:
#### Create small file with inlined data 
# echo test > /mnt/f1
#### Now boost it's i_size  
# truncate --size 4096000 /mnt/f1
# filefrag -v /mnt/f1
Filesystem cylinder groups approximately 39
File size of /mnt/f1 is 4096000 (1000 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected:
 flags:
    0:        0.. 4095999:    2762792..   6858791: 4096000:last,not_aligned,inline,eof
    /mnt/f1: 1 extent found
###According to fiemap we are inlined 4Mb data. :)

At this moment I'm testing my patches, I'll send it today.
>
> 	       	     	      	       	      	   - Ted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2014-12-01 11:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  5:57 kernel BUG at fs/ext4/inode.c:2982! Dave Jones
2014-10-16  9:31 ` Dmitry Monakhov
2014-10-16 14:33   ` Dave Jones
2014-10-16 20:15     ` Dave Jones
2014-10-16 22:03       ` Dmitry Monakhov
2014-10-17 13:25         ` [PATCH] ext4: fix suboptimal seek_{data,hole} extents traversial Dmitry Monakhov
2014-11-25 21:14           ` Theodore Ts'o
2014-11-27 14:48             ` Dmitry Monakhov
2014-11-28 15:02             ` Dmitry Monakhov
2014-11-29 17:52               ` Theodore Ts'o
2014-12-01 11:25                 ` Dmitry Monakhov [this message]
2014-10-17 17:27         ` kernel BUG at fs/ext4/inode.c:2982! Dave Jones

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=87a937d32d.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome