diff options
author | Max Khon <fjoe@FreeBSD.org> | 2007-08-23 14:41:39 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2007-08-23 14:41:39 +0000 |
commit | 7ae35f4449ae09cf8e4239c52d16bcc7900a7222 (patch) | |
tree | 8e89becde8511778f221000af2cb95cdbdca8843 /sysutils/fusefs-ntfs/files | |
parent | a90e91d6977aa4e9bc35e0e16cbaf47fc77273a2 (diff) |
Notes
Diffstat (limited to 'sysutils/fusefs-ntfs/files')
-rw-r--r-- | sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c | 32 | ||||
-rw-r--r-- | sysutils/fusefs-ntfs/files/pkg-message.in | 9 |
2 files changed, 22 insertions, 19 deletions
diff --git a/sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c b/sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c index a1759380abf0..0c729a687e13 100644 --- a/sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c +++ b/sysutils/fusefs-ntfs/files/patch-libntfs-3g__unix_io.c @@ -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 diff --git a/sysutils/fusefs-ntfs/files/pkg-message.in b/sysutils/fusefs-ntfs/files/pkg-message.in index 91ee0d56d0c1..f3abf199d3f8 100644 --- a/sysutils/fusefs-ntfs/files/pkg-message.in +++ b/sysutils/fusefs-ntfs/files/pkg-message.in @@ -20,11 +20,10 @@ UBLIO_BLOCKSIZE - 1048576 (1MB). Larger improves reading/writing speed of (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 @@ It is also possible to enforce block aligned I/O on regular files by setting 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. + ============================================================================== |