Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@samba.org>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
	Steve French <smfrench@gmail.com>,
	Samba Technical <samba-technical@lists.samba.org>
Subject: Re: SMB2 SET_ZERO_DATA and PUNCH_HOLE
Date: Fri, 3 May 2019 23:08:03 +0200	[thread overview]
Message-ID: <20190503230803.58266ae2@samba.org> (raw)
In-Reply-To: <CAN05THSthhyGctyByj5eun6C_KK58xWgNYer+7TKBrqyObNZsw@mail.gmail.com>

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

      parent reply	other threads:[~2019-05-03 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25  7:23 SMB2 SET_ZERO_DATA and PUNCH_HOLE ronnie sahlberg
2019-04-25 16:29 ` Tom Talpey
2019-05-03 21:08 ` David Disseldorp [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=20190503230803.58266ae2@samba.org \
    --to=ddiss@samba.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox