All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Chris Ball <cjb@laptop.org>,
	linux-ext4@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] mke2fs: restore verbose message for BLKDISCARD
Date: Fri, 08 Mar 2013 10:18:14 -0700	[thread overview]
Message-ID: <513A1D56.1010402@wwwdotorg.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1303080818510.24359@localhost>

On 03/08/2013 12:23 AM, Lukáš Czerner wrote:
> On Thu, 7 Mar 2013, Stephen Warren wrote:
> 
>> Date: Thu, 07 Mar 2013 12:47:09 -0700
>> From: Stephen Warren <swarren@wwwdotorg.org>
>> To: Lukáš Czerner <lczerner@redhat.com>
>> Cc: Theodore Ts'o <tytso@mit.edu>, Chris Ball <cjb@laptop.org>,
>>     linux-ext4@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
>> Subject: Re: [PATCH] mke2fs: restore verbose message for BLKDISCARD
>>
>> On 03/06/2013 12:13 AM, Lukáš Czerner wrote:
>>> On Tue, 5 Mar 2013, Stephen Warren wrote:
>>>
>>>> Date: Tue,  5 Mar 2013 13:25:18 -0700
>>>> From: Stephen Warren <swarren@wwwdotorg.org>
>>>> To: Theodore Ts'o <tytso@mit.edu>
>>>> Cc: Chris Ball <cjb@laptop.org>, linux-ext4@vger.kernel.org,
>>>>     Stephen Warren <swarren@nvidia.com>
>>>> Subject: [PATCH] mke2fs: restore verbose message for BLKDISCARD
>>>>
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> mke2fs on a large slow eMMC device may appear to hang while executing
>>>> ioctl(BLKDISCARD). CTRL-C and CTRL-\ don't appear to respond, or respond
>>>> extremely slowly. -v doesn't give any hints what's happening. Only strace
>>>> is a clue. Make -v print some clues to make it easier to track down the
>>>> apparent hang.
>>>>
>>>> This change re-uses the original messages that were implemented as part
>>>> of 5827d24 "mke2fs support for BLKDISCARD" in order to easily re-use the
>>>> translations of that message. Note that this patch prints the first
>>>> message before executing the IOCTL, so the user is told what's going on
>>>> before the long wait.
>>>>
>>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>>
>>> Note that you've added the message only around the first 4k discard
>>> which is only used to test whether the device actually support the
>>> discard... which is not very useful and it can not even know whether
>>> the whole device discard will succeed/fail so it is misleading.
>>
>> Oops. I certainly should looked at the code better.
>>
>>> Moreover there actually is a message saying that we're "Discarding
>>> device blocks" and it even shows the progress. The step in which
>>> we're doing the discard (and update the progress) is given by
>>> DISCARD_STEP_MB = 2048MB. And all that in non verbose mode as well.
>>
>> That said, it's that very first call to io_channel_discard() that is
>> hanging then; I don't see the existing message at all. With my change, I
>> do see the new message that I added. (So, no stdio flushing issue here).
> 
> It's just one fs block discard, are you sure about that ?

Yes:

root@localhost:~# strace -e ioctl ./e2fsprogs/misc/mke2fs -v /dev/mmcblk1p1
mke2fs 1.43-WIP (21-Jan-2013)
ioctl(3, BLKGETSIZE64, 0xbe940110)      = 0
fs_types for mke2fs.conf resolution: 'ext2'
ioctl(3, BLKSSZGET, 0xbe940360)         = 0
ioctl(3, BLKPBSZGET, 0xbe940364)        = 0
ioctl(3, BLKDISCARDZEROES, 0xbe940324)  = 0
ioctl(3, BLKROGET, 0xbe940324)          = 0
Calling BLKDISCARD from 0 to 4096 ioctl(3, BLKDISCARD

>> I will go investigate why this API is hanging. Sorry for the noise.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-03-08 17:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 20:25 [PATCH] mke2fs: restore verbose message for BLKDISCARD Stephen Warren
2013-03-06  7:13 ` Lukáš Czerner
2013-03-07 19:47   ` Stephen Warren
2013-03-08  7:23     ` Lukáš Czerner
2013-03-08 17:18       ` Stephen Warren [this message]
2013-03-08 19:00         ` Theodore Ts'o
2013-03-08 19:06           ` Theodore Ts'o
2013-03-08 19:08           ` Chris Ball
2013-03-08 20:03             ` Stephen Warren
2013-03-08 20:12               ` Chris Ball
2013-03-11 14:08           ` Eric Sandeen
2013-03-11 14:18             ` Lukáš Czerner

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=513A1D56.1010402@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=cjb@laptop.org \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=swarren@nvidia.com \
    --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 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.