From owner-svn-src-all@freebsd.org Sat Feb 20 02:31:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A329AAEF28; Sat, 20 Feb 2016 02:31:42 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 528EFF12; Sat, 20 Feb 2016 02:31:42 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from coconut.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 2C97A56AE9; Fri, 19 Feb 2016 20:31:41 -0600 (CST) Subject: Re: svn commit: r295800 - head/usr.bin/cap_mkdb To: Bryan Drewery , Stefan Esser , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, dwmalone@FreeBSD.org References: <201602190842.u1J8gDOc015177@repo.freebsd.org> <56C7B60E.8080002@FreeBSD.org> From: Eric van Gyzen Message-ID: <56C7D019.3020807@FreeBSD.org> Date: Fri, 19 Feb 2016 20:31:53 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56C7B60E.8080002@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2016 02:31:42 -0000 On 2/19/16 6:40 PM, Bryan Drewery wrote: > On 2/19/2016 12:42 AM, Stefan Esser wrote: >> Author: se >> Date: Fri Feb 19 08:42:13 2016 >> New Revision: 295800 >> URL: https://svnweb.freebsd.org/changeset/base/295800 >> >> Log: >> Remove O_SYNC from the options passed to dbmopen(). > Uh, this is a full revert of r293312's changes to cap_mkdb which were > made for good reason. So this seems simply wrong without a better fix. > >> >> The output file is created as a temporary file that is moved over the >> existing file after completion. Thus there is no need to immediately >> flush all created db records to the temporary file. > This is not right either. Depending on the use of soft updates / > journaling the data and metadata (file name / rename) may be written at > different times. It is entirely possible to get a renamed file with no > or junk content without an fsync. That's exactly what r293312 mentions > in its commit message. dwmalone@ plans to put the fsync() in the db close method, which makes a lot of sense, and would fix this in a better way. https://reviews.freebsd.org/D5186 This commit probably should have waited for D5186 to be committed, but at least that seems imminent. Eric