All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Steve French <smfrench@gmail.com>
Cc: dhowells@redhat.com, CIFS <linux-cifs@vger.kernel.org>,
	ronnie sahlberg <ronniesahlberg@gmail.com>
Subject: Re: [PATCH][SMB3] fix temporary data corruption in collapse range
Date: Sat, 20 Aug 2022 16:23:01 +0100	[thread overview]
Message-ID: <36140.1661008981@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAH2r5mtVOKN-8ET1oYC0L+ihAWpmwFY3=Q=-KP+qwcaAb002_A@mail.gmail.com>

Steve French <smfrench@gmail.com> wrote:

> +	truncate_pagecache_range(inode, off, old_eof);

Upon further consideration, I think this should perhaps be before:

>  	rc = smb2_copychunk_range(xid, cfile, cfile, off + len,

so that any outstanding shared-writable mmap can be made to wait.

Also the invalidation in smb3_zero_range() only covers the hole, so
smb3_insert_range() also needs to invalidate from the bottom of the hole to
the EOF - and, again, I think it needs to do this before making changes to the
file contents.

David


  reply	other threads:[~2022-08-20 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20  0:06 [PATCH][SMB3] fix temporary data corruption in collapse range Steve French
2022-08-20 15:23 ` David Howells [this message]
2022-08-20 16:08   ` Steve French
2022-08-22 16:15 ` David Howells

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=36140.1661008981@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=ronniesahlberg@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.