linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: punch command works incorrect in debugfs
Date: Tue, 29 Jan 2013 01:36:47 +0800	[thread overview]
Message-ID: <20130128173647.GA23868@gmail.com> (raw)

Hi all,

I found a bug in debugfs that 'punch' command work incorrect for a
indirect-based file.  The bug can be triggered by the following
commands, and it seems that the problem is in libext2fs library.  I
file this bug in mailing list because I have no time to look at it
carefully and I doubt that this command is not used frequently.

[reproduce steps]
  sudo mkfs.ext4 -O ^extent ${DEV}
  sudo mount -t ext4 ${DEV} ${MNT}
  sudo dd if=/dev/zero of=${MNT}/punch-file bs=4k count=16
  sync
  sudo umount ${MNT}
  sudo debugfs ${DEV} -R 'stat punch-file'
  sudo debugfs -w ${DEV} -R 'punch punch-file 4 6'
  sudo debugfs ${DEV} -R 'stat punch-file'

[expected result]
...
BLOCKS:
(0-3):34304-34307, (6-11):34310-34315, (IND):33793, (12-15):34316-34319
...

[wrong result]
...
BLOCKS:
(0-11):34304-34315, (IND):33793, (12-15):34316-34319
...

Regards,
                                                - Zheng

                 reply	other threads:[~2013-01-28 17:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20130128173647.GA23868@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).