support for FSCTL_QUERY_ALLOCATED_RANGES.

Ira Cooper samba at ira.wakeful.net
Thu Apr 1 16:47:21 MDT 2010


MKS cp needs it, or it will fail in certain situations.

-Ira

On Thu, Apr 1, 2010 at 6:19 PM, Jeremy Allison <jra at samba.org> wrote:
> On Thu, Apr 01, 2010 at 05:50:58PM -0400, Ira Cooper wrote:
>> This patch implements FSCTL_QUERY_ALLOCATED_RANGES, or at least enough
>> of it so that applications can use the call, and not die.
>>
>> I've applied this patch to 3.5 and 3.6.
>>
>> Thanks,
>>
>> -Ira
>>
>> --- a/source3/smbd/nttrans.c
>> +++ b/source3/smbd/nttrans.c
>> @@ -1964,6 +1964,16 @@ static void
>> call_nt_transact_ioctl(connection_struct *conn,
>>                 send_nt_replies(conn, req, NT_STATUS_OK, NULL, 0, NULL, 0);
>>                 return;
>>
>> +        case FSCTL_QUERY_ALLOCATED_RANGES:
>> +        {
>> +                /* All you do is return what you got.  We don't
>> implement sparse files really. */
>> +
>> +                DEBUG(10,("FSCTL_QUERY_ALLOCATED_RANGES called on
>> FID[0x%04X] - %d\n",fidnum, data_count));
>> +                send_nt_replies(conn, req, NT_STATUS_OK, NULL, 0,
>> +                                pdata, data_count);
>> +                return;
>> +        }
>> +
>>         case FSCTL_CREATE_OR_GET_OBJECT_ID:
>>         {
>>                 unsigned char objid[16];
>
> Hi IRa,
>
>        What application needs this ? Do you have an
> example ?
>
> Jeremy.
>


More information about the samba-technical mailing list