From nobody@FreeBSD.org  Sat Nov  6 17:31:21 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B49E0106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Nov 2010 17:31:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A24CE8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  6 Nov 2010 17:31:21 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA6HVKW0006756
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 6 Nov 2010 17:31:20 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA6HVKSC006755;
	Sat, 6 Nov 2010 17:31:20 GMT
	(envelope-from nobody)
Message-Id: <201011061731.oA6HVKSC006755@www.freebsd.org>
Date: Sat, 6 Nov 2010 17:31:20 GMT
From: yamayan <yamayan@wind.sannet.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: geli version check
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151989
>Category:       kern
>Synopsis:       [geli] [patch] fix geli version check
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 06 17:40:07 UTC 2010
>Closed-Date:    Fri Nov 12 16:02:31 UTC 2010
>Last-Modified:  Fri Nov 12 16:02:31 UTC 2010
>Originator:     yamayan
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD genius 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r214545M: Sat Oct 30 14:34:42 JST 2010     root@genius:/usr/obj/usr/src/sys/NYANCO  amd64

>Description:
geli version check accept ONLY newest metadata.
older geli disk cannot attach.
>How-To-Repeat:
older version geli init disk without -b option.
newest version geli attach disk.
>Fix:
geli version check in g_eli_config(sys/geom/eli/g_eli_ctl.c)
  accept older version as same as g_eli_taste(g_eli.c).


Patch attached with submission follows:

--- sys/geom/eli/g_eli_ctl.c.orig	2010-11-06 01:19:09.000000000 +0900
+++ sys/geom/eli/g_eli_ctl.c	2010-11-06 01:20:37.000000000 +0900
@@ -1017,7 +1017,7 @@
 		gctl_error(req, "No '%s' argument.", "version");
 		return;
 	}
-	if (*version != G_ELI_VERSION) {
+	if (*version > G_ELI_VERSION) {
 		gctl_error(req, "Userland and kernel parts are out of sync.");
 		return;
 	}


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-geom 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Nov 12 09:27:59 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151989 
State-Changed-From-To: open->closed 
State-Changed-By: pjd 
State-Changed-When: ptk 12 lis 2010 15:55:42 UTC 
State-Changed-Why:  
As the error message states, the check you modified verifies if geli(8) 
userland tool is in sync with geom_eli.ko kernel module. GELI handles older 
metadata just fine. 
For the future always update both userland and kernel. 


Responsible-Changed-From-To: freebsd-geom->pjd 
Responsible-Changed-By: pjd 
Responsible-Changed-When: ptk 12 lis 2010 15:55:42 UTC 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151989 
>Unformatted:
