ports/115088: [PATCH] sysutils/fusefs-ntfs: update pkg-message and misc fix

Alejandro Pulver alepulver at FreeBSD.org
Tue Jul 31 16:10:02 UTC 2007


>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 at 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 <bsd.port.pre.mk>
 
+.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 <linux/fd.h>
  #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:



More information about the freebsd-ports-bugs mailing list