Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Sep 2012 18:20:26 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        freebsd-geom@FreeBSD.org
Subject:   Re: geli and BIO_FLUSH and/or BIO_ORDERED issue?
Message-ID:  <20120922162025.GE1454@garage.freebsd.pl>
In-Reply-To: <20120919040430.GF19036@funkthat.com>
References:  <20120919040430.GF19036@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ryJZkp9/svQ58syV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 18, 2012 at 09:04:30PM -0700, John-Mark Gurney wrote:
> I was looking at geli and I'm not sure if it's implementing BIO_FLUSH
> and/or BIO_ORDERED properly...
>=20
> >From my understanding is the BIO_ORDERED is suppose to wait for the
> previous _WRITES to complete before returning so that you can ensure
> that data is on disk, i.e. _ORDERED is set on a BIO_FLUSH...
>=20
> BIO_ORDERED is handled by diskq_* code such that when you add an _ORDERED
> command, all commands are put after it, but there doesn't appear to
> be any code to ensure that an _ORDERED command waits for prevoius
> pending commands to complete..
>=20
> This is extra obvious in eli in that a _FLUSH is immediately dispatched,
> even when there may be _WRITEs that haven't been finished encrypting and
> sent down to the disk to get _FLUSHed...
>=20
> Any comments about this?

Hmm, BIO_ORDERED was introduced pretty recently and GEOM classes were
not updated to honour it, but it also seems to be to complex to handle
in GEOM classes. I wonder if we could hold off new writes and wait for
the in-progress writes in GEOM if we spot BIO_ORDERED request without
the need to implement this logic in GEOM classes.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

--ryJZkp9/svQ58syV
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlBd5UkACgkQForvXbEpPzS/RQCgsP3zr1ssR/+lH/TUHFeHH9di
eL8AnjUWMwvqrRkou4YKDe1snt5r/cVR
=rs+F
-----END PGP SIGNATURE-----

--ryJZkp9/svQ58syV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120922162025.GE1454>