From owner-freebsd-geom@FreeBSD.ORG Wed Sep 19 04:04:31 2012 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A39A8106566B for ; Wed, 19 Sep 2012 04:04:31 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) by mx1.freebsd.org (Postfix) with ESMTP id 7697B8FC0A for ; Wed, 19 Sep 2012 04:04:31 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id q8J44UJV030072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Sep 2012 21:04:30 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id q8J44UsJ030071 for freebsd-geom@FreeBSD.org; Tue, 18 Sep 2012 21:04:30 -0700 (PDT) (envelope-from jmg) Date: Tue, 18 Sep 2012 21:04:30 -0700 From: John-Mark Gurney To: freebsd-geom@FreeBSD.org Message-ID: <20120919040430.GF19036@funkthat.com> Mail-Followup-To: freebsd-geom@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 18 Sep 2012 21:04:30 -0700 (PDT) Cc: Subject: geli and BIO_FLUSH and/or BIO_ORDERED issue? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 04:04:31 -0000 I was looking at geli and I'm not sure if it's implementing BIO_FLUSH and/or BIO_ORDERED properly... >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... 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.. 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... Any comments about this? Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."