From owner-svn-src-head@FreeBSD.ORG Wed May 6 16:49:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C1F309; Wed, 6 May 2015 16:49:41 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F0D1E90; Wed, 6 May 2015 16:49:40 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CAE0BB9C3; Wed, 6 May 2015 12:49:39 -0400 (EDT) From: John Baldwin To: Julian Elischer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282485 - head/lib/libc/gen Date: Wed, 06 May 2015 11:41:22 -0400 Message-ID: <5998599.4tGHN4C7ck@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201505051452.t45EqXXv027613@svn.freebsd.org> References: <201505051452.t45EqXXv027613@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 06 May 2015 12:49:39 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 06 May 2015 16:49:41 -0000 On Tuesday, May 05, 2015 02:52:33 PM Julian Elischer wrote: > Author: julian > Date: Tue May 5 14:52:33 2015 > New Revision: 282485 > URL: https://svnweb.freebsd.org/changeset/base/282485 > > Log: > Tweak seekdir, telldir and readdir so that when htere are deletes going on, > as seek to teh last location saved will still work. This is needed for Samba > to be able to correctly handle delete requests from windows. This does not > completely fix seekdir when deletes are present but fixes the worst of the > problems. The real solution must involve some changes to the API for eh VFS > and getdirentries(2). You really shouldn't be documenting Samba in this page. Also, your claim is wrong as it will still do the wrong thing if some _other_ process removes a file entry out from under you. I think it's fine to fix the implementation to cater to samba. I think it's very wrong to document it and encourage other people to rely on non-POSIX behavior. I would rather remove this entire block from BUGS and use much simpler language in IMPLEMENTATION NOTES to note that it is undefined if you will see or not see directory entries that are added or removed while scanning a directory. The language from here: http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir.html Would work great, namely: If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir() returns an entry for that file is unspecified. -- John Baldwin