All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: linux-ext4@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: discard feature, mkfs.ext4 and mmc default fallback to normal erase op
Date: Mon, 07 Dec 2020 16:10:27 +0100	[thread overview]
Message-ID: <97c4bb65c8a3e688b191d57e9f06aa5a@walle.cc> (raw)

Hi,

The problem I'm having is that I'm trying to install debian on
an embedded system onto an sdcard. During installation it will
format the target filesystem, but the "mkfs.ext4 -F /dev/mmcblk0p2"
takes ages.

What I've found out so far:
  - mkfs.ext4 tries to discard all blocks on the target device
  - with my target device being an sdcard it seems to fallback
    to normal erase [1], with erase_arg being set to what the card
    is capable of [2]

Now I'm trying to figure out if this behavior is intended. I guess
one can reduce it to "blkdiscard /dev/mmcblk0p2". Should this
actually fall back to normal erasing or should it return -EOPNOTSUPP?

-michael

[1] 
https://elixir.bootlin.com/linux/v5.9.12/source/drivers/mmc/core/block.c#L1063
[2] 
https://elixir.bootlin.com/linux/v5.9.12/source/drivers/mmc/core/mmc.c#L1751

             reply	other threads:[~2020-12-07 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 15:10 Michael Walle [this message]
2020-12-07 18:35 ` discard feature, mkfs.ext4 and mmc default fallback to normal erase op Theodore Y. Ts'o
2020-12-07 20:39   ` Michael Walle
2020-12-08  2:40     ` Theodore Y. Ts'o
2020-12-08  9:49       ` Ulf Hansson
2020-12-08 11:26         ` Michael Walle
2020-12-08 16:17           ` Ulf Hansson
2020-12-08 20:57             ` Michael Walle
2020-12-08 16:52           ` Theodore Y. Ts'o
2020-12-09 14:51             ` Ulf Hansson
2020-12-09 16:35               ` Theodore Y. Ts'o

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=97c4bb65c8a3e688b191d57e9f06aa5a@walle.cc \
    --to=michael@walle.cc \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-mmc@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.