From nobody Wed May 31 07:30:43 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QWLYz6ndvz4YF7h for ; Wed, 31 May 2023 07:32:07 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QWLYy4kXmz3Hqh for ; Wed, 31 May 2023 07:32:06 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=holgerdanske.com header.s=nov-20210719-112354 header.b=d7MQSuFm; spf=pass (mx1.freebsd.org: domain of dpchrist@holgerdanske.com designates 184.105.128.27 as permitted sender) smtp.mailfrom=dpchrist@holgerdanske.com; dmarc=pass (policy=none) header.from=holgerdanske.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=holgerdanske.com; s=nov-20210719-112354; t=1685518259; bh=hw7P2bfsj831F+WQG4NDtB7/Eza2UKlWDTXhwXsFlu4=; h=Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=d7MQSuFmCSuJDO7r0GGmL0WRBoWi5bMu4JJ+xm0zmCKWdwoG3nOSTh7ABLdNm/Gxa d6Z55alpDX3z41GOXlPJQeUJLF16zYH4HgWjoP9kMf9+OEQXnbsdaxZfbf7KulbFbo +fGKRYT+K+6n9DZ/OC+++fD9BENOu70elNY6acgufV5z3xBIcAaApQw3W8Y3kR3CS0 k2xZ+XKjjv2iSPF9+WLu8Ws5dtHBGA0G/vVKj0z9rEW9P5M2p4cI9ru3Hy8mzlRb1R IP0z7BjvDoj3kt3++w+2hO9SC3crSH3v2/3n5LQWQWWRHhYKs2NEuO3/h53LuZVsSp rcz7AHve3Ncz9Ti090zsBsSCQBC1lPZXpdJnHU96bx6Ho/c6S9sXpDd1NwKmiKiYXm y5hcGv8zi3u3RMl9HiOs+5uAabYMmLGhMET7z55oVPZ1Kz+t/C9SZxELD57iGfGmbZ xqR2RckmKDBS0HL5wiUmrkzIWeQnBIoXd/bO4hfVbyaAz3h0231iUg3+pVa9nVQR2j hu19ivajj/j/6CYA1pjBXXjduAR0askKUyCX8UVQ3TpW4DCmSD0sW/nIzyQAqX/VYy hEnsZ2owsK4yecyJB7dq+QGP8a+SdcsPWoPjh9ySaumYEgbw/1cyDHTwbl4CRxsktE o5rB+HWrIqVpzAZ5ZzZd6nxQ= Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Wed, 31 May 2023 00:30:59 -0700 Message-ID: <82a367dd-a32e-17c7-acf7-1f6992ff20af@holgerdanske.com> Date: Wed, 31 May 2023 00:30:43 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: read and write back full disk to trigger relocation Content-Language: en-US To: questions@freebsd.org References: <1957739901.520492.1685310340560@ichabod.co-bxl> <0d0186c5-9542-1af3-2ce3-e28480b4b6d7@holgerdanske.com> <1961596841.3509648.1685359514813@fidget.co-bxl> <00671d49-83b1-26a0-4e28-47eb0d7cb95c@holgerdanske.com> <2025846914.656453.1685438293844@ichabod.co-bxl> <343655931.86727.1685490563032@ichabod.co-bxl> From: David Christensen In-Reply-To: <343655931.86727.1685490563032@ichabod.co-bxl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[holgerdanske.com,none]; R_SPF_ALLOW(-0.20)[+a]; R_DKIM_ALLOW(-0.20)[holgerdanske.com:s=nov-20210719-112354]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[holgerdanske.com:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QWLYy4kXmz3Hqh X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/30/23 16:49, Sysadmin Lists wrote: > David Christensen May 30, 2023, 4:16:09 PM >> I would say the experiment should be repeated on real HDD's, but how do >> I detect if identical data has being written to the platters? The HDD >> controller also has a cache and could optimize away such writes. > > Isn't that what dd is claiming authoritatively to be doing? Otherwise, putting > that example in the manpage is dangerous and can lead to unexpected data loss. > > I don't speak C++ very good, but here's the source: > https://github.com/coreutils/coreutils/blob/master/src/dd.c Looking at FreeBSD code will not provide information about the HDD controller hardware and firmware. David