Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2460701pxu; Mon, 7 Dec 2020 07:13:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNMFjEo/AEl07f9bLU5+vsaU1RB2CdUKSd8Z6AjnVfMTbohuuB6GacaokBA+W26QStqNBY X-Received: by 2002:a17:906:268c:: with SMTP id t12mr18960146ejc.91.1607353993274; Mon, 07 Dec 2020 07:13:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607353993; cv=none; d=google.com; s=arc-20160816; b=Y/go65WG5woUTu7SpnLCoLd+UMJs2QI3K9vtgQXr1sk+6BRQip5s5KtTZKympSNbIY uT/shAY/cBUdsGU+UcATzyrz+h/jVmm3WxJm2SNZFkK9Y8vpMeEYp3ou7jY8BKI4X66t GYbhWzy0xnQa2OTyaM51nLb8+VHkcdOVXdKB0EKjRyZbVji3UsAIM2wlpTBCfQQr10rV Xn/v0B8wtl74HYvOdmGt5FplD4eUJFUOG+gWcAKCbE71+SmoVyd3Bv8hhvuP7dyTk9G+ ydWamQgO9JqEVmI3xK+jI/gH+r7ul3bDM1brcS2dwu250XGSVZgmUQ+HL6PMoVLE+KTf p7pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:subject:to:from:date :content-transfer-encoding:mime-version:dkim-signature; bh=wa7mfcuPecF7gpQwpDx0LYocwUQoOJPeyOlLst5l3R8=; b=EYOyBwX+yXxPWQUEioCmmQOEJ//ToV0pY3C3qE6IubAbrf4pneKgraY7iCnd8/pEqf 8DEV9wcS+P5AEwsEqUYdoCuWyl3821m3NMF2AtzJV+4Uj1Wh9dL92wKt+hloPUlkS20W SQNcRdkfnOt0Kz+NlHWi2/0YsD6PR2SE4QvuYd20CFfPh5tkaabe5df3FDvMzu1ox8zv yX+h0NtdK26DBcC+efNUEcdKbmfXybC3PRvGHV3lU91XYqa2O0TVYDowKPXhCLLTVdB3 vT+zsJH/56MktDkUaRNHtSWDZMYFroeGBUG+lh/uoO6u/PgMo2lVfyBIPHOyAimGdKKc JthQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=RIfgFSsK; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f5si6821656ejw.117.2020.12.07.07.12.40; Mon, 07 Dec 2020 07:13:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=RIfgFSsK; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbgLGPLK (ORCPT + 99 others); Mon, 7 Dec 2020 10:11:10 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:34855 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbgLGPLJ (ORCPT ); Mon, 7 Dec 2020 10:11:09 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 9FC2322E0A; Mon, 7 Dec 2020 16:10:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1607353827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wa7mfcuPecF7gpQwpDx0LYocwUQoOJPeyOlLst5l3R8=; b=RIfgFSsKMEbsurvMPnJmmDYSr/zCEVUWqyviNbBT1iB99U+CHdjE45zmy1kSxfPWOVj6AT 7lLOLpk4uFdYRgUi+64kiWkoFm4N0SXkr13rPCBdR6kzxeKtvUGNTfQDmKaJ6q8yNMK/pP lO3D1rXFPS2vkWil61EWnsyd8cJY588= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 07 Dec 2020 16:10:27 +0100 From: Michael Walle 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 User-Agent: Roundcube Webmail/1.4.9 Message-ID: <97c4bb65c8a3e688b191d57e9f06aa5a@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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