Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2753934ybc; Mon, 18 Nov 2019 04:13:15 -0800 (PST) X-Google-Smtp-Source: APXvYqw07rf6rG4w+SsIaIiUAIulwG0VUzHJRFgF3A+fJYQpKtQxW0er4am3unMuMTMxSAr4jb7w X-Received: by 2002:adf:90d0:: with SMTP id i74mr27904728wri.298.1574079195356; Mon, 18 Nov 2019 04:13:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574079195; cv=none; d=google.com; s=arc-20160816; b=EieXFn3DKnvUqMysFiqaxS7cn8CdW1sq3blmLbbd9uFBH3IwZ0G7UUgQWwTze0xv1x +OnQQ4MV/DTyXsW7N1GYvKglabgVHAVKkWbzojuIYqF9Pm+SuhDtA2HRPpLaLfmi89fI byAgx/CAmnQMQtfXkG4y6MKmKd+Csbn08bvE6XkI54AJLnmzEi1edJyWr4sdIGAXhdLR OB3R53q0zx+DuS+Qd5hS1z1Xv3bimtWXmmB5z1aVJcLjbm1PsdvAR9xzpzm5hjpwK961 fBg31Fd/U/UPoNYsjU7wLZbeY/5sdV42TqvOAUVWHvj1X23i+mso1YHA+zhnzTSOACF6 sHpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zc3fwzOGL2eF4mQb2UQrkZ605QP/fzT/uQ5BLB43xXk=; b=U/WTOxganYBdaXGsJfVRvdae6InQs+A+QVKjklCadZbLaQDkHPzRnCAzkfsgzjQoU7 O7e+ItvPi0QSPrgsyzqnXyyM7An+JozpMzrm5r2ejP1ea8Iyc+mHkIyEHA8oHVK1lEWX kLLvMbTSFhJ9D90/IjKzXSlP+ZwBut+6Axl6ZzaXaTqhK6kvmwGuJS7HHJUqD9xerE75 5zlptAlpQcBVA3wWU8abwXb+OljSCRI6wg4FJP2PRZAH+oeROoVpngBTpLxpilkY9YvK 41g/USTHbu7CwmJ9dUohwIg5mjweyFidgaJ3dU24Lbf8Lygk5XHzMo9T9lOwbcDMErcJ MOyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t27si10549617edd.304.2019.11.18.04.12.50; Mon, 18 Nov 2019 04:13:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbfKRMJk (ORCPT + 99 others); Mon, 18 Nov 2019 07:09:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:43620 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726490AbfKRMJj (ORCPT ); Mon, 18 Nov 2019 07:09:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 33DBCB219; Mon, 18 Nov 2019 12:09:38 +0000 (UTC) From: Luis Henriques To: Jeff Layton , Sage Weil , Ilya Dryomov , "Yan, Zheng" , Gregory Farnum Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [RFC PATCH v3] ceph: add new obj copy OSD Op Date: Mon, 18 Nov 2019 12:09:33 +0000 Message-Id: <20191118120935.7013-1-lhenriques@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Before going ahead with a pull-request for ceph I would like to make sure we're all on the same page regarding the final fix for this problem. Thus, following this email, I'm sending 2 patches: one for ceph OSDs and the another for the kernel client. * osd: add new 'copy-from-notrunc' operation This patch shall be applied to ceph master after reverting commit ba152435fd85 ("osd: add flag to prevent truncate_seq copy in copy-from operation"). It adds a new operation that will be exactly the same as the original 'copy-from' operation, but with the extra 2 parameters (truncate_{seq,size}) * ceph: switch copy_file_range to 'copy-from-notrunc' operation This will make the kernel client use the new OSD op in copy_file_range. One extra thing that could probably be added is changing the mount options to NOCOPYFROM if the first call to ceph_osdc_copy_from() fails. Does this look good, or did I missed something from the previous discussion? (One advantage of this approach: the OSD patch can be easily backported!) Cheers, -- Luis Luis Henriques (1): osd: add new 'copy-from-notrunc' operation src/include/rados.h | 1 + src/osd/OSD.cc | 3 ++- src/osd/PrimaryLogPG.cc | 24 +++++++++++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) ceph: switch copy_file_range to 'copy-from-notrunc' operation fs/ceph/file.c | 3 ++- include/linux/ceph/osd_client.h | 1 + include/linux/ceph/rados.h | 1 + net/ceph/osd_client.c | 18 ++++++++++++------ 4 files changed, 16 insertions(+), 7 deletions(-)