From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jul 31 16:10:02 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F55816A46B for ; Tue, 31 Jul 2007 16:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5733213C47E for ; Tue, 31 Jul 2007 16:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6VGA25w062942 for ; Tue, 31 Jul 2007 16:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6VGA2xT062941; Tue, 31 Jul 2007 16:10:02 GMT (envelope-from gnats) Resent-Date: Tue, 31 Jul 2007 16:10:02 GMT Resent-Message-Id: <200707311610.l6VGA2xT062941@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Alejandro Pulver" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DB6E16A418 for ; Tue, 31 Jul 2007 16:07:00 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id A916D13C442 for ; Tue, 31 Jul 2007 16:06:59 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 10597 invoked from network); 31 Jul 2007 16:06:57 -0000 Received: from 190.55.108.236 (HELO deimos.mars.bsd) (190.55.108.236) by relay00.pair.com with SMTP; 31 Jul 2007 16:06:57 -0000 Message-Id: <1185898059.63068@deimos.mars.bsd> Date: Tue, 31 Jul 2007 13:07:39 -0300 From: "Alejandro Pulver" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.8 Cc: Subject: ports/115088: [PATCH] sysutils/fusefs-ntfs: update pkg-message and misc fix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2007 16:10:02 -0000 >Number: 115088 >Category: ports >Synopsis: [PATCH] sysutils/fusefs-ntfs: update pkg-message and misc fix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Jul 31 16:10:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alejandro Pulver >Release: FreeBSD 6.2-RELEASE i386 >Organization: >Environment: System: FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP >Description: - Remove ONLY_FOR_ARCHS to see what happens (they say in the website it's more portable now). - Install manpages into ${MANPREFIX}/man, not ${PREFIX}/share/man. - Bring back IGNORE for FreeBSD < 600000 (all fusefs-* ports have it, and the build would succeed but installation of dependencies would fail). - Add a note in pkg-message about memory usage, and make a gramatical correction. - Avoid calling fsync() twice. >How-To-Repeat: >Fix: --- fusefs-ntfs.diff begins here --- Index: fusefs-ntfs/Makefile =================================================================== RCS file: /home/pcvs/ports/sysutils/fusefs-ntfs/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- fusefs-ntfs/Makefile 24 Jul 2007 15:10:12 -0000 1.13 +++ fusefs-ntfs/Makefile 31 Jul 2007 15:37:46 -0000 @@ -21,11 +21,10 @@ LIB_DEPENDS= fuse.2:${PORTSDIR}/sysutils/fusefs-libs RUN_DEPENDS= ${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod -ONLY_FOR_ARCHS= i386 amd64 USE_LDCONFIG= yes USE_AUTOTOOLS= libtool:15 CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --exec-prefix=${PREFIX} +CONFIGURE_ARGS= --exec-prefix=${PREFIX} --mandir=${MANPREFIX}/man OPTIONS= LOCK "Lock the device when mounting (avoids access)" off \ UBLIO "Enable user space cache for improved speed" on @@ -36,6 +35,10 @@ .include +.if ${OSVERSION} < 600000 +IGNORE= depends on kernel module that requires FreeBSD 6 or later +.endif + .if defined(WITH_LOCK) CFLAGS+= -DUSE_LOCK .endif Index: fusefs-ntfs/files/patch-libntfs-3g__unix_io.c =================================================================== RCS file: /home/pcvs/ports/sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c,v retrieving revision 1.2 diff -u -r1.2 patch-libntfs-3g__unix_io.c --- fusefs-ntfs/files/patch-libntfs-3g__unix_io.c 17 Jul 2007 15:24:50 -0000 1.2 +++ fusefs-ntfs/files/patch-libntfs-3g__unix_io.c 31 Jul 2007 15:37:46 -0000 @@ -1,5 +1,5 @@ ---- libntfs-3g/unix_io.c.orig Fri Jun 8 23:35:33 2007 -+++ libntfs-3g/unix_io.c Mon Jul 16 07:58:02 2007 +--- libntfs-3g/unix_io.c.orig Fri Jun 8 18:35:33 2007 ++++ libntfs-3g/unix_io.c Wed Jul 11 17:55:03 2007 @@ -54,6 +54,22 @@ #include #endif @@ -264,7 +264,7 @@ if (!NDevOpen(dev)) { errno = EBADF; -@@ -160,12 +330,19 @@ +@@ -160,12 +330,18 @@ return -1; } @@ -274,7 +274,6 @@ flk.l_whence = SEEK_SET; flk.l_start = flk.l_len = 0LL; - if (fcntl(DEV_FD(dev), F_SETLK, &flk)) -+ + if (!NDevBlock(dev) && fcntl(DEV_FD(dev), F_SETLK, &flk)) ntfs_log_perror("Could not unlock %s", dev->d_name); +#endif @@ -285,7 +284,7 @@ if (close(DEV_FD(dev))) { ntfs_log_perror("Failed to close device %s", dev->d_name); return -1; -@@ -189,9 +366,234 @@ +@@ -189,9 +365,234 @@ static s64 ntfs_device_unix_io_seek(struct ntfs_device *dev, s64 offset, int whence) { @@ -520,7 +519,7 @@ /** * ntfs_device_unix_io_read - Read from the device, from the current location * @dev: -@@ -205,6 +607,29 @@ +@@ -205,6 +606,29 @@ static s64 ntfs_device_unix_io_read(struct ntfs_device *dev, void *buf, s64 count) { @@ -550,7 +549,7 @@ return read(DEV_FD(dev), buf, count); } -@@ -226,6 +651,28 @@ +@@ -226,6 +650,28 @@ return -1; } NDevSetDirty(dev); @@ -579,7 +578,7 @@ return write(DEV_FD(dev), buf, count); } -@@ -243,6 +690,13 @@ +@@ -243,6 +689,13 @@ static s64 ntfs_device_unix_io_pread(struct ntfs_device *dev, void *buf, s64 count, s64 offset) { @@ -593,7 +592,7 @@ return pread(DEV_FD(dev), buf, count, offset); } -@@ -265,6 +719,13 @@ +@@ -265,6 +718,13 @@ return -1; } NDevSetDirty(dev); @@ -607,17 +606,18 @@ return pwrite(DEV_FD(dev), buf, count, offset); } -@@ -281,6 +742,13 @@ +@@ -281,7 +741,14 @@ int res = 0; if (!NDevReadOnly(dev)) { +#if USE_UBLIO -+ if (DEV_HANDLE(dev)->ublio_fh) { -+ res = ublio_fsync(DEV_HANDLE(dev)->ublio_fh); -+ if (res) -+ return res; -+ } -+#endif ++ if (DEV_HANDLE(dev)->ublio_fh) ++ res = ublio_fsync(DEV_HANDLE(dev)->ublio_fh); ++ if (!DEV_HANDLE(dev)->ublio_fh || !res) ++ res = fsync(DEV_FD(dev)); ++#else res = fsync(DEV_FD(dev)); ++#endif if (res) ntfs_log_perror("Failed to sync device %s", dev->d_name); + else Index: fusefs-ntfs/files/pkg-message.in =================================================================== RCS file: /home/pcvs/ports/sysutils/fusefs-ntfs/files/pkg-message.in,v retrieving revision 1.1 diff -u -r1.1 pkg-message.in --- fusefs-ntfs/files/pkg-message.in 7 Jun 2007 04:01:33 -0000 1.1 +++ fusefs-ntfs/files/pkg-message.in 31 Jul 2007 15:37:46 -0000 @@ -20,11 +20,10 @@ (creation, deletion, moving, find(1)) perform faster. Try 2/4MB and 512/256KB for the different approaches. Note that after that points performance descreases again. -UBLIO_ITEMS - 64. When greater, increases speed of filesystem operations, - but consumes more memory. Try 128. +UBLIO_ITEMS - 64. Higher increases speed of filesystem operations. Try 128. UBLIO_GRACE - 32. Makes the cache items have more chances to be reused. UBLIO_SYNC_IO - 0. If enabled, highly decreases writing speed, but the data - is written immediatly to the disk. + is immediatly written to the disk. For example (improves performance over large files): @@ -34,4 +33,8 @@ the FORCE_ALIGNED_IO variable (it will be set to 512 bytes), but this is only useful for testing purposes and in practice has no use. +Note that higher values for UBLIO_BLOCKSIZE and UBLIO_ITEMS increase the +memory usage by their product in bytes. By default it consumes 64MB. To +decrease it to 16MB set UBLIO_BLOCKSIZE to 256KB for example. + ============================================================================== --- fusefs-ntfs.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: