[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] dlm: sparse endian annotations
On Wed, 2008-07-16 at 23:12 +0100, Al Viro wrote:
> On Wed, Jul 16, 2008 at 02:43:41PM -0700, Harvey Harrison wrote:
> > On Wed, 2008-07-16 at 22:38 +0100, Al Viro wrote:
> > > On Wed, Jul 16, 2008 at 01:16:07PM -0700, Harvey Harrison wrote:
> > >
> > >
> > > NAK on ones below. You are only hiding the warnings; ...s() is not making
> > > it any better.
> > >
> >
> > I'd suggest that any use of {endian}s() points to code that should be
> > looked at. But if you'd also rather have the warnings, so be it.
> Frankly, I would rather have the rest of byteswaps in dlm eliminated...

I am curious though, in the general case of taking stuff off the wire
and doing work on it in-place. Would you suggest two structs for things
like this, one in cpu-order and one with the endian annotations, then
the one place where you receive can do appropriate endian conversion
using a pointer to a wire-endian struct and the rest of the code just
uses the cpu-endian struct everywhere?

Just a general design question.

In the DLM case, these util functions are only used in 1-2 places each
so it wouldn't be too bad to fold them into the receive/send paths, but
you still need to byteswap somewhere, just curious what you are


 \ /
  Last update: 2008-07-17 22:03    [W:0.071 / U:8.744 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site