From patchwork Wed May 30 17:43:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 10439491 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 785AF60327 for ; Wed, 30 May 2018 17:44:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 655DA28A4A for ; Wed, 30 May 2018 17:44:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59DBD28C6F; Wed, 30 May 2018 17:44:34 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, 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 0422728A4A for ; Wed, 30 May 2018 17:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167AbeE3RoK (ORCPT ); Wed, 30 May 2018 13:44:10 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35545 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932152AbeE3Rn5 (ORCPT ); Wed, 30 May 2018 13:43:57 -0400 Received: by mail-wm0-f67.google.com with SMTP id o78-v6so49421552wmg.0 for ; Wed, 30 May 2018 10:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O0bLmWKoroejWamUzA9M80hgApiw6nUKg9p17KUK2As=; b=LGZ3FDFsdTt49T87aRPw4JbUetF6yi/6eToTKgMsmcXTOVvmVMGMplB8VpBd1scy/M D4tD+6BTPOV4izVeRWnXIOU/sxqijpm17XmeFkpJjYI5pJHx6/mFU9drPqpFg0UmJVYa zTNLYMTVbKVgXYm6IBv6R+5it01+g5cx7AALVj3nhDc4HqMmQbGK6NhdQ79wJzJK16yo 1axcJNFsj5O6GwCgbE2C5wq8lUhx5+afxnvJSIc50+q9oCbXXHNLm+FX+IW46NFrVrJz 1mYbKlpbkCbGGvdcS7YJUuTfXzvbAQvaDpn6tQkhIyvBQfo2ZQF295CVBeHc/3thrSH4 JAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O0bLmWKoroejWamUzA9M80hgApiw6nUKg9p17KUK2As=; b=X/Zxjz62RP2sIMM4yepnfD54mCK0makW5pKgfIL97jyQpJwkqBp5bFRbAgfDxw6yg5 ZcN34cDc+G96jXHQaNN348m8oYk4fD4dYjxx80lEKtsYJW9aSql5MM6RjA74kLIx4/bY m4Q1ACUiSAqRj36ojG4BwEIQewvviXUCipTmihZ/+q3jwXeFk2NLYTrt8RcgnBoG+IJf W+rWWtiXYQieYWC+q9/ixG31lzuYWwM1ghmaPd2XPscsh8P4b7zfNXAWFY2gy1FKsM/X 5YbwXhNOMxOhfffRFU/hovyzFWYxwAs84Cu8uKghHtUuiSKn3K9UssfVlKzC9IJVGmYY cZhg== X-Gm-Message-State: ALKqPwfEk28bQ1IF9bTr4jMLgirfThtBBqfBx9mwsGg9PIxlELUMEDUK s2dYK8USG3x+OOJI3SHkm/u8DTXP X-Google-Smtp-Source: ADUXVKI6y2ya6LxVIAvetyepbe/hde6w4p2F6NQqYbBqbXanpZnFI6ZhSamjHnNCg0QJXbYYjnrx+Q== X-Received: by 2002:a1c:6952:: with SMTP id e79-v6mr2304051wmc.76.1527702236254; Wed, 30 May 2018 10:43:56 -0700 (PDT) Received: from orange.brq.redhat.com. (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id p3-v6sm18647658wrn.31.2018.05.30.10.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 10:43:55 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Jeff Layton Subject: [PATCH 6/7] libceph: don't abort reads in ceph_osdc_abort_on_full() Date: Wed, 30 May 2018 19:43:41 +0200 Message-Id: <1527702222-8232-7-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1527702222-8232-1-git-send-email-idryomov@gmail.com> References: <1527702222-8232-1-git-send-email-idryomov@gmail.com> 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 Don't consider reads for aborting and use ->base_oloc instead of ->target_oloc, as done in __submit_request(). Strictly speaking, we shouldn't be aborting FULL_TRY/FULL_FORCE writes either. But, there is an inconsistency in FULL_TRY/FULL_FORCE handling on the OSD side [1], so given that neither of these is used in the kernel client, leave it for when the OSD behaviour is sorted out. [1] http://tracker.ceph.com/issues/24339 Signed-off-by: Ilya Dryomov --- net/ceph/osd_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 294320400c72..3d055529189c 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -2447,8 +2447,9 @@ static int abort_on_full_fn(struct ceph_osd_request *req, void *arg) bool *victims = arg; if (req->r_abort_on_full && + (req->r_flags & CEPH_OSD_FLAG_WRITE) && (ceph_osdmap_flag(osdc, CEPH_OSDMAP_FULL) || - pool_full(osdc, req->r_t.target_oloc.pool))) { + pool_full(osdc, req->r_t.base_oloc.pool))) { if (!*victims) { update_epoch_barrier(osdc, osdc->osdmap->epoch); *victims = true;