From owner-freebsd-hackers@freebsd.org Fri Nov 23 16:01:03 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 507A2114A889 for ; Fri, 23 Nov 2018 16:01:03 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8428B69CB3; Fri, 23 Nov 2018 16:01:02 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id wANG0xGV083200; Fri, 23 Nov 2018 08:00:59 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id wANG0wHc083199; Fri, 23 Nov 2018 08:00:58 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201811231600.wANG0wHc083199@pdx.rh.CN85.dnsmgr.net> Subject: Re: TRIM utility In-Reply-To: To: lev@freebsd.org Date: Fri, 23 Nov 2018 08:00:58 -0800 (PST) CC: Poul-Henning Kamp , Freebsd hackers list , Eugene Grosbein X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 8428B69CB3 X-Spamd-Result: default: False [-0.51 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.54)[-0.539,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.55)[-0.546,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_HAM_SHORT(-0.30)[-0.296,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.02)[country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 16:01:03 -0000 > On 23.11.2018 14:19, Poul-Henning Kamp wrote: > > >>> Currently it has four options, all of them are, hmm, optional: > > Isn't this the kind of thing that dd(1) should learn about instead ? > One utility to done one thing very well? :-) > > dd(1) is way overloaded, IMHO. I agree here, we do too much of trying to shoe horn things into existing utilities then we end up with a command parser that only a mother could love. trim, hdtrim, blktrim, camtrim, any of them are fine, fstrim is bad, this is not a filesystem op, too bad the next thing that comes along that is "trim" like well have to pick something other than trim. I might ask would it be horribly hard to access the "secure erase" feature from this utility? Or do we have another that can easily get at that function, that is usually the prefered vendor specific method to "trim" the complete drive, often restoring badly leveled SSD's to a performant and usable state. -- Rod Grimes rgrimes@freebsd.org