Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6756987ybi; Wed, 29 May 2019 12:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlX249R6WNhkRrkEQE/2ko3VFaz3zbEWYg41KGwzeGdxfacyFB4NcqDULUidTA6cPBossv X-Received: by 2002:a17:90a:2201:: with SMTP id c1mr3792569pje.10.1559158699526; Wed, 29 May 2019 12:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559158699; cv=none; d=google.com; s=arc-20160816; b=vYljVD3a3ELrWGLdTwtpLEZLTeXp85Ocok2ryilM/0C3lOK2ECCsC2Snqe3/eV5ygl XAr6PbW8Z1gkFja6E3OuEUlBO/IIfx4MQEDOElBjiKK3+jTCiXmg98FyCrjpttNeEQIy 2H9X2sRPSsHnYIymrnxeXXQSCCKrj9rWIABvVOFFfUy4B8c2GLH1O+FKmfjFUq3Wb6rB GxymsXZJgvGpAAXYy8F4uTJQEd8mpIDOd+gPEEXTJOmhzE2i/Ni9QCvbWJV4qFFwzFZK kpDeOBd08ts1xfmQp5fpIpixlFFbCRyMRme+18ielsIX6qnqYCXtAGuiSak+awIhCfW+ HJJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=awlNxR/Rxv+hJa8Bxg/Rn90OEdMGA9Wwg8E/mvGNXU8=; b=b8aINaYhbYJ66MpyJlTbk77juNZyLsKvThGg9eLiXXuN8BsHGkpb+mIekCJ480iq9c ZSbPMXZDogXnQm9jCI68S80gf9neu68l90hWwqfX1lBKFniZOXvAEbZmTx5s5VxgGDu3 IJZoNaSZ9rLs7BhszmSvrZJ6tHO7DQ5j4j7UUh22EPALEdgQAW2CKiAEfp8v7EzsrFgi KsochSlKEZdpuIe/FTxsTCarWrPiG7pJk9TZMYmkIbfxeFEGsQt0KXyRkXgzXXL+m2wC jFdu9oKQuNcGYOTkcxCYhgHa3tkue/DM0dhFyefv8EqK66etfenhrFn68RvE/8wVl7M7 OtXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qwkghOQr; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si696020plm.324.2019.05.29.12.38.05; Wed, 29 May 2019 12:38:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qwkghOQr; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726043AbfE2TiE (ORCPT + 99 others); Wed, 29 May 2019 15:38:04 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:46056 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfE2TiE (ORCPT ); Wed, 29 May 2019 15:38:04 -0400 Received: by mail-yw1-f67.google.com with SMTP id w18so1556655ywa.12; Wed, 29 May 2019 12:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=awlNxR/Rxv+hJa8Bxg/Rn90OEdMGA9Wwg8E/mvGNXU8=; b=qwkghOQr+yXQSjWTa2072FVqiGioaKVDacsPXvGumD95BzNbGdv89s4W267tRi1TnU rBFR1RO1VzLDZqzTEM8F0ZMI/ABLksFiKBzf08uNtXNrVhCdb6qJ9jyLsNtDriBVHfXy D7A+SKRe9ixxWjif2vpDiD18p1djMPD/CMRAE4WCEFVd8A6FIcWYSaGPy8yWi91ggVPS IeW4lbwacpbnqnP0daaMfXPo+lrL884r9FCgAdiUaGzQkvy8+DZg7OrVthq7iMRKulMI p5710OC+1DUJCN7x43c4eIgxdvYc2LnFlv67YinKplAX5Z8hAdnlch7v0PGQt962PYJF Z5gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=awlNxR/Rxv+hJa8Bxg/Rn90OEdMGA9Wwg8E/mvGNXU8=; b=btB9pGhgXEqvProvx1w5jYzFeJIh/y7BotV4e0GRhLvelX+af6zm8axZjGkuvYj8c5 e+Iwd6MzgDNykhDwS3sfGPm/E9YiIxJIFRJKMpn/Siv0J2GsMsuGeTnIz0qhtNVVTGxV Ub1raMESDIF8wrs1EC5fRYJCX6RkP5Ux8DGXHY+rc15LVBD0RIw1T2BV5cCxpKyUp4GE j2pV9NfIb3mePfWHcjpAQKb/8GqGJ/WjGrjEuldvYj8zuO+HVEw1iLjSAff3xmSoVUBf xLtpvU2kXY6UxWKCQInz5GMknyykXwiyQEnjBKpmNQ+1pac5QSRlhFljTkswQ4SKAqUW jV6w== X-Gm-Message-State: APjAAAUFux8GP6GB03152ODdI8+vR2V2mCu57uUluvv9Y17SwH6lHQ8q GPeJcQtTdHYpMqUql3888pOF8QYuw55SP6ZnG9Q= X-Received: by 2002:a81:4f06:: with SMTP id d6mr48782860ywb.379.1559158683230; Wed, 29 May 2019 12:38:03 -0700 (PDT) MIME-Version: 1.0 References: <20190529174318.22424-1-amir73il@gmail.com> <20190529174318.22424-12-amir73il@gmail.com> In-Reply-To: <20190529174318.22424-12-amir73il@gmail.com> From: Amir Goldstein Date: Wed, 29 May 2019 22:37:52 +0300 Message-ID: Subject: Re: [PATCH v3 11/13] fuse: copy_file_range needs to strip setuid bits and update timestamps To: Miklos Szeredi Cc: Dave Chinner , Christoph Hellwig , linux-xfs , Olga Kornievskaia , Luis Henriques , Al Viro , linux-fsdevel , linux-api@vger.kernel.org, ceph-devel@vger.kernel.org, Linux NFS Mailing List , CIFS , "Darrick J . Wong" Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Miklos, Could we get an ACK on this patch. It is a prerequisite for merging the cross-device copy_file_range work. It depends on a new helper introduced here: https://lore.kernel.org/linux-fsdevel/CAOQ4uxjbcSWX1hUcuXbn8hFH3QYB+5bAC9Z1yCwJdR=T-GGtCg@mail.gmail.com/T/#m1569878c41f39fac3aadb3832a30659c323b582a Thanks, Amir, On Wed, May 29, 2019 at 8:43 PM Amir Goldstein wrote: > > Like ->write_iter(), we update mtime and strip setuid of dst file before > copy and like ->read_iter(), we update atime of src file after copy. > > Signed-off-by: Amir Goldstein > --- > fs/fuse/file.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/fs/fuse/file.c b/fs/fuse/file.c > index e03901ae729b..7f33d68f66d9 100644 > --- a/fs/fuse/file.c > +++ b/fs/fuse/file.c > @@ -3128,6 +3128,10 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, > > inode_lock(inode_out); > > + err = file_modified(file_out); > + if (err) > + goto out; > + > if (fc->writeback_cache) { > err = filemap_write_and_wait_range(inode_out->i_mapping, > pos_out, pos_out + len); > @@ -3169,6 +3173,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, > clear_bit(FUSE_I_SIZE_UNSTABLE, &fi_out->state); > > inode_unlock(inode_out); > + file_accessed(file_in); > > return err; > } > -- > 2.17.1 >