[PATCH] caching optimization in share mode locks.

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Apr 8 08:31:34 MDT 2015


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.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list