NetBSD Problem Report #57632

From www@netbsd.org  Wed Sep 27 05:15:26 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8F6B51A923A
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 27 Sep 2023 05:15:26 +0000 (UTC)
Message-Id: <20230927051525.8B9061A923C@mollari.NetBSD.org>
Date: Wed, 27 Sep 2023 05:15:25 +0000 (UTC)
From: yamt9999@gmail.com
Reply-To: yamt9999@gmail.com
To: gnats-bugs@NetBSD.org
Subject: O_RSYNC|O_DSYNC mismatch what posix says
X-Send-Pr-Version: www-1.0

>Number:         57632
>Category:       kern
>Synopsis:       O_RSYNC|O_DSYNC mismatch what posix says
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 27 05:20:00 +0000 2023
>Originator:     YAMAMOTO Takashi
>Release:        trunk source code around 2023-09
>Organization:
>Environment:
>Description:
posix says:

> If both O_DSYNC and O_RSYNC are set in oflag, all I/O operations
> on the file descriptor shall complete as defined by synchronized
> I/O data integrity completion.

and "Synchronized I/O Data Integrity Completion" should:

> For read, ..... If there were any pending write requests affecting
> the data to be read at the time that the synchronized read
> operation was requested, these write requests are successfully
> transferred prior to reading the data.

netbsd open(2) says:

> Combining O_RSYNC with O_DSYNC only, or specifying it
> without any other synchronized I/O integrity comple-
> tion flag set, has no further effect.

glancing ffs code, it seems to match what the man page says.

>How-To-Repeat:
read doc and code.
>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.