From patchwork Tue Jul 16 07:45:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: majianpeng X-Patchwork-Id: 2827997 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 62A38C0AB2 for ; Tue, 16 Jul 2013 07:46:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E98DE20151 for ; Tue, 16 Jul 2013 07:46:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E24320154 for ; Tue, 16 Jul 2013 07:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845Ab3GPHpx (ORCPT ); Tue, 16 Jul 2013 03:45:53 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:52613 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802Ab3GPHpw (ORCPT ); Tue, 16 Jul 2013 03:45:52 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj3so502426pad.28 for ; Tue, 16 Jul 2013 00:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:reply-to:subject:x-priority:x-guid:x-has-attach :x-mailer:mime-version:message-id:content-type :content-transfer-encoding; bh=+nMSPHhB/TEKPSom6w5W24ZMuBDl2KzY8Yk30hHm7F4=; b=Q5anxUiF+i87B9MmDajvTorcqhw3HikBIbGN/Ro7keBAGnOP+GyygAG8PuIJ93FWXd ldqgqlXu66FHkohPq6p5hSg3sUYhqKNEcm2p+XhYnAlECiFQfjxrllf2jHiwVNfXMN4h g0ZP8SMlBKykHmVyBIDCaJZyjt0iJdtkBOw/wIWcfkSwCrqfvbmuSklg+mZsJOQGCccH 9zkl9qrZ45sZtl5++EP5HgbxT+Fjd4vA0udWZaBmSCd8t8aOer4SdHJAzkJ7nUInMcc1 GDgCZPBMPgCvGDu9HRTRB8U0M7f9IN7AKFQ2Ow9yXYKnDRpwNn6mxbemM3u29oimn+ac 5N/w== X-Received: by 10.68.169.97 with SMTP id ad1mr254174pbc.84.1373960751222; Tue, 16 Jul 2013 00:45:51 -0700 (PDT) Received: from majianpeng ([218.242.10.182]) by mx.google.com with ESMTPSA id ie3sm467969pbc.13.2013.07.16.00.45.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 00:45:50 -0700 (PDT) Date: Tue, 16 Jul 2013 15:45:48 +0800 From: majianpeng To: sage Cc: ceph-devel Reply-To: majianpeng Subject: [PATCH 1/2] libceph: For nofail == false, if __map_request failed, it should unregister. X-Priority: 3 X-GUID: 2140622A-DD8C-4839-943E-7BA9E65E5CB7 X-Has-Attach: no X-Mailer: Foxmail 7.0.1.90[en] Mime-Version: 1.0 Message-ID: <201307161545461466089@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For nofail == false request, if __map_request failed, the caller do cleanup work,like release the relative pages.It doesn't make any sense to retry this request.So only give up it. Signed-off-by: Jianpeng Ma --- net/ceph/osd_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.8.1.2 diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index dd47889..7d40a61 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -2129,7 +2129,8 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, dout("osdc_start_request failed map, " " will retry %lld\n", req->r_tid); rc = 0; - } + } else + __unregister_request(osdc, req); goto out_unlock; } if (req->r_osd == NULL) {