From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Eq64tswFFHWt for ; Mon, 13 Aug 2012 12:02:18 +0200 (CEST) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Mon, 13 Aug 2012 12:02:18 +0200 (CEST) Received: by eaak14 with SMTP id k14so934060eaa.37 for ; Mon, 13 Aug 2012 03:02:17 -0700 (PDT) Message-ID: <5028D0A5.2050202@gmail.com> Date: Mon, 13 Aug 2012 12:02:13 +0200 From: Milan Broz MIME-Version: 1.0 References: <5024ECA8.9050509@redhat.com> In-Reply-To: <5024ECA8.9050509@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] veritysetup support for files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wesley Miaw Cc: "dm-crypt@saout.de" On 08/10/2012 01:12 PM, Milan Broz wrote: > On 08/09/2012 07:27 PM, Wesley Miaw wrote: > >> The result I need is one file that contains a filesystem image (this >> would have already been created ahead of time), a second file that >> contains the raw hash data for that filesystem image, and a third >> file containing the dm-verity table parameters. I am creating the >> last file by redirecting veritysetup stdout to a file. > > Ah, ok. So your only request is that raw hash data image is created > automatically as file (if parameter is not a block device directly) > and that this file doesn't need to be pre-allocated, correct? > > I think I can do it even without introducing new library function > (I really do not want next context constructor type here). > > I'll reply once I will have something ready for testing. Can you try current git version? I changed device helpers so loop is now allocated only when it is neccessary for device-mapper (where block device is always required). Veritysetup now also create new hash image in format (if not already there). It still need root privilege (in some command just to initialize DM) but I think it should works as you need now. Let me know if it works for you please... Thanks, Milan