From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [Patch 1/1] CLD: Introduce the "New CLD" API Date: Mon, 08 Feb 2010 07:32:56 -0500 Message-ID: <4B700478.3020305@garzik.org> References: <20100207121550.7ee94ff6@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fi6XTqPhL8sXowievWm+Cv+M+C1tKn9Wla/IQ/0oJxM=; b=dcgT1CKtpTniEMObt7ryX9pd0CpWBYVFsXeSv3wtu+c7B6FFb13WL3NoTTSC7JrsOk nHJRiiHA/D0lHyL0TndxS4q8zS6lVbfgFIyAaQmCkEpPcgpEyma/L/Vdepa+ulwlO5T5 MWOWzneCr//Etd/DENe/eBnxWUxhJL7sDdmj0= In-Reply-To: <20100207121550.7ee94ff6@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List On 02/07/2010 02:15 PM, Pete Zaitcev wrote: > The "traditional" CLD API is too difficult to program. In particular, > switching from a rigid "Group" policy to arbitrary paths in existing > clients in Chunk and tabled turned out to be next to impossible. > The issue is due to the fundamental nature of the API as based on very > fine-grained events. > > So, in the interests of clients, introduce the "new" API. Its basic > definition is in. It presents a filesystem-like interface, > extended with event callbacks for coarse events, such as an end of > CLD session. > > The patch converts all in-tree clients from cldc_xxx to ncld_xxx and > discards some of code that became unused (test/util.c). > > Signed-Off-By: Pete Zaitcev > > --- > include/Makefile.am | 2 > include/ncld.h | 88 ++ > lib/cldc-dns.c | 92 +- > lib/cldc.c | 856 ++++++++++++++++++++++++++ > test/Makefile.am | 5 > test/it-works.c | 125 --- > test/load-file-event.c | 244 +------ > test/lock-file-event.c | 269 +------- > test/save-file-event.c | 245 ------- > test/test.h | 5 > test/util.c | 79 -- > tools/cldcli.c | 1249 ++++++++++----------------------------- > 12 files changed, 1433 insertions(+), 1826 deletions(-) applied, with changes: - some cosmetic reformatting, to match existing code - log param in cldc-dns should not be made conditional as an undocumented side effect of ncld