[sheepdog] [PATCH] sheep: make epoch_log_read() clean

Hitoshi Mitake mitake.hitoshi at gmail.com
Tue Mar 19 03:35:14 CET 2013


At Tue, 19 Mar 2013 10:52:35 +0900,
MORITA Kazutaka wrote:
> 
> 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, I understand.

But current sheep seems not to be aware about endianness. Is
supporting architectures which employ big endian a future work?

Thanks,
Hitoshi



More information about the sheepdog mailing list