Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2804789ybx; Fri, 8 Nov 2019 09:32:24 -0800 (PST) X-Google-Smtp-Source: APXvYqylU4hVDeE7AMRwkRSDfPQ9a6cAZ4Jaawpy6WWLSlrQFBDj5fDERaATut5o302xzUKHW3fz X-Received: by 2002:a17:906:14d4:: with SMTP id y20mr9903232ejc.21.1573234344335; Fri, 08 Nov 2019 09:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573234344; cv=none; d=google.com; s=arc-20160816; b=dcaprmMuXASlxyJ4sOz1dbJH2+oe5A4LxQ5+QID5zvsrEQIQBAKsgOIgMOKcUWGqiq y4EAHhOQVM8aFDAnY4Q04Eh5uk5mg6PmXG8eHoqwOopuszmpYqpRFMXu2CwaqNVeSiKK /VvQWTyPHrgRRlX+jzUnWlbllHmO6nj1OeE1OT0fxlTB2cymbSpzS+VNu3DAruF1GnFa SuXyD0bLl5j/rmEPggisOfw9LJFvhsPDjRJmcNo3KkzkHiN+o9orJ0brp61N3CS+wJns 5cT/HN1Vs9SuvpxWw7eOhzmxglU53pc2z9zQeaBM50VSaZN5a3tbbSx4brPhVxDiumPa LGQQ== 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=E7WcJoeAKNR1/yawZsgKW92r4Dj1KmVC5QBqxcv8eoI=; b=G+J/NJE9YN/JRmycAOGtZho+Y1Sls8S4eruLsm9Yldvg5imRi3pPs+Pn+t+fXwjDn8 bJDkIDolTKzgO7xwRdUOa4S9N0MbTV5KttsmELzoDX6VJh9yYvxMnATM68NnMWyYf05Q Xf//FzdLNfiQPWYJXsMdIupft6zJvRrc1e8f/ClLmSYWXy7vIsyrBSJSezDCncFwfZeU o3quDEhnwMuo/mkpPooevOPSjBp6jSMZ3rEVZE/bkfDnfrL3ktuei1OnlJWckzQphoMz hjotnKlaX0baCYvXEsGSnHJdHq1IlQRwzLAExA3SuX5i4TMZz1EkMv5CarMbIEaqvqKk 6W6A== 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 y40si5102813edd.383.2019.11.08.09.32.00; Fri, 08 Nov 2019 09:32:24 -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 S1727794AbfKHRbF (ORCPT + 99 others); Fri, 8 Nov 2019 12:31:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:57938 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726200AbfKHRbE (ORCPT ); Fri, 8 Nov 2019 12:31:04 -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 06EAAB469; Fri, 8 Nov 2019 17:31:03 +0000 (UTC) Date: Fri, 8 Nov 2019 17:31:01 +0000 From: Luis Henriques To: Sage Weil Cc: Ilya Dryomov , Jeff Layton , "Yan, Zheng" , Ceph Development , LKML Subject: Re: [RFC PATCH 0/2] ceph: safely use 'copy-from' Op on Octopus OSDs Message-ID: <20191108173101.GA3300@hermes.olymp> References: <20191108141555.31176-1-lhenriques@suse.com> <20191108164758.GA1760@hermes.olymp> <20191108171616.GA2569@hermes.olymp> 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 Fri, Nov 08, 2019 at 05:22:28PM +0000, Sage Weil wrote: > On Fri, 8 Nov 2019, Luis Henriques wrote: > > On Fri, Nov 08, 2019 at 04:57:27PM +0000, Sage Weil wrote: > > > On Fri, 8 Nov 2019, Luis Henriques wrote: > > > > On Fri, Nov 08, 2019 at 04:15:35PM +0100, Ilya Dryomov wrote: > > > > > If the OSD checked for unknown flags, like newer syscalls do, it would > > > > > be super easy, but it looks like it doesn't. > > > > > > > > > > An obvious solution is to look at require_osd_release in osdmap, but we > > > > > don't decode that in the kernel because it lives the OSD portion of the > > > > > osdmap. We could add that and consider the fact that the client now > > > > > needs to decode more than just the client portion a design mistake. > > > > > I'm not sure what can of worms does that open and if copy-from alone is > > > > > worth it though. Perhaps that field could be moved to (or a copy of it > > > > > be replicated in) the client portion of the osdmap starting with > > > > > octopus? We seem to be running into it on the client side more and > > > > > more... > > > > > > > > I can't say I'm thrilled with the idea of going back to hack into the > > > > OSDs code again, I was hoping to be able to handle this with the > > > > information we already have on the connection peer_features field. It > > > > took me *months* to have the OSD fix merged in so I'm not really > > > > convinced a change to the osdmap would make it into Octopus :-) > > > > > > > > (But I'll have a look at this and see if I can understand what moving or > > > > replicating the field in the osdmap would really entail.) > > > > > > Adding a copy of require_osd_release in the client portion of the map is > > > an easy thing to do (and probably where it should have gone in the first > > > place!). Let's do that! > > > > Yeah, after sending my reply to Ilya I took a quick look and it _seems_ > > to be as easy as adding a new encode(require_osd_release...) in the > > OSDMap. And handle the versions, of course. Let me spend some time > > playing with that and I'll try to come up with something during the next > > few days. > > - You'll need to add it for both OSDMap::Incremental and OSDMap > - You'll need to make the encoding condition by updating the block like > the one below from OSDMap::encode() > > uint8_t v = 9; > if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) { > v = 3; > } else if (!HAVE_FEATURE(features, SERVER_MIMIC)) { > v = 6; > } else if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) { > v = 7; > } > > to include a SERVER_OCTOPUS case too. Same goes for Incremental::encode() Awesome, thanks! I'll give it a try, and test it with the appropriate kernel client side changes to use this. Cheers, -- Lu?s