From patchwork Mon Mar 6 18:43:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 9607301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B98D602B4 for ; Mon, 6 Mar 2017 18:53:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FE6726220 for ; Mon, 6 Mar 2017 18:53:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 238012793B; Mon, 6 Mar 2017 18:53:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A041926220 for ; Mon, 6 Mar 2017 18:53:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932451AbdCFSxj (ORCPT ); Mon, 6 Mar 2017 13:53:39 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33264 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932420AbdCFSxc (ORCPT ); Mon, 6 Mar 2017 13:53:32 -0500 Received: by mail-wm0-f66.google.com with SMTP id n11so15260715wma.0 for ; Mon, 06 Mar 2017 10:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=+V5C8xQ9AJlZgPb1zl2jGbAJVd7FUK5bgcTBf56NT38=; b=b3wZ3KS3y31V9ewb+EIATPCRSJq41X9FjNWciwztbtTllp36zJVBtvTYXb8pOdbojl z3PuOSHiXrD/J4/HQZfqusTiMb04xextic2THFz3jnqPKHmF618SI3Q2YWQEeuYGlCDc fDB/SkN3PgzNPiCGlZI/KLsK7soFIHsfG65mwdvm5rtodRnSglJWyiZhwLPlUZd08yqB NhKMLSkQ6CcbKVMR6uF3MfHWD9QOx34WYv3/dk3239uBoHTW7XXV/up2Y+ADiN5Vl9ra A3K5Se4pSdvMaBhyDlofCVUFCOP4BEk/MMpS869jb4Gu3A+ojf9Emoq+wkdMUuaCzN7x i0uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=+V5C8xQ9AJlZgPb1zl2jGbAJVd7FUK5bgcTBf56NT38=; b=nZaExKCgukUZjcsLHYdqoLGLi3AieIwCMZDtd+7cyfmTKty2UMnlC7Z3tr/5qSCR0m Bi5sASVtFUYoqbDEJrteBqR6b5JXk0fT+DhCjNdNU/pQycoSt0N9Je/bS5nfQLzunB3D vwYWTNW0g/wZNgnSQuXBvCI1ih3YfTLXwh08K5nek6K6isW3CLyOcEaJJLR/ET/EMrT3 nVXguaH2Fx2O+ZPR0f/CkI379nnql/I5mWl1TQtrxKe21gurpj57Hd/BXG24/iZBVsuj KG8au4OEHa1GMeUyOvYPZt6PgPWtgtMsjFnxhhZzcxlIAFduqmwm6QbAeL7D45frRE7R RFoQ== X-Gm-Message-State: AMke39lAQjlLBDgvEJpqWKrylX1OZXall8+hgnDyZVDM6qAvrGjP2vB3LfCPYFVM7p9YeQ== X-Received: by 10.28.167.203 with SMTP id q194mr6305395wme.111.1488825857928; Mon, 06 Mar 2017 10:44:17 -0800 (PST) Received: from localhost.localdomain.com (ip-78-102-108-116.net.upcbroadband.cz. [78.102.108.116]) by smtp.gmail.com with ESMTPSA id 32sm26180762wrr.64.2017.03.06.10.44.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 10:44:17 -0800 (PST) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH] libceph: don't set weight to IN when OSD is destroyed Date: Mon, 6 Mar 2017 19:43:58 +0100 Message-Id: <1488825838-11576-1-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since ceph.git commit 4e28f9e63644 ("osd/OSDMap: clear osd_info, osd_xinfo on osd deletion"), weight is set to IN when OSD is deleted. This changes the result of applying an incremental for clients, not just OSDs. Because CRUSH computations are obviously affected, pre-4e28f9e63644 servers disagree with post-4e28f9e63644 clients on object placement, resulting in misdirected requests. Mirrors ceph.git commit a6009d1039a55e2c77f431662b3d6cc5a8e8e63f. Fixes: 930c53286977 ("libceph: apply new_state before new_up_client on incrementals") Link: http://tracker.ceph.com/issues/19122 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil --- net/ceph/osdmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index cc22dd282a3e..ffe9e904d4d1 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -1379,7 +1379,6 @@ static int decode_new_up_state_weight(void **p, void *end, if ((map->osd_state[osd] & CEPH_OSD_EXISTS) && (xorstate & CEPH_OSD_EXISTS)) { pr_info("osd%d does not exist\n", osd); - map->osd_weight[osd] = CEPH_OSD_IN; ret = set_primary_affinity(map, osd, CEPH_OSD_DEFAULT_PRIMARY_AFFINITY); if (ret)