[PATCH] caching optimization in share mode locks.

Stefan (metze) Metzmacher metze at samba.org
Wed Apr 8 08:36:01 MDT 2015


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.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150408/672a3a01/attachment.pgp>


More information about the samba-technical mailing list