View | Details | Raw Unified | Return to bug 115088
Collapse All | Expand All

(-)fusefs-ntfs/Makefile (-2 / +5 lines)
Lines 21-31 Link Here
21
LIB_DEPENDS=	fuse.2:${PORTSDIR}/sysutils/fusefs-libs
21
LIB_DEPENDS=	fuse.2:${PORTSDIR}/sysutils/fusefs-libs
22
RUN_DEPENDS=	${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod
22
RUN_DEPENDS=	${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod
23
23
24
ONLY_FOR_ARCHS=	i386 amd64
25
USE_LDCONFIG=	yes
24
USE_LDCONFIG=	yes
26
USE_AUTOTOOLS=	libtool:15
25
USE_AUTOTOOLS=	libtool:15
27
CONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
26
CONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
28
CONFIGURE_ARGS=	--exec-prefix=${PREFIX}
27
CONFIGURE_ARGS=	--exec-prefix=${PREFIX} --mandir=${MANPREFIX}/man
29
28
30
OPTIONS=	LOCK "Lock the device when mounting (avoids access)" off \
29
OPTIONS=	LOCK "Lock the device when mounting (avoids access)" off \
31
		UBLIO "Enable user space cache for improved speed" on
30
		UBLIO "Enable user space cache for improved speed" on
Lines 36-41 Link Here
36
35
37
.include <bsd.port.pre.mk>
36
.include <bsd.port.pre.mk>
38
37
38
.if ${OSVERSION} < 600000
39
IGNORE=		depends on kernel module that requires FreeBSD 6 or later
40
.endif
41
39
.if defined(WITH_LOCK)
42
.if defined(WITH_LOCK)
40
CFLAGS+=	-DUSE_LOCK
43
CFLAGS+=	-DUSE_LOCK
41
.endif
44
.endif
(-)fusefs-ntfs/files/patch-libntfs-3g__unix_io.c (-16 / +16 lines)
Lines 1-5 Link Here
1
--- libntfs-3g/unix_io.c.orig	Fri Jun  8 23:35:33 2007
1
--- libntfs-3g/unix_io.c.orig	Fri Jun  8 18:35:33 2007
2
+++ libntfs-3g/unix_io.c	Mon Jul 16 07:58:02 2007
2
+++ libntfs-3g/unix_io.c	Wed Jul 11 17:55:03 2007
3
@@ -54,6 +54,22 @@
3
@@ -54,6 +54,22 @@
4
 #include <linux/fd.h>
4
 #include <linux/fd.h>
5
 #endif
5
 #endif
Lines 264-270 Link Here
264
 
264
 
265
 	if (!NDevOpen(dev)) {
265
 	if (!NDevOpen(dev)) {
266
 		errno = EBADF;
266
 		errno = EBADF;
267
@@ -160,12 +330,19 @@
267
@@ -160,12 +330,18 @@
268
 			return -1;
268
 			return -1;
269
 		}
269
 		}
270
 
270
 
Lines 274-280 Link Here
274
 	flk.l_whence = SEEK_SET;
274
 	flk.l_whence = SEEK_SET;
275
 	flk.l_start = flk.l_len = 0LL;
275
 	flk.l_start = flk.l_len = 0LL;
276
-	if (fcntl(DEV_FD(dev), F_SETLK, &flk))
276
-	if (fcntl(DEV_FD(dev), F_SETLK, &flk))
277
+
278
+	if (!NDevBlock(dev) && fcntl(DEV_FD(dev), F_SETLK, &flk))
277
+	if (!NDevBlock(dev) && fcntl(DEV_FD(dev), F_SETLK, &flk))
279
 		ntfs_log_perror("Could not unlock %s", dev->d_name);
278
 		ntfs_log_perror("Could not unlock %s", dev->d_name);
280
+#endif
279
+#endif
Lines 285-291 Link Here
285
 	if (close(DEV_FD(dev))) {
284
 	if (close(DEV_FD(dev))) {
286
 		ntfs_log_perror("Failed to close device %s", dev->d_name);
285
 		ntfs_log_perror("Failed to close device %s", dev->d_name);
287
 		return -1;
286
 		return -1;
288
@@ -189,9 +366,234 @@
287
@@ -189,9 +365,234 @@
289
 static s64 ntfs_device_unix_io_seek(struct ntfs_device *dev, s64 offset,
288
 static s64 ntfs_device_unix_io_seek(struct ntfs_device *dev, s64 offset,
290
 		int whence)
289
 		int whence)
291
 {
290
 {
Lines 520-526 Link Here
520
 /**
519
 /**
521
  * ntfs_device_unix_io_read - Read from the device, from the current location
520
  * ntfs_device_unix_io_read - Read from the device, from the current location
522
  * @dev:
521
  * @dev:
523
@@ -205,6 +607,29 @@
522
@@ -205,6 +606,29 @@
524
 static s64 ntfs_device_unix_io_read(struct ntfs_device *dev, void *buf,
523
 static s64 ntfs_device_unix_io_read(struct ntfs_device *dev, void *buf,
525
 		s64 count)
524
 		s64 count)
526
 {
525
 {
Lines 550-556 Link Here
550
 	return read(DEV_FD(dev), buf, count);
549
 	return read(DEV_FD(dev), buf, count);
551
 }
550
 }
552
 
551
 
553
@@ -226,6 +651,28 @@
552
@@ -226,6 +650,28 @@
554
 		return -1;
553
 		return -1;
555
 	}
554
 	}
556
 	NDevSetDirty(dev);
555
 	NDevSetDirty(dev);
Lines 579-585 Link Here
579
 	return write(DEV_FD(dev), buf, count);
578
 	return write(DEV_FD(dev), buf, count);
580
 }
579
 }
581
 
580
 
582
@@ -243,6 +690,13 @@
581
@@ -243,6 +689,13 @@
583
 static s64 ntfs_device_unix_io_pread(struct ntfs_device *dev, void *buf,
582
 static s64 ntfs_device_unix_io_pread(struct ntfs_device *dev, void *buf,
584
 		s64 count, s64 offset)
583
 		s64 count, s64 offset)
585
 {
584
 {
Lines 593-599 Link Here
593
 	return pread(DEV_FD(dev), buf, count, offset);
592
 	return pread(DEV_FD(dev), buf, count, offset);
594
 }
593
 }
595
 
594
 
596
@@ -265,6 +719,13 @@
595
@@ -265,6 +718,13 @@
597
 		return -1;
596
 		return -1;
598
 	}
597
 	}
599
 	NDevSetDirty(dev);
598
 	NDevSetDirty(dev);
Lines 607-623 Link Here
607
 	return pwrite(DEV_FD(dev), buf, count, offset);
606
 	return pwrite(DEV_FD(dev), buf, count, offset);
608
 }
607
 }
609
 
608
 
610
@@ -281,6 +742,13 @@
609
@@ -281,7 +741,14 @@
611
 	int res = 0;
610
 	int res = 0;
612
 	
611
 	
613
 	if (!NDevReadOnly(dev)) {
612
 	if (!NDevReadOnly(dev)) {
614
+#if USE_UBLIO
613
+#if USE_UBLIO
615
+		if (DEV_HANDLE(dev)->ublio_fh) {
614
+		if (DEV_HANDLE(dev)->ublio_fh)
616
+			res = ublio_fsync(DEV_HANDLE(dev)->ublio_fh);
615
+ 			res = ublio_fsync(DEV_HANDLE(dev)->ublio_fh);
617
+			if (res)
616
+		if (!DEV_HANDLE(dev)->ublio_fh || !res)
618
+				return res;
617
+			res = fsync(DEV_FD(dev));
619
+		}
618
+#else
620
+#endif
621
 		res = fsync(DEV_FD(dev));
619
 		res = fsync(DEV_FD(dev));
620
+#endif
622
 		if (res)
621
 		if (res)
623
 			ntfs_log_perror("Failed to sync device %s", dev->d_name);
622
 			ntfs_log_perror("Failed to sync device %s", dev->d_name);
623
 		else
(-)fusefs-ntfs/files/pkg-message.in (-3 / +6 lines)
Lines 20-30 Link Here
20
		  (creation, deletion, moving, find(1)) perform faster.
20
		  (creation, deletion, moving, find(1)) perform faster.
21
		  Try 2/4MB and 512/256KB for the different approaches. Note
21
		  Try 2/4MB and 512/256KB for the different approaches. Note
22
		  that after that points performance descreases again.
22
		  that after that points performance descreases again.
23
UBLIO_ITEMS	- 64. When greater, increases speed of filesystem operations,
23
UBLIO_ITEMS	- 64. Higher increases speed of filesystem operations. Try 128.
24
		  but consumes more memory. Try 128.
25
UBLIO_GRACE	- 32. Makes the cache items have more chances to be reused.
24
UBLIO_GRACE	- 32. Makes the cache items have more chances to be reused.
26
UBLIO_SYNC_IO	- 0. If enabled, highly decreases writing speed, but the data
25
UBLIO_SYNC_IO	- 0. If enabled, highly decreases writing speed, but the data
27
		  is written immediatly to the disk.
26
		  is immediatly written to the disk.
28
27
29
For example (improves performance over large files):
28
For example (improves performance over large files):
30
29
Lines 34-37 Link Here
34
the FORCE_ALIGNED_IO variable (it will be set to 512 bytes), but this is only
33
the FORCE_ALIGNED_IO variable (it will be set to 512 bytes), but this is only
35
useful for testing purposes and in practice has no use.
34
useful for testing purposes and in practice has no use.
36
35
36
Note that higher values for UBLIO_BLOCKSIZE and UBLIO_ITEMS increase the
37
memory usage by their product in bytes. By default it consumes 64MB. To
38
decrease it to 16MB set UBLIO_BLOCKSIZE to 256KB for example.
39
37
==============================================================================
40
==============================================================================

Return to bug 115088