From: Steve French <smfrench@gmail.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
Steve French <smfrench@gmail.com>
Subject: Re: [PATCH] cifs: zero-range does not require the file is sparse
Date: Thu, 11 Apr 2019 19:10:11 -0500 [thread overview]
Message-ID: <CAH2r5msY3JT59S3uuMUJ18CAqXcuvx25LTnrSKAkNOo1dHEgHQ@mail.gmail.com> (raw)
In-Reply-To: <20190411235623.26659-1-lsahlber@redhat.com>
I verified it fixed 5 xfstests (033, 149, 155, 180, 349)
On Thu, Apr 11, 2019 at 6:56 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Remove the conditional to fail zero-range if the file is not flagged as sparse.
> You can still zero out a range in SMB2 even for non-sparse files.
>
> Tested with stock windows16 server.
>
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> ---
> fs/cifs/smb2ops.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index ca952dc3ec75..56e85f46cd82 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -2664,18 +2664,6 @@ static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
> return rc;
> }
>
> - /*
> - * Must check if file sparse since fallocate -z (zero range) assumes
> - * non-sparse allocation
> - */
> - if (!(cifsi->cifsAttrs & FILE_ATTRIBUTE_SPARSE_FILE)) {
> - rc = -EOPNOTSUPP;
> - trace_smb3_zero_err(xid, cfile->fid.persistent_fid, tcon->tid,
> - ses->Suid, offset, len, rc);
> - free_xid(xid);
> - return rc;
> - }
> -
> cifs_dbg(FYI, "offset %lld len %lld", offset, len);
>
> fsctl_buf.FileOffset = cpu_to_le64(offset);
> --
> 2.13.6
>
--
Thanks,
Steve
prev parent reply other threads:[~2019-04-12 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 23:56 [PATCH] cifs: zero-range does not require the file is sparse Ronnie Sahlberg
2019-04-12 0:10 ` Steve French [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=CAH2r5msY3JT59S3uuMUJ18CAqXcuvx25LTnrSKAkNOo1dHEgHQ@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.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;
as well as URLs for NNTP newsgroup(s).