From patchwork Wed Aug 10 12:11:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang jun X-Patchwork-Id: 1052902 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ACBApc006970 for ; Wed, 10 Aug 2011 12:11:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827Ab1HJMLJ (ORCPT ); Wed, 10 Aug 2011 08:11:09 -0400 Received: from mail-vx0-f174.google.com ([209.85.220.174]:41974 "EHLO mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753816Ab1HJMLI (ORCPT ); Wed, 10 Aug 2011 08:11:08 -0400 Received: by vxi9 with SMTP id 9so753817vxi.19 for ; Wed, 10 Aug 2011 05:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=DwOCvLaBuyQehaIb57PrEImQTIGsLp/2X0NRHof5Pj0=; b=gstY0d8Sr65bXeGLG8yZJtGPBcPx0NMDtmQDYWbLYji8s4MhA2wOK6ubx5F/L7WGfw 0/yLuBaa9qAEQLjc+QNyyl7vGRIxNAHIQ/plC33ujmqLrHpuu0VKB+Tw62RlBpqlgdMp eIpmBMC6MjT3s0UryxLKVtHfugQBaGh61dqKo= MIME-Version: 1.0 Received: by 10.52.176.103 with SMTP id ch7mr8525562vdc.59.1312978267869; Wed, 10 Aug 2011 05:11:07 -0700 (PDT) Received: by 10.52.157.103 with HTTP; Wed, 10 Aug 2011 05:11:07 -0700 (PDT) Date: Wed, 10 Aug 2011 20:11:07 +0800 Message-ID: Subject: write and read error handling problems From: huang jun To: ceph-devel Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 10 Aug 2011 12:11:10 +0000 (UTC) hi,all About OSD read ops, if osd got errors, it just return, that may lead memory leak. we patched it. thanks! --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2ab21bb..21fbca7 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -588,8 +588,18 @@ void ReplicatedPG::do_op(MOSDOp *op) obc->ondisk_read_unlock(); } - if (result == -EAGAIN) + if (result == -EAGAIN) { + delete ctx; return; + } please have a check! So i'm confused about the Error handling strategy of write/read operations in OSD. If the ceph just return when encountered errors, pass the work to client? Let's take an example of writing files. Client send request to write 4MB file, and OSD first write the osd journal, then return commit msg to Client. But, if the write file op was interrupted by the borken disk sector or other errors, that means write ops failed. What does the OSD going to do? Replay it from the former writen journal item? or other methods?