Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2570878ybx; Fri, 8 Nov 2019 06:16:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxSmTPlXL8Yik2tGbTWMdtbAHWrFZwl/Niq2NlV2ITBzXE1/04GL3E5fxZL/YVJSXywXb6K X-Received: by 2002:a17:906:4697:: with SMTP id a23mr8725990ejr.322.1573222619676; Fri, 08 Nov 2019 06:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573222619; cv=none; d=google.com; s=arc-20160816; b=hivQO4GhoFOSpHiZ8gIqCiHET7HKi7L9sBorbhKs2ykV6cQK5zPB5RLoHTvfRiUA7U Uq67OdJQV+jVdr3i1iapSIcLmMwcal3lOimIfCyk4SJ3C9Yh3Y/Ixc/HLdAJaAsyBP48 K3hF/cch5pQyxnst+HCCjfcA4nA5EJ9ShrxO6VvFDPfyg37aAlEbn7y6cJg8/cl0T9sn Si0JGRAkCwvSD3z49OGW9ftVxujom9yI17cC4AKfu1CAuOGbNykeuFk398/sxzeBvsvP 6vbrxlUm7FjimnF6uwtZQuwYWmMIE/4hoIoKAKiMs9AjHC+cce4GHKuJ8/rv59NeCXIk LWxg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4RV3QIL2UVm6VV0RZipTMHbOVVwuox/8Ai6zoWv2jMQ=; b=xrKGZuiBLGGKrhtQ4HB8L6BC72f5w/OetwPa1NVPdCxas1TDxhPiTZfh5d/8frZAnj mKtzwH+TXuUyrGetSCDLz0sAbLXU+I51Y0vIPv46lkZs+NIeoXlwKvrjezcqHmDSmkIZ joQc+bHTdFHsEV86xzCUX3yRO4Zty0n8vSZey32V6p+Ixalx5ZN/zdet2+0RQPjPXlVX xd0RkIXIR9N42zi83DspSOkvjs3f10NVIZc+eo+jIyGAtgNjDckyOtpEP0TfiL+jVjn5 R28ddQugMvjtQFR7hx4RQ7Fp17ejQPfptWf+lOss0wobiYxFKI19gRiCiZv/71EVpEH3 bKXg== 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 k11si3752384ejv.152.2019.11.08.06.16.36; Fri, 08 Nov 2019 06:16:59 -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 S1729448AbfKHOQC (ORCPT + 99 others); Fri, 8 Nov 2019 09:16:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:58086 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726743AbfKHOQA (ORCPT ); Fri, 8 Nov 2019 09:16:00 -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 D4386B4A1; Fri, 8 Nov 2019 14:15:58 +0000 (UTC) From: Luis Henriques To: Jeff Layton , Ilya Dryomov , Sage Weil , "Yan, Zheng" Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [RFC PATCH 2/2] ceph: make 'copyfrom' a default mount option again Date: Fri, 8 Nov 2019 14:15:55 +0000 Message-Id: <20191108141555.31176-3-lhenriques@suse.com> In-Reply-To: <20191108141555.31176-1-lhenriques@suse.com> References: <20191108141555.31176-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 Now that we're able to detect whether an OSD can correctly handle 'copy-from' without corrupting the destination file, we can make the 'copyfrom' mount option the default again. This effectively reverts commit 6f9718fe41c3 ("ceph: make 'nocopyfrom' a default mount option"). Signed-off-by: Luis Henriques --- fs/ceph/super.c | 4 ++-- fs/ceph/super.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index edfd643a8205..c761be9eecbf 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -584,8 +584,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) seq_puts(m, ",noacl"); #endif - if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0) - seq_puts(m, ",copyfrom"); + if (fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) + seq_puts(m, ",nocopyfrom"); if (fsopt->mds_namespace) seq_show_option(m, "mds_namespace", fsopt->mds_namespace); diff --git a/fs/ceph/super.h b/fs/ceph/super.h index f98d9247f9cb..4cbcaee6e670 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -44,9 +44,7 @@ #define CEPH_MOUNT_OPT_NOQUOTADF (1<<13) /* no root dir quota in statfs */ #define CEPH_MOUNT_OPT_NOCOPYFROM (1<<14) /* don't use RADOS 'copy-from' op */ -#define CEPH_MOUNT_OPT_DEFAULT \ - (CEPH_MOUNT_OPT_DCACHE | \ - CEPH_MOUNT_OPT_NOCOPYFROM) +#define CEPH_MOUNT_OPT_DEFAULT CEPH_MOUNT_OPT_DCACHE #define ceph_set_mount_opt(fsc, opt) \ (fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt;