From owner-freebsd-questions@FreeBSD.ORG Thu Dec 18 07:26:52 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A94B0106564A for ; Thu, 18 Dec 2008 07:26:52 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 74B9D8FC19 for ; Thu, 18 Dec 2008 07:26:52 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id AA111AFBC02; Wed, 17 Dec 2008 22:26:51 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Thu, 18 Dec 2008 08:26:49 +0100 User-Agent: KMail/1.9.7 References: <4947B8AB.7000304@dugas-family.org> <200812170947.12794.fbsd.questions@rachie.is-a-geek.net> <4948D650.8040603@dugas-family.org> In-Reply-To: <4948D650.8040603@dugas-family.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812180826.49948.fbsd.questions@rachie.is-a-geek.net> Cc: Bernard Dugas Subject: Re: Extracting changed files list from snapshot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 07:26:52 -0000 On Wednesday 17 December 2008 11:37:04 Bernard Dugas wrote: > Mel wrote: > > On Tuesday 16 December 2008 15:18:19 Bernard Dugas wrote: > >>I want to extract the list of files changed between 2 snapshots, to be > >>able to do efficient backups. > > And what snapshots do you mean? As in mksnap_ffs? Cause that's described > > in /usr/src/sys/ufs/ffs/ffs_snapshot.c: > > 127 TAILQ_HEAD(snaphead, inode); > > 128 > > 129 struct snapdata { > > 130 struct snaphead sn_head; > > 131 daddr_t sn_listsize; > > 132 daddr_t *sn_blklist; > > 133 struct lock sn_lock; > > 134 }; > > 135 > > > > and not exposed to userland. > > Thanks, this is a good hint ! Just needing some doc and help to > understand how to use it : i'm more in design now, programmation skills > are far away :-( I'm still wondering if you're not better off with ZFS, but this does seem like a useful app in it's own right. The TAILQ_HEAD statement means it's creating a tail queue(3) (double linked fifo/stack) of inodes. The snapdata structure contains the start of the list, the size and a lock. The sn_blklist pointer, I will have to look up. I think i'm gonna have fun with this for a bit ;) -- Mel Problem with today's modular software: they start with the modules and never get to the software part.