[PATCH 0/2] FSCTL_SRV_COPYCHUNK_WRITE

Andreas Schneider asn at samba.org
Fri Oct 18 06:28:05 MDT 2013


On Friday 18 October 2013 06:13:42 David Disseldorp wrote:
> Thanks for the review Jeremy...
> 
> Jeremy Allison <jra at samba.org> wrote:
> >On Thu, Oct 17, 2013 at 12:36:59PM +0200, David Disseldorp wrote:
> >> This trivial patch series adds support for the
> >
> >FSCTL_SRV_COPYCHUNK_WRITE
> >
> >> ioctl. It differs slightly from FSCTL_SRV_COPYCHUNK, in that it
> >
> >permits
> >
> >> copy-chunk requests against targets where the destination file handle
> >> does not have read access.
> >
> >Code works but I have two requests for a change.
> >
> >Firstly, "bool dst_needs_rw" isn't clear enough.
> >It doesn't really articulate what the options
> >are here - they are really READ|WRITE, or WRITE.
> >
> >There ought to be a better way to articulate
> >that (sorry, can't immediately think of that
> >now).
> 
> How about passing through the ioctl value and putting the comment next to
> the read access check? I'll repost with this logic.
> 
> >Second point:
> >
> >+       case FSCTL_SRV_COPYCHUNK_WRITE:
> >+               /*
> >+                * [MS-SMB2] 2.2.31
> >+                * FSCTL_SRV_COPYCHUNK is issued when a handle has
> >+                * FILE_READ_DATA and FILE_WRITE_DATA access to the
> >file;
> >+                * FSCTL_SRV_COPYCHUNK_WRITE is issued when a handle
> >only has
> >+                * FILE_WRITE_DATA access.
> >+                */
> >+               cc_dst_needs_rw = false;
			 /* FALL TROUGH */
> >
> >        case FSCTL_SRV_COPYCHUNK:
> >is a fallthough on a switch statement without at least
> >a comment showing this is intended. That's a horror and
> >an abomination :-) :-).
> 

Please use as comment

/* FALL TROUGH */

Like we do in other code parts.

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list