From owner-svn-src-head@freebsd.org Fri Feb 2 00:11:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A3CFED6606; Fri, 2 Feb 2018 00:11:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0A006FEF7; Fri, 2 Feb 2018 00:11:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f181.google.com with SMTP id f34so21136472ioi.13; Thu, 01 Feb 2018 16:11:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=lc+ne84NYYVxUL/0Y9GAoLZjoPX1pV4JsSbqHw/1o5o=; b=Dte/w7NUOLUiJOg7ZvN/duuXJHh56VdG6Kd4m/Ciw1pPKmzrUUNDkF17B5lXzQud91 hkQpMs6LgWPmAIzMuDmG/NIN0g0u5a7zaZqDxOvHAx5OIVZrxJgQD0C3bpwkWFffZj6M +wt0fHjkbClaQZqjkONijICWtQOW06m+BsVjtzP7XAuQGxRgZUWpo3i9J1Ta2LUAUF+P syetPLhPf5negPDKBLyRp/tEQJkBge/oxCoHO92uRX5Lw844QCoeMq2PPJ+CdSVJXj15 habTVPifbTwCnm+kSxLxJuyS0Vqzks4G8pq6IZBFTboHdIAJio9PUyqzwH6zJU9U6y9r Jjeg== X-Gm-Message-State: AKwxytctyUQ+KrqPqw4R62A/4x/hbbeiO4RofaJXAOY+7RMvetDJawtr uffTMKd8x55vHIW3TqVCtysL3mPO X-Google-Smtp-Source: AH8x225zZRlBmaPjVo9ISo+M+hYOeODx/b71X+rBZ9jNG8Ig3nZF2l1tR2dPjPRY+e1e0Sg3GJACsw== X-Received: by 10.107.93.13 with SMTP id r13mr8404570iob.32.1517530254567; Thu, 01 Feb 2018 16:10:54 -0800 (PST) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com. [209.85.223.172]) by smtp.gmail.com with ESMTPSA id z62sm451720ioe.49.2018.02.01.16.10.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 16:10:54 -0800 (PST) Received: by mail-io0-f172.google.com with SMTP id p188so21115887ioe.12; Thu, 01 Feb 2018 16:10:54 -0800 (PST) X-Received: by 10.107.131.210 with SMTP id n79mr39447314ioi.215.1517530254084; Thu, 01 Feb 2018 16:10:54 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.95.152 with HTTP; Thu, 1 Feb 2018 16:10:53 -0800 (PST) In-Reply-To: <201802020007.w1207dWn067046@repo.freebsd.org> References: <201802020007.w1207dWn067046@repo.freebsd.org> From: Conrad Meyer Date: Thu, 1 Feb 2018 16:10:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r328763 - head/sbin/fsck_ffs To: Kirk McKusick Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 00:11:01 -0000 There's one last sbwrite() in fsck_ffs, in the gjournal code. Is that one known to be safe, or should it also use sbput()? Best, Conrad On Thu, Feb 1, 2018 at 4:07 PM, Kirk McKusick wrote: > Author: mckusick > Date: Fri Feb 2 00:07:38 2018 > New Revision: 328763 > URL: https://svnweb.freebsd.org/changeset/base/328763 > > Log: > Use sbput(3) rather than sbwrite(3) to ensure that the updated copy of > the superblock gets written. > > Reported by: Mark Johnston > > Modified: > head/sbin/fsck_ffs/suj.c > > Modified: head/sbin/fsck_ffs/suj.c > ============================================================================== > --- head/sbin/fsck_ffs/suj.c Fri Feb 2 00:01:50 2018 (r328762) > +++ head/sbin/fsck_ffs/suj.c Fri Feb 2 00:07:38 2018 (r328763) > @@ -213,8 +213,8 @@ closedisk(const char *devnam) > fs->fs_clean = 1; > fs->fs_time = time(NULL); > fs->fs_mtime = time(NULL); > - if (sbwrite(&disk, 0) == -1) > - err(EX_OSERR, "sbwrite(%s)", devnam); > + if (sbput(disk.d_fd, fs, 0) == -1) > + err(EX_OSERR, "sbput(%s)", devnam); > if (ufs_disk_close(&disk) == -1) > err(EX_OSERR, "ufs_disk_close(%s)", devnam); > fs = NULL; >