Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3324552ybc; Thu, 14 Nov 2019 07:26:04 -0800 (PST) X-Google-Smtp-Source: APXvYqx7kf7kt34bKVu2Ck1GdH7ay3PZY2cdkCUSAg2Zid8/rlgJIbGxQdn8HE4HsrFBKGm8TVd/ X-Received: by 2002:a17:906:fad4:: with SMTP id lu20mr9112084ejb.9.1573745164425; Thu, 14 Nov 2019 07:26:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573745164; cv=none; d=google.com; s=arc-20160816; b=IBbEbPxEbQJUbZVrx4oe7mb3leqAlYWerWim4jfnokTz65oWh/Y9zOlTlO3BV1lSm0 dy1LeV8p1jTC6iq1IWA2+uzehFseGGWYAQegBeJlZtLVp9FazkVr3HQDbOm723RtH8JO /dt/8g8Vkv5oIQzCUHGXH84bSxgQAqcSr7DP7rXvGu45ofFZ3fHSqbmA+BcibjB0/gnc +eEtSqhGQ4UyQO381W/KqWYNiIyXw1SHvE/VkeQ0toAuuRlWeSCtOylPw6vdL1cmsXih J50EayWFAK8XdQ/X/3bJjQ0V1fG7AIMxmlNE7jdlUkXq8PgQMpy85CHCIhsHw+3dYW0x m3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+l3RYmcc7WZeN03L0phZnhpAch/qRFNOM0yyP4Ow/6Y=; b=R3trv4NtW/spVkuYrG5JSV4YHqbMHPFBFmNhf7jgCWGsEioAGP/Kh7eHPd/owXwBr/ BiM3HDiZ2yEvxAu8FojC/BOfzIccmgeu7cIn3ac/zX1WNXpqZzFZXHIyuC/cS/jvpLx/ 80VvTl36C/7ZLmHn9IksbBynhQ0s2aEpF39C+G/tSFQPmWA1zbUyhAbPdxq+xhhTlijM tjilv5UrvI8OaZfO+f5pdYZS2jyzluZRAI0uSsMKZUG8Yd1n2Why8Rf209vGbjH4R1gY rx52/uEucr8vNrmh0e60yj0eF8rPoaYB8JkBldt9fIc7Bn1gow9g8rXWLdkD2IXyRZNR eang== 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 e8si4190771edk.444.2019.11.14.07.25.40; Thu, 14 Nov 2019 07:26:04 -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 S1726960AbfKNPYx (ORCPT + 99 others); Thu, 14 Nov 2019 10:24:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:49326 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726339AbfKNPYx (ORCPT ); Thu, 14 Nov 2019 10:24:53 -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 3ABE7AD19; Thu, 14 Nov 2019 15:24:51 +0000 (UTC) Date: Thu, 14 Nov 2019 15:24:50 +0000 From: Luis Henriques To: Sage Weil Cc: Ilya Dryomov , Jeff Layton , Gregory Farnum , "Yan, Zheng" , Ceph Development , LKML Subject: Re: [RFC PATCH v2 0/4] ceph: safely use 'copy-from' Op on Octopus OSDs Message-ID: <20191114152450.GA6902@hermes.olymp> References: <20191114105736.8636-1-lhenriques@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 14, 2019 at 02:17:44PM +0000, Sage Weil wrote: > On Thu, 14 Nov 2019, Ilya Dryomov wrote: > > > > I'm just getting caught up on the discussion here, but why was it > > > > decided to do it this way instead of just adding a new OSD > > > > "copy-from-no-truncseq" operation? Once you tried it once and an OSD > > > > didn't support it, you could just give up on using it any longer? That > > > > seems a lot simpler than trying to monkey with feature bits. > > > > > > I don't remember the original discussion either, but in retrospect that > > > does seem much simpler--especially since hte client is conditioning > > > sending this based on the the require_osd_release. It seems like passing > > > a flag to the copy-from op would be more reasonable instead of conditional > > > feature-based behavior. > > > > Yeah, I suggested adding require_osd_release to the client portion just > > because we are running into it more and more: Objecter relies on it for > > RESEND_ON_SPLIT for example. It needs to be accessible so that patches > > like that can be carried over to the kernel client without workarounds. > > > > copy-from in its existing form is another example. AFAIU the problem > > is that copy-from op doesn't reject unknown flags. Luis added a flag > > in https://github.com/ceph/ceph/pull/25374, but it is simply ignored on > > nautilus and older releases, potentially leading to data corruption. > > > > Adding a new op that would be an alias for CEPH_OSD_OP_COPY_FROM with > > CEPH_OSD_COPY_FROM_FLAG_TRUNCATE_SEQ like Jeff is suggesting, or a new > > copy-from2 op that would behave just like copy-from, but reject unknown > > flags to avoid similar compatibility issues in the future is probably > > the best thing we can do from the client perspective. > > Yeah, I think copy-from2 is the best path. I think that means we should > revert what we merged to ceph.git a few weeks back, Luis! Sorry we didn't > put all the pieces together before... Well, that's an unexpected turn. I'm not disagreeing with that decision but since my initial pull request was done one year ago (almost to the day!), it's a bit disappointing to see that in the end I'm back to square one :-) I guess that the PR I mentioned in the cover letter can also be dropped, as it's not really usable by the kernel client (at least not until it fully supports all the features up to SERVER_OCTOPUS). Anyway, thanks everyone for the review. Cheers, -- Lu?s