> -----Original Message----- > From: linux-cifs-owner@xxxxxxxxxxxxxxx <linux-cifs-owner@xxxxxxxxxxxxxxx> On > Behalf Of ronnie sahlberg > Sent: Thursday, April 25, 2019 3:24 AM > To: linux-cifs <linux-cifs@xxxxxxxxxxxxxxx>; Steve French > <smfrench@xxxxxxxxx> > Subject: SMB2 SET_ZERO_DATA and PUNCH_HOLE > > 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. > > On windows 16/ntfs the deallocate blocksize is 64k. This processing is defined in MS-FSA section 2.1.5.9.35 and it's not a constant but is dependent on a number of filesystem parameters, primarily the cluster size (aka the "allocation unit"). > Does anyone know if this is always 64k or if there is a way to query > the server for this? Cluster size can be queried via filesystem-specific fsctl's, but beware the special cases... Tom.