From owner-p4-projects@FreeBSD.ORG Thu Aug 3 04:55:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9627D16A4E1; Thu, 3 Aug 2006 04:55:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5940B16A4DA for ; Thu, 3 Aug 2006 04:55:08 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FA9943D5A for ; Thu, 3 Aug 2006 04:55:07 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k734t7cc065798 for ; Thu, 3 Aug 2006 04:55:07 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k734t7qN065795 for perforce@freebsd.org; Thu, 3 Aug 2006 04:55:07 GMT (envelope-from jb@freebsd.org) Date: Thu, 3 Aug 2006 04:55:07 GMT Message-Id: <200608030455.k734t7qN065795@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103094 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 04:55:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=103094 Change 103094 by jb@jb_freebsd2 on 2006/08/03 04:54:10 IFC Affected files ... .. //depot/projects/dtrace/src/lib/libc/uuid/uuid_compare.c#3 integrate .. //depot/projects/dtrace/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate Differences ... ==== //depot/projects/dtrace/src/lib/libc/uuid/uuid_compare.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.4 2005/01/03 02:56:15 marcel Exp $ + * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.5 2006/08/03 03:34:36 delphij Exp $ */ #include @@ -41,7 +41,8 @@ int32_t uuid_compare(const uuid_t *a, const uuid_t *b, uint32_t *status) { - int res; + int res; + int64_t res64; if (status != NULL) *status = uuid_s_ok; @@ -54,10 +55,19 @@ if (b == NULL) return ((uuid_is_nil(a, NULL)) ? 0 : 1); - /* We have to compare the hard way. */ - res = (int)((int64_t)a->time_low - (int64_t)b->time_low); - if (res) - return ((res < 0) ? -1 : 1); + /* + * We have to compare the hard way. + * + * Note that time_low is defined as unsigned 32-bit + * integer, therefore, with a significantly large + * a->time_low and a small b->time_low, we will end + * up with a value which is larger than 0x7fffffff + * which is negative if casted to signed 32-bit + * integer. + */ + res64 = (int64_t)a->time_low - (int64_t)b->time_low; + if (res64) + return ((res64 < 0) ? -1 : 1); res = (int)a->time_mid - (int)b->time_mid; if (res) return ((res < 0) ? -1 : 1); ==== //depot/projects/dtrace/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.151 2006/06/01 02:25:00 rodrigc Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.152 2006/08/03 03:55:52 delphij Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -283,6 +283,10 @@ g_access(pmp->pm_cp, 0, -1, 0); g_topology_unlock(); PICKUP_GIANT(); + /* Now the volume is clean. Mark it. */ + error = markvoldirty(pmp, 0); + if (error && (flags & FORCECLOSE) == 0) + return (error); } else if ((pmp->pm_flags & MSDOSFSMNT_RONLY) && !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { /*