From owner-freebsd-geom@FreeBSD.ORG Fri Apr 23 04:36:09 2010 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 58EC2106564A; Fri, 23 Apr 2010 04:36:09 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward3.mail.yandex.net (forward3.mail.yandex.net [77.88.46.8]) by mx1.freebsd.org (Postfix) with ESMTP id 029438FC1B; Fri, 23 Apr 2010 04:36:08 +0000 (UTC) Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward3.mail.yandex.net (Yandex) with ESMTP id 30E3E56D915A; Fri, 23 Apr 2010 08:36:07 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1271997367; bh=9ZnhZLMFYsHw1SKkNltUZwmcAj4S2t1ed20q78mnwHQ=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=RT9NXyuADFcW+ZtMkGsb1Xlx2W6dVuUTOMDX03xmAlrmmFQf6egH+HWsBoFPAA/jV nvVDHUmScthDlxZtHIs3My2jiERpl1h5frRVZF4AzZv06oNZLcPRHXOWsag562Xuvl YliyLPB3ERMIM8tDUHoDrJl0TjdtPv8t3JRHds/M= Received: from [127.0.0.1] (ns.kirov.so-ups.ru [77.72.136.145]) by smtp2.mail.yandex.net (Yandex) with ESMTPSA id E4528528080; Fri, 23 Apr 2010 08:36:06 +0400 (MSD) Message-ID: <4BD123B5.1020506@yandex.ru> Date: Fri, 23 Apr 2010 08:36:05 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Andriy Gapon References: <4BCEE9E2.6010007@yandex.ru> <4BCEEC66.1080804@yandex.ru> <4BCEEF06.8010203@icyb.net.ua> <4BCEF5F8.6090102@yandex.ru> <4BCF04C7.1050701@icyb.net.ua> <4BD03472.6030201@yandex.ru> <4BD0B731.7060902@icyb.net.ua> In-Reply-To: <4BD0B731.7060902@icyb.net.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Yandex-TimeMark: 1271997367 X-Yandex-Spam: 1 X-Yandex-Front: smtp2.mail.yandex.net Cc: Marcel Moolenaar , freebsd-geom@FreeBSD.org Subject: Re: [patch] resize and recover support for GPART GPT scheme 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: Fri, 23 Apr 2010 04:36:09 -0000 On 23.04.2010 0:53, Andriy Gapon wrote: >> There are several things that can be do where i need suggestions. >> 1. What code should do when user doing `gpart recover` for scheme >> that doesn't need recovering? > > Do you mean the schemes that do not support recovery (like MBR)? The answer is > obvious. > If you mean GPT in OK state, when both copies are correct, then the code could > just return success and, perhaps, some diagnostic message. Schemes that do not support recovery will return ENOSYS. Currently `gpart recover` will write metadata each time when user calls it. To prevent this behavior needed something similar ENOTNEEDED :) >> 2. Probably there are needed some checks before changing metadata in >> g_part_gpt_recover method. >> >> So, patch attached and comments are welcome. > > Without deep analysis the patch looks good. Actually this was an implementation of `reinit` verb, but after some thinking i decided to make it as `recover` verb. And in this case using AlternateLBA is not needed. At this time it may be usable only for reporting that secondary table is not located at the last LBA. > Just to be sure - it handles the case when primary table is corrupt but the > secondary (at the end of media) is OK? Yes. > I will try to fully review your patch a little bit later. Thank you, but i still wait what Marcel will say about this patch and several others. -- WBR, Andrey V. Elsukov