[PATCH] caching optimization in share mode locks.
jra at samba.org
Tue Apr 14 19:08:54 MDT 2015
On Wed, Apr 08, 2015 at 04:36:01PM +0200, Stefan (metze) Metzmacher wrote:
> Am 08.04.2015 um 16:31 schrieb Volker Lendecke:
> > On Tue, Apr 07, 2015 at 09:02:32AM +0200, Stefan (metze) Metzmacher wrote:
> >> We should also use integer types (hyper/uint64_t) in the idl instead of
> >> an uint8 array.
> >> BVAL() would used to extract the current sequence number and we would
> >> avoid the ugly
> >> + /* Update the sequence number. */
> >> + memcpy(&seq, d->sequence_number, 8);
> >> + seq += 1;
> >> + memcpy(d->sequence_number, &seq, 8);
> >> and could used use d->sequence_number += 1;
> > Do we have to encode the sequence number in IDL at all? I'd rather go
> > put the sequence number in front of the data without any ndr involvement
> > to avoid reading ndr marshalled data directly.
> Sure for the fast path, we'd just do BVAL(raw_buffer, 0)
> as we know about the first 8 bytes.
> But it's nice to to have this in ndr_push/pull/print.
OK, I think I've figured out a way to do all this
reasonably cleanly. I should have a version 2 for
people to look at this week.
Thanks for all the help everyone has given on this,
it's been incredibly helpful in improving the code !
More information about the samba-technical