Re: [cifs-protocol] [REG: 112080853508014] SMB3 channel sequence questions. When is Open.OutstandingPreRequestCount supposed to be decremented or reset

2012-08-21 Thread Stefan (metze) Metzmacher
Hi Edgar,

> Regarding “when should the server decrement OutstandingPreRequestCount or 
> OutstandingRequestCount”, the following logic will be reflected in a future 
> release of the MS-SMB2 document. This occurs during post processing check of 
> the ChannelSequence.
> 
> 3.3.4.1   Sending Any Outgoing Message
> Unless specifically noted in a subsequent section, the following logic MUST 
> be applied to any response message being sent from the server to the client. 
> • For every outgoing message, the server MUST calculate the total 
> number of bytes in the message and update the values of 
> ServerStatistics.sts0_bytessent_low and ServerStatistics.sts0_bytessent_high.
> • For a command request that includes a FileId, if Connection.Dialect 
> is “3.000” and ChannelSequence in the request is less than 
> Open.ChannelSequence, the server MUST decrement 
> Open.OutstandingPreRequestCount by 1. If ChannelSequence in the request is 
> not less than Open.ChannelSequence, the server MUST decrement 
> Open.OutstandingRequestCount by 1.

Thanks!

metze



signature.asc
Description: OpenPGP digital signature
___
cifs-protocol mailing list
cifs-protocol@cifs.org
https://lists.samba.org/mailman/listinfo/cifs-protocol


Re: [cifs-protocol] [REG: 112080853508014] SMB3 channel sequence questions. When is Open.OutstandingPreRequestCount supposed to be decremented or reset

2012-08-20 Thread Edgar Olougouna
Metze,

Regarding “when should the server decrement OutstandingPreRequestCount or 
OutstandingRequestCount”, the following logic will be reflected in a future 
release of the MS-SMB2 document. This occurs during post processing check of 
the ChannelSequence.

3.3.4.1   Sending Any Outgoing Message
Unless specifically noted in a subsequent section, the following logic MUST be 
applied to any response message being sent from the server to the client. 
• For every outgoing message, the server MUST calculate the total 
number of bytes in the message and update the values of 
ServerStatistics.sts0_bytessent_low and ServerStatistics.sts0_bytessent_high.
• For a command request that includes a FileId, if Connection.Dialect 
is “3.000” and ChannelSequence in the request is less than 
Open.ChannelSequence, the server MUST decrement Open.OutstandingPreRequestCount 
by 1. If ChannelSequence in the request is not less than Open.ChannelSequence, 
the server MUST decrement Open.OutstandingRequestCount by 1.

Regards,
Edgar

From: Edgar Olougouna 
Sent: Wednesday, August 08, 2012 3:27 PM
To: Stefan (metze) Metzmacher
Cc: p...@tridgell.net; cifs-protocol@cifs.org
Subject: [REG: 112080853508014] SMB3 channel sequence questions. When is 
Open.OutstandingPreRequestCount supposed to be decremented or reset

Metze,
I am taking care of this question (case 112080853508014).
After reviewing the source code, I will be opening a document bug. 
I will update you as soon as I have news.

Thanks,
Edgar

-Original Message-
From: Sreekanth Nadendla 
Sent: Wednesday, August 08, 2012 10:38 AM
To: Stefan (metze) Metzmacher
Cc: p...@tridgell.net; cifs-protocol@cifs.org; MSSolve Case Email
Subject: 112080853508014 SMB3 channel sequence

Dochelp moved to BCC.
Casemail added to CC.

Hello Stefan,
   Thank you for your inquiry about channel sequence 
verification in SMB3 file sharing protocol. We have created three separate 
incidents to track the investigation of these specific issues mentioned in your 
e-mail. You will be contacted by Open specifications team members shortly.


112080853508014 SMB3 channel sequence questions. When is 
Open.OutstandingPreRequestCount supposed to be decremented or reset
112080854980596 SMB3 channel sequence questions. What happens when 16-bit 
channel sequence number wraps
112080855623402 SMB3 channel sequence questions. Channel sequence get out of 
sync ? if overflow results during idle file handle, can server detect ?


Regards,
Sreekanth Nadendla
Microsoft Windows Open Specifications

-Original Message-
From: Stefan (metze) Metzmacher [mailto:me...@samba.org] 
Sent: Tuesday, August 07, 2012 10:21 PM
To: Interoperability Documentation Help
Cc: p...@tridgell.net; cifs-protocol@cifs.org
Subject: SMB3 channel sequence

Hi DocHelp,

I have some questions regarding the channel sequence verification of SMB 3.00.

- When is Open.OutstandingPreRequestCount supposed to be decremented or reset?

- What happens on an 16-bit overflow?
  From the documentation it looks like, the server would
  always reject write/ioctl/setinfo with STATUS_FILE_NOT_AVAILABLE
  once the channel sequence wrapped.

- As the client maintains the channel sequence on the session,
  while the server maintains it on the open, it seems not to be
  unlikely that the values get out of sync.
  (Assuming there's a way to handle the general 16-bit overflow)
  It could happen that the client opened a file and doesn't
  use the handle for a long time (while the 16-bit value got an overflow
  on the client). This would mean that the server can know if
  a channel sequence is older or newer than the last one.

metze


___
cifs-protocol mailing list
cifs-protocol@cifs.org
https://lists.samba.org/mailman/listinfo/cifs-protocol