From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 22:12:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E3845DA; Sun, 22 Mar 2015 22:12:03 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id D7865E9F; Sun, 22 Mar 2015 22:12:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 7DB491A2636; Mon, 23 Mar 2015 08:40:58 +1100 (AEDT) Date: Mon, 23 Mar 2015 08:40:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150322162507.GD2379@kib.kiev.ua> Message-ID: <20150323081537.U932@besplex.bde.org> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <20150321200221.K1846@besplex.bde.org> <20150322133709.GA39238@stack.nl> <20150322162507.GD2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=gT3I8tYcGHsMu_VBJUQA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Jilles Tjoelker , svn-src-all@freebsd.org, Xin LI , Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:12:03 -0000 On Sun, 22 Mar 2015, Konstantin Belousov wrote: > On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: >> On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: >>> On Sat, 21 Mar 2015, Xin LI wrote: >> >>>> Log: >>>> Disable timestamping on devfs read/write operations by default. >> ... >>> I don't like this. It defaults to non-POSIX-conformant behaviour... >>> ... > Does POSIX ever say anything about special files ? It says indirectly that special files have full support for timestamps although they might not support many other attributes. From an old draft: X 51276 Upon successful completion, where nbyte is greater than 0, write( ) shall mark for update the X 51277 st_ctime and st_mtime fields of the file, and if the file is a regular file, the S_ISUID and S_ISGID X 51278 bits of the file mode may be cleared. Note that it makes a special case for regular files, but not for the file times. > Devfs already has non-POSIX behaviour, e.g. write on one mount is > reflected as mtime/ctime update on all mounts. On reboot, the time > stamps are re-created, i.e. changes are not persistent. POSIX doesn't cover reboots :-). Perhaps it should say something. I don't remember it even saying saying anything about the persistence of file data. Specifying this would be difficult. Obviously, it cannot reasonably specify persistence of file data for longer than is physically possible, and no implementation can guarantee its future behaviour. > I think the deviations may be summarrized as 'devfs mtime is useless for > the usual mtime purposes'. From this PoV, I have no objections to the > patch. Doing extra work with delayed updates of times, which might > be somewhat non-trivial, is a feature with non-obvious gain. I thought that atimes were even more useless, but it is the atime that is used by w(1). I mostly notice devfs times when find(1) finds garbage devfs times -- ones in the future caused by devfs creating files before userland has fixed up the time. Devfs has incomplete code to avoid this problem. Bruce