Re: Incorrect fallocate behaviour in cifs or samba?

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

 



On Thu, Jan 13, 2022 at 07:16:07PM +0100, David Disseldorp wrote:
FWIW, Samba's fsctl_zero_data semantics are based on observed Windows
server behaviour and the MS specs, which state(d at the time):
/*
* 2.3.57 FSCTL_SET_ZERO_DATA Request
*
* How an implementation zeros data within a file is implementation-dependent.
* A file system MAY choose to deallocate regions of disk space that have been
* zeroed.<50>
* <50>
* ... NTFS might deallocate disk space in the file if the file is stored on an
* NTFS volume, and the file is sparse or compressed. It will free any allocated
* space in chunks of 64 kilobytes that begin at an offset that is a multiple of
* 64 kilobytes. Other bytes in the file (prior to the first freed 64-kilobyte
* chunk and after the last freed 64-kilobyte chunk) will be zeroed but not
* deallocated.
*/

IIRC while implementing this I observed Windows deallocation behaviour
using FSCTL_QUERY_ALLOCATED_RANGES (referred to as QAR in the previous
code snippit).

Oh thanks so much for clarifying David. It's always nice
to hear things from the person who actually wrote the
code :-).



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

  Powered by Linux