Re: [PATCH v3 4/5] nfsd: add a header describing upcall to nfsdcld

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Dec 2011 17:33:23 -0500
Peter Staubach <pstaubach@xxxxxxxxxxx> wrote:

> I will need to disagree with the assertion regarding XDR and the packed struct.  XDR can handle a versioned struct very neatly.  It can do so just as easily as text string parsing and with greatly reduced overhead.
> 

Ok, I'll bite -- what does XDR give us in this situation over a packed
struct?

Clearly there are benefits when the producer and consumer may have
considerable differences, as is the case between networked hosts. For
instance, different endianness or word size, etc.

Here though, the producer and consumer are the same host, so we can be
reasonably sure that the endianness is the same. I made sure to define
the struct with explicit sizes for the fields, so word size isn't a
factor. There's also a version field at the head so we could
potentially rev the upcall struct version later if needed. An XDR
format would need the same thing...

AFAICS, Using XDR is just going to add extra overhead here, but not
eliminate any of the drawbacks. If we have to rev the format later,
we'll be in the same situation.

A text based upcall has similar issues too, but it does at least make
debugging simpler. As Chuck points out too, there is some variability
in arguments as well. I think too that we're going to end up adding
some other upcalls here, and those will also need a different set
of arguments from what's there today.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux