From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6828 invoked by alias); 14 Sep 2009 19:43:55 -0000 Received: (qmail 6812 invoked by uid 22791); 14 Sep 2009 19:43:54 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Sep 2009 19:43:49 +0000 Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id n8EJhkXa015981 for ; Mon, 14 Sep 2009 20:43:47 +0100 Received: from yxe26 (yxe26.prod.google.com [10.190.2.26]) by wpaz9.hot.corp.google.com with ESMTP id n8EJhieG024440 for ; Mon, 14 Sep 2009 12:43:44 -0700 Received: by yxe26 with SMTP id 26so4123452yxe.20 for ; Mon, 14 Sep 2009 12:43:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.159.8 with SMTP id h8mr10642371ybe.302.1252957423942; Mon, 14 Sep 2009 12:43:43 -0700 (PDT) In-Reply-To: <4AAE98F1.3000501@vmware.com> References: <20090914191657.E32D6844C3@localhost> <4AAE98F1.3000501@vmware.com> Date: Mon, 14 Sep 2009 19:43:00 -0000 Message-ID: Subject: Re: [patch] only update dcache after write succeeds From: Doug Evans To: Michael Snyder Cc: "gdb-patches@sourceware.org" , Marc Khouzam , Greg Law , Pedro Alves , Hui Zhu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00444.txt.bz2 On Mon, Sep 14, 2009 at 12:26 PM, Michael Snyder wrote: > Doug Evans wrote: >> >> Hi. >> >> Marc, Greg: Can you see if this patch fixes things for you? > > Hey Doug, Hey Michael, :-) > I tested this change, and it does indeed seem to fix the problem > with target record -- but. =A0 ;-) > > Part of the reason that it works is that record_xfer_partial > calls error() instead of returning -1. =A0If I change it so that > it returns -1, things get more complicated. > > The do-while loop that used to follow and now preceeds this code > calls target-beneath, which in our case results in several different > target methods being called, one of which eventually returns > 0. > > That just means that in the present case, calling error is correct. > But I worry about some of the other cases where the target method > returns -1, and whether badness might occur in some other cases. How does one reconcile "eventually returns > 0" with "badness"? IOW, if some target method does return > 0, then the write succeeded, right? Are there different kinds of "success" in effect here?