From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: First cut at git port to Cygwin Date: Mon, 10 Oct 2005 12:26:16 -0700 Message-ID: <434AC058.60803@zytor.com> References: <20051005155457.GA30303@trixie.casa.cgf.cx> <20051005191741.GA25493@steel.home> <20051005202947.GA6184@trixie.casa.cgf.cx> <81b0412b0510060205v4cd510c9wb4b06a3ed9242c8@mail.gmail.com> <81b0412b0510060307q431b64edt4196553bce28346c@mail.gmail.com> <81b0412b0510070544v3e7cf0b4n521db8ff7e4e335a@mail.gmail.com> <20051007205450.GA14827@steel.home> <20051007212250.GA1423@steel.home> <4346E8AC.5030503@citi.umich.edu> <20051007213952.GA8821@steel.home> <7vr7avrgr2.fsf@assigned-by-dhcp.cox.net> <434AB663.8050205@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Junio C Hamano , git@vger.kernel.org, Linus Torvalds X-From: git-owner@vger.kernel.org Mon Oct 10 21:27:20 2005 Return-path: Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EP3IO-0004r9-Kw for gcvg-git@gmane.org; Mon, 10 Oct 2005 21:26:49 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751109AbVJJT0g (ORCPT ); Mon, 10 Oct 2005 15:26:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751113AbVJJT0f (ORCPT ); Mon, 10 Oct 2005 15:26:35 -0400 Received: from terminus.zytor.com ([192.83.249.54]:40383 "EHLO terminus.zytor.com") by vger.kernel.org with ESMTP id S1751109AbVJJT0f (ORCPT ); Mon, 10 Oct 2005 15:26:35 -0400 Received: from [10.4.1.13] (yardgnome.orionmulti.com [209.128.68.65]) (authenticated bits=0) by terminus.zytor.com (8.13.4/8.13.4) with ESMTP id j9AJQIB0004003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2005 12:26:18 -0700 User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en To: Johannes Schindelin In-Reply-To: X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on localhost X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on terminus.zytor.com Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Schindelin wrote: > >>Junio C Hamano wrote: >> >>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall >>>correctly we do not write file via mmap -- at least we do not >>>intend to. >>> >> >>Then PROT_READ probably makes more sense? > > Not necessarily. Sometimes you need to annotate the data from the index, > and this does not need to be written back to the index file. > In the above sentence, emphasis on "at least we do not intend to." If writes are done legitimately then that's fine, but we shouldn't have "accidental writes" -- those would be program bugs! > >>>Yes. It might have been overkill that you supported writing >>>changes back, though. >> >>Not just overkill; if we do MAP_PRIVATE it's actively WRONG. > > See above. > Eh? If we MAP_PRIVATE, *and* we (intentionally) write to it, we *BETTER* not write anything back. -hpa