From owner-freebsd-geom@FreeBSD.ORG Thu Aug 10 18:47:36 2006 Return-Path: X-Original-To: freebsd-geom@FreeBSD.org Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 387F416A4E1; Thu, 10 Aug 2006 18:47:36 +0000 (UTC) (envelope-from craig@xfoil.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99D5B43D70; Thu, 10 Aug 2006 18:47:28 +0000 (GMT) (envelope-from craig@xfoil.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id E6865117D0; Thu, 10 Aug 2006 13:47:27 -0500 (CDT) Date: Thu, 10 Aug 2006 13:47:23 -0500 From: Craig Boston To: Pawel Jakub Dawidek Message-ID: <20060810184702.GA8567@nowhere> Mail-Followup-To: Craig Boston , Pawel Jakub Dawidek , freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-geom@FreeBSD.org References: <20060808195202.GA1564@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline In-Reply-To: <20060808195202.GA1564@garage.freebsd.pl> User-Agent: Mutt/1.4.2.2i Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-geom@FreeBSD.org Subject: Re: GJournal (hopefully) final patches. 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: Thu, 10 Aug 2006 18:47:36 -0000 --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, It's great to see this project so close to completion! I'm trying it out on a couple machines to see how it goes. A few comments and questions: * It took me a little by surprise that it carves 1G out of the device for the journal. Depending on the size of the device that can be a pretty hefty price to pay (and I didn't see any mention of it in the setup notes). For a couple of my smaller filesystems I reduced it to 512MB. Perhaps some algorithm for auto-sizing the journal based on the size / expected workload of the device would be in order? * Attached is a quick patch for geom_eli to allow it to pass BIO_FLUSH down to its backing device. It seems like the right thing to do and fixes the "BIO_FLUSH not supported" warning on my laptop that uses a geli encrypted disk. * On a different system, however, it complains about it even on a raw ATA slice: atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0 ata0: on atapci1 ad0: 114473MB at ata0-master UDMA100 GEOM_JOURNAL: BIO_FLUSH not supported by ad0s1e. It seems like a reasonably modern controller and disk, at least it should be capable of issuing a cache flush command. Not sure why it doesn't like it :/ * How "close" does the filesystem need to be to the gjournal device in order for the UFS hooks to work? Directly on it? The geom stack on my laptop currently looks something like this: [geom_disk] ad0 <- [geom_eli] ad0.eli <- [geom_gpt] ad0.elip6 <- [geom_label] gjtest <- [geom_journal] gjtest.journal <- UFS I was wondering if an arrangement like this would work: [geom_journal] ad0p6.journal <- [geom_eli] ad0p6.journaleli <- UFS and if it would be any more efficient (journal the encrypted data rather than encrypt the journal). Or even gjournal the whole disk at once? Haven't been brave enough to try gjournal on root yet, but my /usr and /compile (src, obj, ports) partitions are already on it so I'm sure I'll try it soon ;) Craig --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="geli-bioflush.patch" === sys/geom/eli/g_eli.c ================================================================== --- sys/geom/eli/g_eli.c (revision 23) +++ sys/geom/eli/g_eli.c (local) @@ -340,6 +340,7 @@ case BIO_READ: case BIO_WRITE: case BIO_GETATTR: + case BIO_FLUSH: break; case BIO_DELETE: /* @@ -375,6 +376,7 @@ wakeup(sc); break; case BIO_GETATTR: + case BIO_FLUSH: cbp->bio_done = g_std_done; cp = LIST_FIRST(&sc->sc_geom->consumer); cbp->bio_to = cp->provider; --24zk1gE8NUlDmwG9--