[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-cifs
Subject:    Re: [PATCH] [CIFS] SMB2 FSCTL and IOCTL worker function
From:       Steve French <smfrench () gmail ! com>
Date:       2013-06-25 6:05:59
Message-ID: CAH2r5msr-SFNgSjF+tcGNwN+2bfzZ0FiEU-EjV9p50YejNPZvA () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jun 24, 2013 at 8:35 AM, David Disseldorp <ddiss@suse.de> wrote:
> Hi Steve,
>
> On Mon, 24 Jun 2013 02:19:13 -0500
> Steve French <smfrench@gmail.com> wrote:
>
>> +     rc = SendReceive2(xid, ses, iov, num_iovecs, &resp_buftype, 0);
>> +     rsp = (struct smb2_ioctl_rsp *)iov[0].iov_base;
>> +
>> +     if (rc != 0) {
>> +             if (tcon)
>> +                     cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE);
>> +             goto ioctl_exit;
>> +     }
>
> IIUC, this throws away any response data if the server reply status
> is unsuccessful.
>
> The caller may wish to obtain the response data under certain error
> conditions, particularly in the case of FSCTL_SRV_COPYCHUNK, where the
> server returns chunk request limits alongside STATUS_INVALID_PARAMETER
> in some cases. See MS-SMB2 2.2.32.1 for details.

that is a really good point - I will add handling for that in the code
to do copychunk (I am running into some alignment issues in my current
version of the client side of the copychunk path).

AFAICT from the spec, copychunk is the only example of an fsctl where
(on a specific error) we have to parse a response


-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic