From owner-freebsd-fs@FreeBSD.ORG Wed Oct 8 08:28:24 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A39DBBB9 for ; Wed, 8 Oct 2014 08:28:24 +0000 (UTC) Received: from cu01176a.smtpx.saremail.com (cu01176a.smtpx.saremail.com [195.16.150.151]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D983AC3 for ; Wed, 8 Oct 2014 08:28:23 +0000 (UTC) Received: from [172.16.2.2] (izaro.sarenet.es [192.148.167.11]) by proxypop03.sare.net (Postfix) with ESMTPSA id EE9469DE650; Wed, 8 Oct 2014 10:28:19 +0200 (CEST) Subject: Re: ZFS API Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Borja Marcos In-Reply-To: <5433F7B5.8090604@bytecamp.net> Date: Wed, 8 Oct 2014 10:28:18 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <7BD1DA91-6667-4183-B4C2-297FA1602703@sarenet.es> References: <1422065A4E115F409E22C1EC9EDAFBA46044E4@sofdc01exc02.postbank.bg> <1422065A4E115F409E22C1EC9EDAFBA4604B35@sofdc01exc02.postbank.bg> <757ED2D6-0585-43C1-B827-FB349045246A@pingpong.net> <1422065A4E115F409E22C1EC9EDAFBA4604B8D@sofdc01exc02.postbank.bg> <5433F7B5.8090604@bytecamp.net> To: Robert Schulze X-Mailer: Apple Mail (2.1283) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2014 08:28:24 -0000 On Oct 7, 2014, at 4:24 PM, Robert Schulze wrote: > Am 07.10.2014 16:15, schrieb Ivailo A. Tanusheff: >> I want to achieve an automated snapshot creation/removal trough C = written daemon by myself. >> Obvious there is an API, but without proper documentation. >=20 > KISS. >=20 > This can easily be done with any scripting language/shell, no need to = code that in C. It depends on your goals. Relying on scripts running commands and = parsing their output is not what I would call sound software design. So much can go wrong. If you are just putting = together some tools do to some light work it's fine, though. The problem with the API is that, as far as I know, it is not stable. It = hasn't been defined as a valid interface to control ZFS, but just a convenience library and interface between the command = line tools and the underlying system. Hence, it can change completely even with an apparently minor update, so relying = on it is even worse than playing command parsing. It would be great to have a reliable API. Borja.