From owner-freebsd-fs@FreeBSD.ORG Sun Sep 23 12:34:00 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63DEA106567B; Sun, 23 Sep 2012 12:34:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A34C08FC1E; Sun, 23 Sep 2012 12:33:59 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so6892399lbb.13 for ; Sun, 23 Sep 2012 05:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Yt/igrYH/e7k0e+89CIJa5hTDgtuHm+Gb/QnCz7ZGgw=; b=bvp0eKTlNNaLHwjU2UaxYIZCbMR657sKYuzs1pBHDovVYWdxVRdAt2DqMdttMP/KvL ReLl8I/YkKwh/6XjtUtDHXsIzBAGHGQz9TH3JM3w8Yx/l4/YATbT5dEj3j1px4Lfn7c0 J0VbujqRvQy0EC8K6S6zUL3UCU+zPrW8TuOZpGyE/h/erExgmUEsHZzDmoxZLIuHQ3ve H32SXXREK7IH7HXgRSt6bOfCw8l625cPNICLzEx8TZjf8eewyFTgxkfb4dUR4X4c3tFg GybaAfMh5Gj681sMB/ootmjiMMRSR+U7/rkGaT6B67tpWgRrAHvwFj23QX8G1nj7C6xU mm1w== Received: by 10.152.104.77 with SMTP id gc13mr8413590lab.31.1348403638134; Sun, 23 Sep 2012 05:33:58 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id d1sm3550533lbh.7.2012.09.23.05.33.56 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Sep 2012 05:33:57 -0700 (PDT) Sender: Alexander Motin Message-ID: <505F01B2.3080709@FreeBSD.org> Date: Sun, 23 Sep 2012 15:33:54 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <505DE566.2080307@FreeBSD.org> In-Reply-To: <505DE566.2080307@FreeBSD.org> Content-Type: text/plain; charset=x-viet-vps; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: lszfs command for loader X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 12:34:00 -0000 On 22.09.2012 19:20, Andriy Gapon wrote: > Please find a patch that implements lszfs loader command. > The command can list child filesystems of a specified filesystem (including root > dataset). > The command is really simplistic, a list goes directly to console, so there is > no filtering of hidden filesystem names etc. > > The command is intended to facilitate recovery on systems that use "Boot > Environments" approach for boot/root filesystem. > > http://people.freebsd.org/~avg/lszfs.diff That is good for the beginning, but I believe it is not right to add ZFS-specific commands when it is possible to avoid it. I would prefer to see lsdev report ZFS file systems same as it reports disk partitions or ZFS pools. I am going to work in that part. Also I would like to see lsdev output refactored to be formal enough to use these data in loader menu. After some look on forth code I see no big problem to pass data there. All we need to do is to extend device API of libstand with some method replacing dv_print() with something more alike to readdir(). -- Alexander Motin