From nobody Sat Feb 5 09:50:08 2022 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 C1CAF19B08E6; Sat, 5 Feb 2022 09:50:16 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JrSLw4wKLz4XCy; Sat, 5 Feb 2022 09:50:16 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644054616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8UuycKd7Jw+0pRNeJ79pjKwEN1kpxCxQ7Y0rULrcOqo=; b=EMp/DsKDFM8U28TK09eHzDvudh9tZQoRp/cDUb1rOOQtXZf6PVj6dEgrYGQq6IYxwFyasC 0snPlI9iMlcnROt/ve8ZLPk4CFP41NukDSGpNTzlQNxegsRNbmGFUX//dr4ptqLF5mR4kP /2GyiMVU+ohAGRyCe8dlNWA9VpavhQ8QYmx1etixzTYNwioIwsAPfG2pGde5A8uCv6JJi1 Q4Ej0gEh0ZVIkwMhTURj1STX17AVCecJfsyBKQj7He7rrGFOMHzEcZbb98wKKM4xVv7Q2b sxvZ1tz2EQsqGmlaCZiyfi12ZeOVnspc2FDLFh/rPGNvF8iI39mFc9+fUlrpLA== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 021252FA6; Sat, 5 Feb 2022 09:50:14 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 5 Feb 2022 20:50:08 +1100 From: Peter Jeremy To: Andriy Gapon Cc: Warner Losh , Konstantin Belousov , FreeBSD FS , "freebsd-geom@FreeBSD.org" Subject: Re: bio re-ordering Message-ID: References: <9848cde6-5c12-cdd4-e722-42fe26fa0349@FreeBSD.org> 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: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4gJQ1wOmIuMqLtLv" Content-Disposition: inline In-Reply-To: <9848cde6-5c12-cdd4-e722-42fe26fa0349@FreeBSD.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644054616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8UuycKd7Jw+0pRNeJ79pjKwEN1kpxCxQ7Y0rULrcOqo=; b=Dz8f39brrp1+MhDrjZ1pc06tq6FjTA+u3oFgQuVzKKRJxvBzrjgx+UJ1xugRj+ZsswNnda KDoM1VHFnRLzUQZB73INuA/4EZ90UTLZAgYA1eGowncjYdqsh2ZfKhO+gRkS2G49mV9o+i ZnnujAFiLGdXTdgFDoEJ//t/tQZBkYtwKmCunvmRtU4esKAL4TLAVucjOCxazZHSOdGnP7 uEIH22e4gXzlTlkkaSkf3eW6ycrJtFUmlr0tJDsD8wfFjAZcQ7HbUgmSkBlQtCaGNZIu/Z mpq8+wJRgIv7TLBBr8olLi+itTU6gYXjNFGi7SfV3F9oqr+WOydNhs4EE+9UWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644054616; a=rsa-sha256; cv=none; b=Rlzra6ovuig9DcFIAGU76c2jCb35noqnTKfnTuCjVE0yTkpPPVwInv/hGjDselgGBvtC8G vVhHW7G17ACBuT6jpgKM22c4E1T5O9xnALrH+1ahKefiikjcNWuvL9SjxtdU5+qVT5KhCm mf+zSSW9HadH61QlXz6HkNYo6VkLAkYxl+AH9hM7RWOOraIIA6M4jAVmC3Z25jU1LxQn+v eOmWVQrSzh8h8+g22hUhmRqZhraLeTaBTMpBhVqmj+K+0aVxvrDB3sNPSAK0r2hYyOoFI0 qZ5p5X6BO6ctcq9x5a6pipbiHsv7yDm18smUCxePjStRLvLmlS8QK2QFvbpurQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --4gJQ1wOmIuMqLtLv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2022-Feb-02 11:49:44 +0200, Andriy Gapon wrote: >On 02/02/2022 11:14, Warner Losh wrote: >> On Wed, Feb 2, 2022 at 2:05 AM Andriy Gapon > > wrote: >> Hmm... it looks like both the old and new (Open)ZFS use BIO_FLUSH co= mmand >> without BIO_ORDERED flag.=A0 Not sure if it happens to do the right = thing anyway >> or not. >>=20 >>=20 >> It's an unordered flush then. The flush will happen whenever. I have a v= ague >> memory that ZFS will only issue this command in cases where there's no o= ther I/O >> pending. > >I think that there is still a potential problem that an earlier write requ= est=20 >might get re-ordered after the flush. >I think that we should add BIO_ORDERED for correctness. I've raised https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261731 to make geom_gate support BIO_ORDERED. Exposing the BIO_ORDERED flag to userland is quite easy (once a decision is made as to how to do that). Enhancing the geom_gate clients to correctly implement BIO_ORDERED is somewhat harder. I've done some experiments and OpenZFS doesn't generate BIO_ORDERED operations so I've also raised https://github.com/openzfs/zfs/issues/13065 I haven't looked into how difficult that would be to fix. --=20 Peter Jeremy --4gJQ1wOmIuMqLtLv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmH+SElfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTivg/8CcwhVnxHJpnxtsZD2pywTCT4lba0/1KOqdA2686dSvOhQheLmHAANBkW Sy3/EeDNU2PxVEEfIQEpJSuC1SUg/pfvvtSs4EFqT4sEE9uDZ4yJPi1J5ZwqT62H gBmp42sU8xY4Pzu0kT/Pnp7p7zpHOJBG51c2Xsz/Cc1+mxJfCwJ1fKE3Gf9rsvsF bJUL50+6sf+yNUg+jdySfOeeAvTNJUj2M4hxdRUDCtP+OxSI+Y/slSflQHtR+KLQ C+6RF22HDs7mSwzz37T3MWa3dmctbSSsCLDrTndN4uzPGe9OPBNy9H9jhbVqPUdH 96u5c5q/JTEPEpHVibtItKOzy/fv7YGfbTk/NSAeL+lq2qg9N3w2LShdVbbcj0lJ JwzmZ0Fc8bc2tTtPrcbbL6HsO9hQX2c3EA9NqIFdMt5tTt30MXRACIzfgIBWKDnK 9+HgQuZVF8ZwyJrQfQ7DycC4+oYvvHatcHJvGL7MjwQBKGwNKD8C/mGrrIG4Ovb6 v37jA28UN9ri1lhnMvJQxQecghoKnYIaOD2OgmrFZhfjzt3KHFRF/+Wp5tQ6IK37 7cPfl5fZLAJTNtvWJ+ruODROh4PKisto+bTgzphuuMnVy15fPnaHKDbn9cAQbIoF QmXO9WDFtj9NILEomD0dh4zfCkKCbgeK4JuIjkBZjVfPemyfOlY= =FfaK -----END PGP SIGNATURE----- --4gJQ1wOmIuMqLtLv--