On Mon, Nov 9, 2015 at 3:46 PM, Thomas Leonard <[email protected]> wrote:

> Hi Rupert,
>
> The main thing is to implement Irmin's AO signature:
>
>
> https://github.com/mirage/irmin/blob/4ccccb5d3117e4cc1ecff4a83cc508da59006423/lib/irmin.mli#L360
>
> i.e. given a block of data, write it to disk and return its hash.
> Given a hash, return the file data.
>
> You could write the data sequentially to the disk and keep an index of
> where everything has been stored.


I guess a first version of this could keep the whole index cached in memory
for convenience and write updates to a log, flushing a copy to disk every
now and again using double-buffering for example. See
mirage-block-volume[1]'s use of shared-block-ring[2] for an example of
this. For bigger amounts of data we'd probably want to keep the index on
disk too -- perhaps we should have some kind of on-disk b-tree library? I
was wondering about the format used by Linux's dm-thin driver[3]

Cheers,
Dave

[1]
https://github.com/mirage/mirage-block-volume/blob/2ffe5a1b7fd8db83fec5c3c44bab503b85d52390/lib/vg.ml#L416
[2] https://github.com/mirage/shared-block-ring
[3] https://github.com/jthornber/thin-provisioning-tools

Or, you could perhaps use the file's
> hash to decide where to store it. There's also irmin-chunk
> (https://github.com/mirage/irmin-chunk) which says it might help with
> raw device backends, although I'm not sure what the idea is there.
>
>
> On 7 November 2015 at 18:11, Rupert Horlick <[email protected]> wrote:
> > Hi all,
> >
> > I’m investigating using Irmin on top of a Mirage BLOCK implementation.
> I’ve been reading through the source, but I was wondering if anyone could
> point me to the files that will be of most use for this?
> >
> > Thanks,
> >
> > Rupert
> > _______________________________________________
> > MirageOS-devel mailing list
> > [email protected]
> > http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
>
>
>
> --
> Dr Thomas Leonard        http://roscidus.com/blog/
> GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
>
> _______________________________________________
> MirageOS-devel mailing list
> [email protected]
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
>



-- 
Dave Scott
_______________________________________________
MirageOS-devel mailing list
[email protected]
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

Reply via email to