From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <04ead6105e57897aaa6f8a4f88c32e13@quintile.net> References: <04ead6105e57897aaa6f8a4f88c32e13@quintile.net> From: Ole-Hjalmar Kristensen Date: Wed, 13 Dec 2017 13:37:02 +0000 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary="f40304396124de94e2056038dc2d" Subject: Re: [9fans] A potentially useful venti client Topicbox-Message-UUID: c7124f36-ead9-11e9-9d60-3106f5b1d025 --f40304396124de94e2056038dc2d Content-Type: text/plain; charset="UTF-8" I don't know either, but when I tried flfmt with a vac score as an experiment, I got this: ole@ole-TECRA-R940 ~/Desktop/plan9 $ bin/fossil/flfmt -h 192.168.0.101 -v f648dbae0075eb73bc394ad6cd4c059e655e127c fossil.dat fs header block already exists; are you sure? [y/n]: y fs file is mounted via devmnt (is not a kernel device); are you sure? [y/n]: y 0xfb1e734c 0x1d1feaf1 c85978546e4048fce83120d3992cfc2f57ff2f8c bin/fossil/flfmt: bad root: no qidSpace /* * Maximum qid is recorded in root's msource, entry #2 (conveniently in e). */ ventiRead(e.score, VtDataType); if(!mbUnpack(&mb, buf, bsize)) sysfatal("bad root: mbUnpack"); meUnpack(&me, &mb, 0); if(!deUnpack(&de, &me)) sysfatal("bad root: dirUnpack"); if(!de.qidSpace) sysfatal("bad root: no qidSpace"); qid = de.qidMax; It seems that the vac archive does not contain the max qid that flfmt needs. This seems strange to me, as vac -a should need this info just as much as fossil needs it. Maybe it's tucked away somewhere else. Guess I need to look some more at the code. Digging further, I found the comment in file.c, but did not pursue the matter: * Fossil generates slightly different vac files, due to a now * impossible-to-change bug, which contain a VtEntry * for just one venti file, that itself contains the expected * three directory entries. Sigh. */ VacFile* _vacfileroot(VacFs *fs, VtFile *r) On Wed, Dec 13, 2017 at 11:00 AM, Steve Simon wrote: > I don't think there is any difference between vac and what fossil uses, > just where it appears in the hierarchy (though maybe I am wrong). > > Fossil adds a fixed upper layer of hierarchy > > active > dump > > > snap > > > > > The difficulty is how to convince fossil to install a score into its > hierarchy as though > its one that it created. > > I am pretty sure this is doable, it just needs a rather deep understanding > of how fossil > works and when I tried to do it I discovered fossil is really rather > complex. > > -Steve > > --f40304396124de94e2056038dc2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't know either, but when I tried flfmt with a vac= score as an experiment, I got this:
ole@ole-TECRA-R940 ~/Desktop/plan9 $ bin/fossil/flfmt -h 192.168.0.101=
 -v
f648dbae0075eb73bc394ad6cd4c059e655e127c fossil.dat
fs header block already exists; are you sure? [y/n]: y
fs file is mounted via devmnt (is not a kernel device); are you sure?
[y/n]: y
0xfb1e734c
0x1d1feaf1
c85978546e4048fce83120d3992cfc2f57ff2f8c
bin/fossil/flfmt: bad root: no qidSpace

    /*
     * Maximum qid is recorded in root's msource, entry #2 (convenientl=
y in
e).
     */
    ventiRead(e.score, VtDataType);
    if(!mbUnpack(&mb, buf, bsize))
        sysfatal("bad root: mbUnpack");
    meUnpack(&me, &mb, 0);
    if(!deUnpack(&de, &me))
        sysfatal("bad root: dirUnpack");
    if(!de.qidSpace)
        sysfatal("bad root: no qidSpace");
    qid =3D de.qidMax;

It seems that the vac archive does not contai= n the max qid that flfmt needs. This seems strange to me, as vac -a should need this info just as much as fossil needs it. Maybe it's tucked away somewhere else. Gues= s I need to look some more at the code.
Digging further, I found the comment in file.c, but did not purs=
ue the matter:

* Fossil generates slightly different vac files, due= to a now
* impossible-to-change bug, which contain a VtEntry
* for= just one venti file, that itself contains the expected
* three directo= ry entries. Sigh.
*/
VacFile*
_vacfileroot(VacFs *fs, VtFile *r)=


On Wed, Dec 13, 2017 at 11:00 AM, Steve Simon <steve@quintile.net&= gt; wrote:
I don't think there= is any difference between vac and what fossil uses,
just where it appears in the hierarchy (though maybe I am wrong).

Fossil adds a fixed upper layer of hierarchy

=C2=A0 =C2=A0 =C2=A0 =C2=A0 active
=C2=A0 =C2=A0 =C2=A0 =C2=A0 dump
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <year>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 <month><mday>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 snap
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <year>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 <month><mday>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <hour><min>

The difficulty is how to convince fossil to install a score into its hierar= chy as though
its one that it created.

I am pretty sure this is doable, it just needs a rather deep understanding = of how fossil
works and when I tried to do it I discovered fossil is really rather comple= x.

-Steve


--f40304396124de94e2056038dc2d--