All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Allison <jra@samba.org>
To: David Disseldorp <ddiss@suse.de>
Cc: David Howells <dhowells@redhat.com>,
	smfrench@gmail.com, Shyam Prasad N <nspmangalore@gmail.com>,
	jlayton@kernel.org, linux-cifs@vger.kernel.org
Subject: Re: Incorrect fallocate behaviour in cifs or samba?
Date: Thu, 13 Jan 2022 10:22:14 -0800	[thread overview]
Message-ID: <YeBt1g9+syau0j1w@jeremy-acer> (raw)
In-Reply-To: <20220113191607.04e20180@suse.de>

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 :-).

      reply	other threads:[~2022-01-13 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 13:18 cifs fallocate doesn't flush writes? David Howells
2022-01-13 15:20 ` Incorrect fallocate behaviour in cifs or samba? David Howells
2022-01-13 17:43   ` Jeremy Allison
2022-01-13 18:16     ` David Disseldorp
2022-01-13 18:22       ` Jeremy Allison [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YeBt1g9+syau0j1w@jeremy-acer \
    --to=jra@samba.org \
    --cc=ddiss@suse.de \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.