Re: SMB2 SET_ZERO_DATA and PUNCH_HOLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Apr 2019 17:23:56 +1000, ronnie sahlberg wrote:

> Folks.
> 
> In the cifs client  we use FSCTL_SET_ZERO_DATA when userspace wants to
> punch a hole in a file. SET_ZERO_DATA maps quite well to the
> PUNCH_HOLE semantics in that it will deallocate what it can and
> overwrite what it can not with 0.

Cool, I'd be interested to hear how things go when testing against
a Samba SMB2+ server - it similarly maps FSCTL_SET_ZERO_DATA to
PUNCH_HOLE.

> On windows 16/ntfs the deallocate blocksize is 64k.
> 
> Does anyone know if this is always 64k or if there is a way to query
> the server for this?

smbtorture4 includes a sparse_hole_dealloc test for checking this via
incremental ZERO_DATA + QAR requests:
https://git.samba.org/?p=samba.git;a=blob;f=source4/torture/smb2/ioctl.c#l3981

I don't recall seeing anything non-64k at the time, but I didn't check
that thoroughly.

Cheers, David



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux