From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72520C432C3 for ; Thu, 14 Nov 2019 13:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 499DC2071F for ; Thu, 14 Nov 2019 13:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573737332; bh=oO0LVq3AgLJ4ejYpIckz8rTV2rTNGUkQ4Jb0FD5zXGE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=crmo9gYEg1JuF1As9jeWty+vSEf1T4OU6hsafwJrXoYKyJMN/FXaGNsQsKpShWmCy gZAQlz6y8V4pQ9bSfR8Yj6fy4+u1Sxi7p2gXtDOjdcoD9GEfUk4F7f3X85LcjowXJT 9pGDshbW1t4HgLeXhtvBvvuyTdAd/Xonu7b4OW8E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbfKNNPb (ORCPT ); Thu, 14 Nov 2019 08:15:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:39594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfKNNPa (ORCPT ); Thu, 14 Nov 2019 08:15:30 -0500 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C51920715; Thu, 14 Nov 2019 13:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573737329; bh=oO0LVq3AgLJ4ejYpIckz8rTV2rTNGUkQ4Jb0FD5zXGE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=q1txG8Xg9f6m8GGV+Zb+sCvc5UcZ80yigAffnlOKjPqNZM1zBksB2YUoWVucOWFJ5 rxJL4fv6SQ21/0PrIY+RN+XSzyxt7n3e7FhM5f/R1KvPJMpBtsckp95AN4ZY4zMc2c GwRd7WEJ9exaRu8BEtIib1CeP/AA9IzrkH/QRK/E= Message-ID: Subject: Re: [RFC PATCH v2 0/4] ceph: safely use 'copy-from' Op on Octopus OSDs From: Jeff Layton To: Luis Henriques , Sage Weil , Ilya Dryomov , "Yan, Zheng" Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 14 Nov 2019 08:15:28 -0500 In-Reply-To: <20191114105736.8636-1-lhenriques@suse.com> References: <20191114105736.8636-1-lhenriques@suse.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1 (3.34.1-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-11-14 at 10:57 +0000, Luis Henriques wrote: > Hi! > > So, after the feedback I got from v1 [1] I've sent out a pull-request > for the OSDs [2] which encodes require_osd_release into the OSDMap > client data. This allows the client to figure out which ceph release > the OSDs cluster is running and decide whether or not it's safe to use > the copy-from Op for copy_file_range. > > This new patchset I'm sending simply adds enough functionality to the > kernel client so that it can take advantage of this OSD patch: > > 0001 - adds the ability to decode TYPE_MSGR2 addresses. This is a > required functionality for enabling SERVER_NAUTILUS in the > client. I hope I got the new format right, as I couldn't figure > out what the hard-coded values (see comments) really mean. > nit: the first 3 patch subject lines should probably be prefixed with "libceph:" > 0002 - allows the client to retrieve the new require_osd_release field > from the OSDMap if available. This patch also adds SERVER_MIMIC, > SERVER_NAUTILUS and SERVER_OCTOPUS to the supported features, > which TBH I'm not sure if that's a safe thing to do -- the only > issue I've seen was that Nautilus requires the ability to decode > TYPE_MSGR2 address, but I may have missed others. > Yes, this needs to be done with care. We have to ensure that the server side isn't assuming that the client supports something that it doesn't. I think that means just trawling through the code and verifying whether this is safe. > 0003 - debug code to add require_osd_release to the osdmap debugfs file. > > 0004 - adds the truncate_{seq,size} fields to the 'copy-from' operation > if the OSDs are >= Octopus. > > Also note that, as suggested by Ilya, I've dropped the patch that would > change the default mount options to 'copyfrom'. > > These patches have been tested with the xfstests generic test suite, and > with a couple of other (local) tests that exercise the cephfs > copy_file_range syscall. I didn't saw any issues, but as I said above, > I'm not really sure if adding the SERVER_* flags to the supported > features have other side effects. > > [1] https://lore.kernel.org/lkml/20191108141555.31176-1-lhenriques@suse.com/ > [2] https://github.com/ceph/ceph/pull/31611 > 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. -- Jeff Layton