Re: [PATCH] sync_smb2_mid_result
From: Jeff Layton <hidden>
Date: 2011-03-23 18:32:43
On Wed, 23 Mar 2011 13:26:19 -0500 Steve French [off-list ref] wrote:
On Wed, Mar 23, 2011 at 1:06 PM, Jeff Layton [off-list ref] wrote:>quoted
Maybe you misunderstand me. The struct is *exactly the same* aside from a few small differences. It doesn't even need to be a union, IMO. That would let you use a lot of the same code in transport.c for smb2.I don't mind trying to condense it to one structure, but it is not that simple: - smb2 doesn't need or sequence number, and the two transact2 multiresponse booleans - cifs mid will grow by at least 10 bytes by expanding the mid, pid etc. to the required minimum sizes. - cifs mid doesn't need "async_response_received" or (that is an smb2 only feature and that or equivalent is required). When we add chained commands (common in smb2) then complex_mid or equivalent as well as the command list, the number of the commands received and the last response time of entries will be useless to cifs.
Is it better to add an entirely new set of functions simply because you'll have some unused fields in this structure in either case? I don't think so. -- Jeff Layton [off-list ref]