From nobody Mon Jan 27 04:46:50 2025 X-Original-To: freebsd-geom@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 4YhG9N71B0z5mCJP for ; Mon, 27 Jan 2025 04:47:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YhG9M3Jmhz4MnC for ; Mon, 27 Jan 2025 04:47:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 50R4kovW029288; Mon, 27 Jan 2025 06:46:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 50R4kovW029288 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 50R4koXB029287; Mon, 27 Jan 2025 06:46:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 27 Jan 2025 06:46:50 +0200 From: Konstantin Belousov To: Jonathan Krebs Cc: freebsd-geom@freebsd.org Subject: Re: when does BIO_FLUSH happen on a disk? Message-ID: References: <2e177cef-f703-4572-abc0-665d8702b55f@lists.freebsd.org.olpp.net> List-Id: GEOM-specific discussions and implementations List-Archive: https://lists.freebsd.org/archives/freebsd-geom List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-geom@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e177cef-f703-4572-abc0-665d8702b55f@lists.freebsd.org.olpp.net> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-0.81 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-0.90)[-0.896]; NEURAL_HAM_MEDIUM(-0.55)[-0.545]; NEURAL_HAM_SHORT(-0.37)[-0.374]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-geom@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; HAS_XAW(0.00)[] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4YhG9M3Jmhz4MnC On Sun, Jan 26, 2025 at 08:56:47PM +0100, Jonathan Krebs wrote: > @Konstantin Belousov: Thank You for the fast and helpful explanation! > > but does a finished write request from a disk / lower geli layer mean, that > the data arrived on stable storage (in which case BIO_FLUSH seems > unnecessary to exist) - or does fsync on UFS only guarantee ordering with > respect to other operations on the same filesystem? The callback called means that the disk hardware reported the completion of the request (and it implies that the request was received by hw at all). It is up to hw to interpret the meaning of completion. For instance, if there is on-disk cache, it is possible that the dirty block is only reached cache and not the actual storage. Often disks try to ensure that the cache is written out as the last sigh on the power failure event, and explicit flush might not change the behavior.