Date: Sat, 5 Feb 2022 20:50:08 +1100 From: Peter Jeremy <peterj@freebsd.org> To: Andriy Gapon <avg@freebsd.org> Cc: Warner Losh <imp@bsdimp.com>, Konstantin Belousov <kostikbel@gmail.com>, FreeBSD FS <freebsd-fs@freebsd.org>, "freebsd-geom@FreeBSD.org" <freebsd-geom@freebsd.org> Subject: Re: bio re-ordering Message-ID: <Yf5IUCWW/tgI/Cse@server.rulingia.com> In-Reply-To: <9848cde6-5c12-cdd4-e722-42fe26fa0349@FreeBSD.org> References: <YfTCs7j3TPZFcFCD@server.rulingia.com> <YfTEj1KLhQhoR3xP@kib.kiev.ua> <CANCZdfoqQ3Ze%2BcMTsk_ho9x8hsSM9=fTavSao%2BUtwc2nSAEJpQ@mail.gmail.com> <Yfo3i9Yy/uCUpss1@server.rulingia.com> <CANCZdfqBQOvzMCrJxWq9GzqCKyK_AubBE1CxAW5FULnE7D_jrg@mail.gmail.com> <b75872f4-521b-5eab-68d0-4b1c04a10add@FreeBSD.org> <CANCZdfp=0rbBkr4SoXhvn7hrQniPQzTeZra2HGBwXDGsJjN8XQ@mail.gmail.com> <9848cde6-5c12-cdd4-e722-42fe26fa0349@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <avg@freebsd.org> wrote: >On 02/02/2022 11:14, Warner Losh wrote: >> On Wed, Feb 2, 2022 at 2:05 AM Andriy Gapon <avg@freebsd.org=20 >> <mailto:avg@freebsd.org>> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Yf5IUCWW/tgI/Cse>