[sheepdog] [PATCH] sheep: make epoch_log_read() clean
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Tue Mar 19 02:52:35 CET 2013
At Tue, 19 Mar 2013 10:04:46 +0900,
Hitoshi Mitake wrote:
>
> At Mon, 18 Mar 2013 16:55:00 +0900,
> MORITA Kazutaka wrote:
> >
> > > diff --git a/include/internal_proto.h b/include/internal_proto.h
> > > index f237a86..6b3866d 100644
> > > --- a/include/internal_proto.h
> > > +++ b/include/internal_proto.h
> > > @@ -191,7 +191,7 @@ struct sd_node {
> > >
> > > struct epoch_log {
> > > uint64_t ctime;
> > > - uint64_t time;
> > > + time_t time;
> >
> > Can this guarantee that struct epoch_log is aligned to 64 bit
> > boundaries?
>
> It cannot guarantee the alignment. I'll fix in the next version.
> BTW, where does the constraint of alignment come from?
On-disk format and network protocol must be 64 bit aligned. Otherwise
we cannot share them between different architectures. Try
sizeof(struct epoch_log) on 32 bit and 64 bit machines after applying
the above change.
Thanks,
Kazutaka
More information about the sheepdog
mailing list