NetBSD Problem Report #45676

From yamt@NetBSD.org  Fri Dec  2 12:13:28 2011
Return-Path: <yamt@NetBSD.org>
Received: by www.NetBSD.org (Postfix, from userid 1270)
	id 3F63363D58E; Fri,  2 Dec 2011 12:13:28 +0000 (UTC)
Message-Id: <20111202121328.3F63363D58E@www.NetBSD.org>
Date: Fri,  2 Dec 2011 12:13:28 +0000 (UTC)
From: yamt@NetBSD.org
Reply-To: yamt@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ffs/wapbl problems
X-Send-Pr-Version: 3.95

>Number:         45676
>Category:       kern
>Synopsis:       ffs/wapbl problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdolecek
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 02 12:15:00 +0000 2011
>Last-Modified:  Wed Apr 05 18:42:50 +0000 2017
>Originator:     YAMAMOTO Takashi
>Release:        NetBSD current
>Organization:

>Environment:

>Description:
	1. ffs_full_fsync has code to skip wapbl_flush if vp->v_dirtyblkhd is
	empty.  i don't think it's a safe optimization because the buffer
	which contains dinode would hang on devvp, not this vp.  probably
	another per-vnode/inode field is necessary to remember if the log is
	involved for the file.

	2. ffs_full_fsync and ffs_fsync skip wapbl_flush for FSYNC_DATAONLY.
	it seems wrong because block pointers should be written out.

	3. ffs_full_fsync and ffs_fsync does not obey FSYNC_CACHE when wapbl
	is used but wapbl_flush is not necessary.

	4. ffs_full_fsync and ffs_fsync should be merged as now softdep has
	gone.

	5. wapbl_flush issues two DIOCCACHESYNC calls which are typically
	very expensive.  while i'm not sure why _only_ this part of code
	needs this level of guarantee, at least it should be reduced to
	a single call, probably using a checksum as the comment in
	wapbl_write_commit suggests.

	6. wapbl should have underlying device requirements documented
	somewhere.  (torn writes, disk cache behaviour, etc)

>How-To-Repeat:
	code inspection.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek@NetBSD.org
Responsible-Changed-When: Wed, 05 Apr 2017 18:42:50 +0000
Responsible-Changed-Why:
Collecting WAPBL reports.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.