From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 2 19:30:11 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14FF816A41F for ; Mon, 2 Jan 2006 19:30:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B276D43D55 for ; Mon, 2 Jan 2006 19:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k02JUAxI068000 for ; Mon, 2 Jan 2006 19:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k02JUACi067999; Mon, 2 Jan 2006 19:30:10 GMT (envelope-from gnats) Date: Mon, 2 Jan 2006 19:30:10 GMT Message-Id: <200601021930.k02JUACi067999@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Gilbert Cao Cc: Subject: Re: bin/91134: [PATCH] Preserve access and modification time when cp to a smbfs destination path X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gilbert Cao List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2006 19:30:11 -0000 The following reply was made to PR bin/91134; it has been noted by GNATS. From: Gilbert Cao To: Bruce Evans Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/91134: [PATCH] Preserve access and modification time when cp to a smbfs destination path Date: Mon, 2 Jan 2006 20:27:19 +0100 --6Nae48J/T25AfBN4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 01, 2006 at 11:06:48AM +1100, Bruce Evans wrote: > On Sat, 31 Dec 2005, Gilbert Cao wrote: >=20 > >>Fix: > >The following patch has fixed the problem as I have finally found the=20 > >problem in > >the src/bin/cp source code, especially the utils.c file : > >I have found out that utimes() does nothing on the newly created file, i= f=20 > >its > >file descriptor is not closed yet, and this is only the case in a SMB=20 > >destination path. >=20 > This is a bug in smbfs. cp only works on POSIX file systems. OK. >=20 > It can't be right to always close the file. This leaves the fd >=3D 0 ca= se > in setfile() unused and bogotifies all the code that handles this case, > even for POSIX file systems where this code just works. However, I can't > see any reason to have the fd >=3D 0 case except to avoid minor races for > regular files only. I guess I will maintain my own version of cp, until the bug in smbfs will be correct, right ? I don't know if I will be qualified enough to debug smbfs ;) >=20 > Bruce --=20 -------------------------------- (hika) Gilbert Cao http://www.miaouirc.com - MiaouIRC Project 2002-2003 http://www.bsdmon.com - The BSD DMON Power to serve IRC : #miaule at IRCNET Network -------------------------------- --6Nae48J/T25AfBN4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDuX6WSyQfFTqAEpcRApx9AKC0D3Vw4857cfZzIcsRo3v/JpLuNwCeKUj6 p2CJJm7CAzbrkDYL+qCG0sk= =VeT2 -----END PGP SIGNATURE----- --6Nae48J/T25AfBN4--