NetBSD Problem Report #45676

From  Fri Dec  2 12:13:28 2011
Return-Path: <>
Received: by (Postfix, from userid 1270)
	id 3F63363D58E; Fri,  2 Dec 2011 12:13:28 +0000 (UTC)
Message-Id: <>
Date: Fri,  2 Dec 2011 12:13:28 +0000 (UTC)
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


	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

	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)

	code inspection.



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


NetBSD Home
NetBSD PR Database Search

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