From: Theodore Ts'o Subject: Re: [PATCH] mke2fs: restore verbose message for BLKDISCARD Date: Fri, 8 Mar 2013 14:06:35 -0500 Message-ID: <20130308190635.GC12008@thunk.org> References: <1362515118-30344-1-git-send-email-swarren@wwwdotorg.org> <5138EEBD.5000705@wwwdotorg.org> <513A1D56.1010402@wwwdotorg.org> <20130308190019.GB12008@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: =?utf-8?B?THVrw6HFoQ==?= Czerner , Chris Ball , linux-ext4@vger.kernel.org, Stephen Warren To: Stephen Warren Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:52024 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157Ab3CHTGj (ORCPT ); Fri, 8 Mar 2013 14:06:39 -0500 Content-Disposition: inline In-Reply-To: <20130308190019.GB12008@thunk.org> Sender: linux-ext4-owner@vger.kernel.org List-ID: Here's an idea. What if we set a timer when send the first probing discard, and if it takes too long, we print an error message and then try to recover. More generally, if we can't trust a device's advertised discard parameters, maybe it makes sense to create a userspace program that benchmarks the device to determine various critical flash parameters, including "does discard really work?" "Is it hopelessly slow"', and "what is the erase block size"? This program can then send the appropriate parameters to a filesystem's mkfs program. - Ted