The NetBSD Project

CVS log for src/lib/libperfuse/ops.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libperfuse

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.91 / (download) - annotate - [select for diffs], Wed Jul 6 12:33:41 2022 UTC (6 months, 4 weeks ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored)

fix various typos in comments.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Apr 12 21:05:36 2022 UTC (9 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

s/sould/should/ and s/shoud/should/

Revision 1.89 / (download) - annotate - [select for diffs], Sat Sep 11 21:30:46 2021 UTC (16 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

sysinst/partitions.h: fix typos comments, also fix same typos in other files.

Revision 1.84.16.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:15 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.84.16.1: +5 -14 lines
Diff to previous 1.84.16.1 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.88 / (download) - annotate - [select for diffs], Mon Sep 23 12:00:57 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

Restore binary compatibility by using the statvfs90 structure internally.

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Tue Aug 13 14:44:37 2019 UTC (3 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.86: +4 -13 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

Pull up following revision(s) (requested by manu in ticket #50):

	lib/libperfuse/ops.c: revision 1.87

Rollback directory filehandle screening for FUSE lock operations
libfuse has a different usage of filehandles for files and directories.

A directory filehandle is valid only for directory operations such
as OPENDIR, READDIR, RELEASEDIR, FSYNCDIR. Change of src/lib/libperfuse/ops.c
1.85-1.86 made sure filehandles of directories were only sent for that
operations.

However, the status of lock operations GETLK, SETLK, SETLKW was overlooked.

The only FUSE filesystem I found using locks is GlusterFS, and it needs
directory filehandles to be provided on lock operations, otherwise locking
crashes the filesystem. Hence this change brings back filehandles for
lock operations on directories.

Revision 1.84.8.2 / (download) - annotate - [select for diffs], Tue Aug 13 14:27:22 2019 UTC (3 years, 5 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.84.8.1: +4 -13 lines
Diff to previous 1.84.8.1 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

Pull up following revision(s) (requested by manu in ticket #1335):

	lib/libperfuse/ops.c: revision 1.87

Rollback directory filehandle screening for FUSE lock operations
libfuse has a different usage of filehandles for files and directories.

A directory filehandle is valid only for directory operations such
as OPENDIR, READDIR, RELEASEDIR, FSYNCDIR. Change of src/lib/libperfuse/ops.c
1.85-1.86 made sure filehandles of directories were only sent for that
operations.

However, the status of lock operations GETLK, SETLK, SETLKW was overlooked.
The only FUSE filesystem I found using locks is GlusterFS, and it needs
directory filehandles to be provided on lock operations, otherwise locking
crashes the filesystem. Hence this change brings back filehandles for
lock operations on directories.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Aug 10 07:08:11 2019 UTC (3 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.86: +4 -13 lines
Diff to previous 1.86 (colored)

Rollback directory filehandle screening for FUSE lock operations

libfuse has a different usage of filehandles for files and directories.
A directory filehandle is valid only for directory operations such
as OPENDIR, READDIR, RELEASEDIR, FSYNCDIR. Change of src/lib/libperfuse/ops.c
1.85-1.86 made sure filehandles of directories were only sent for that
operations.

However, the status of lock operations GETLK, SETLK, SETLKW was overlooked.
The only FUSE filesystem I found using locks is GlusterFS, and it needs
directory filehandles to be provided on lock operations, otherwise locking
crashes the filesystem. Hence this change brings back filehandles for
lock operations on directories.

Revision 1.84.16.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:26 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.84: +75 -76 lines
Diff to previous 1.84 (colored)

Sync with HEAD

Revision 1.84.8.1 / (download) - annotate - [select for diffs], Sun Feb 10 13:40:41 2019 UTC (3 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.84: +75 -76 lines
Diff to previous 1.84 (colored)

Pull up following revision(s) (requested by manu in ticket #1186):

	lib/libperfuse/perfuse.c: revision 1.41
	lib/libperfuse/perfuse_priv.h: revision 1.37
	lib/libperfuse/ops.c: revision 1.85
	lib/libperfuse/ops.c: revision 1.86
	lib/libperfuse/debug.c: revision 1.13

Use reclaim2 to fix reclaim/lookup race conditions

The PUFFS reclaim operation had a race condition with lookups: we could
be asked to lookup a node, then to reclaim it before lookup completion.

At lookup completion, we would then create a leaked node.

Enter the PUFFS reclaim2 operation, which features a nlookup argument.

That let us count how many lookups are pending and avoid the above
described scenario. It also makes the codes simplier.

 -

Fix directory filehandle usage with libufse. Fix lookup count
libfuse does not use filehandle the same way for directories and other
objects. As a result, filehandles obtained by OPENDIR should not be
sent on non-directory related operations like READ/WRITE/GETATTR...

While there, fix the lookup count sent to the FORGET operation, which
led to leaked nodes.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Feb 9 02:22:45 2019 UTC (3 years, 11 months ago) by manu
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Changes since 1.85: +40 -20 lines
Diff to previous 1.85 (colored)

Fix directory filehandle usage with libufse. Fix lookup count

libfuse does not use filehandle the same way for directories and other
objects. As a result, filehandles obtained by OPENDIR should not be
sent on non-directory related operations like READ/WRITE/GETATTR...

While there, fix the lookup count sent to the FORGET operation, which
led to leaked nodes.

Revision 1.84.14.1 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:13 2018 UTC (4 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.84: +36 -57 lines
Diff to previous 1.84 (colored) next main 1.85 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.85 / (download) - annotate - [select for diffs], Fri Nov 16 02:39:02 2018 UTC (4 years, 2 months ago) by manu
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.84: +36 -57 lines
Diff to previous 1.84 (colored)

Use reclaim2 to fix reclaim/lookup race conditions

The PUFFS reclaim operation had a race condition with lookups: we could
be asked to lookup a node, then to reclaim it before lookup completion.
At lookup completion, we would then create a leaked node.

Enter the PUFFS reclaim2 operation, which features a nlookup argument.
That let us count how many lookups are pending and avoid the above
described scenario. It also makes the codes simplier.

Revision 1.50.2.23 / (download) - annotate - [select for diffs], Fri Jun 19 17:40:47 2015 UTC (7 years, 7 months ago) by snj
Branch: netbsd-6
Changes since 1.50.2.22: +12 -8 lines
Diff to previous 1.50.2.22 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Pull up following revision(s) (requested by manu in ticket #1306):
	lib/libperfuse/ops.c: revision 1.84
Fix dot-lookup when readdir does not provide inodes
Some filesystems do not provide inode numbers through readdir (FUSE
mounts
without -o use_ino). We therefore have to lookup each directory entry to
get the missing numbers.
dot and double-dot are exceptions, as we already know the values.
Moreover,
the lookup code does not expect to get requests for dot and will abort
perfused(8) when it gets some. In order to fix that, we just check for
dot and double-dot special case and use the known values instead of
sending
a lookup.

Revision 1.50.2.22 / (download) - annotate - [select for diffs], Fri Jun 19 17:35:48 2015 UTC (7 years, 7 months ago) by snj
Branch: netbsd-6
Changes since 1.50.2.21: +11 -1 lines
Diff to previous 1.50.2.21 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1305):
	lib/libperfuse/ops.c: revision 1.60
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.

Revision 1.66.2.16 / (download) - annotate - [select for diffs], Mon Jun 8 20:49:54 2015 UTC (7 years, 7 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.66.2.15: +12 -8 lines
Diff to previous 1.66.2.15 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Pull up following revision(s) (requested by manu in ticket #828):
	lib/libperfuse/ops.c: revision 1.84
Fix dot-lookup when readdir does not provide inodes
Some filesystems do not provide inode numbers through readdir (FUSE
mounts without -o use_ino). We therefore have to lookup each directory
entry to get the missing numbers.
dot and double-dot are exceptions, as we already know the values.
Moreover, the lookup code does not expect to get requests for dot and
will abort perfused(8) when it gets some. In order to fix that, we just
check for dot and double-dot special case and use the known values
instead of sending a lookup.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jun 3 14:07:05 2015 UTC (7 years, 8 months ago) by manu
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Changes since 1.83: +12 -8 lines
Diff to previous 1.83 (colored)

Fix dot-lookup when readdir does not provide inodes

Some filesystems do not provide inode numbers through readdir (FUSE mounts
without -o use_ino). We therefore have to lookup each directory entry to
get the missing numbers.

dot and double-dot are exceptions, as we already know the values. Moreover,
the lookup code does not expect to get requests for dot and will abort
perfused(8) when it gets some. In order to fix that, we just check for
dot and double-dot special case and use the known values instead of sending
a lookup.

Revision 1.50.2.21 / (download) - annotate - [select for diffs], Fri Feb 27 20:21:02 2015 UTC (7 years, 11 months ago) by martin
Branch: netbsd-6
Changes since 1.50.2.20: +3 -1 lines
Diff to previous 1.50.2.20 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1260):
	lib/libpuffs/puffs.3: revision 1,55,1.60
	sys/fs/puffs/puffs_msgif.h: revision 1.84
	lib/libperfuse/ops.c: revision 1.83
	sys/fs/puffs/puffs_sys.h: revision 1.89
	sys/fs/puffs/puffs_vfsops.c: revision 1.116
	lib/libperfuse/perfuse.c: revision 1.36
	sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202

Use more markup. New sentence, new line. Bump date for previous.

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE
FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Update file size after write without metadata flush
If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.

Revision 1.66.2.15 / (download) - annotate - [select for diffs], Fri Feb 27 19:39:56 2015 UTC (7 years, 11 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.14: +3 -1 lines
Diff to previous 1.66.2.14 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #555):
	lib/libpuffs/puffs.3: revision 1.60
	sys/fs/puffs/puffs_msgif.h: revision 1.84
	lib/libperfuse/ops.c: revision 1.83
	sys/fs/puffs/puffs_sys.h: revision 1.89
	sys/fs/puffs/puffs_vfsops.c: revision 1.116
	lib/libperfuse/perfuse.c: revision 1.36
	sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE

FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Update file size after write without metadata flush
If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Feb 15 20:21:29 2015 UTC (7 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.82: +3 -1 lines
Diff to previous 1.82 (colored)

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE

FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Revision 1.66.2.14 / (download) - annotate - [select for diffs], Sat Jan 17 11:47:27 2015 UTC (8 years ago) by martin
Branch: netbsd-7
Changes since 1.66.2.13: +28 -23 lines
Diff to previous 1.66.2.13 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #422):
	lib/libperfuse/ops.c: revision 1.82
Fix atime update
FUSE filesystems assume that SETATTR with atime is the result of utiimes()
being called. As a result, atime and mtime will be updated.  This happens
with MooseFS and glusterFS. atime is supposed to be updated by the
filesystem itself when it gets read operations.
We fix the problem in SETATTR operations by
1) do not create a mtime update when we have an atime update (and vice
   versa), just fill the fields to avoid the filesystem restting the
   missing field to Epoch, but do not pretend we want to update it.
2) If the change is limited to atime, iscard it, as updates should be
   done by READ operations
3) Kernel part of PUFFS has been fixed to make sure reads on empty file
   are sent to the filesystem:
   http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html
Thanks to Tom Ivar Helbekkmo for reporting this issue.

Revision 1.50.2.20 / (download) - annotate - [select for diffs], Fri Jan 16 19:42:54 2015 UTC (8 years ago) by martin
Branch: netbsd-6
Changes since 1.50.2.19: +28 -23 lines
Diff to previous 1.50.2.19 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1235):
	lib/libperfuse/ops.c: revision 1.82
Fix atime update
FUSE filesystems assume that SETATTR with atime is the result of utiimes()
being called. As a result, atime and mtime will be updated.  This happens
with MooseFS and glusterFS. atime is supposed to be updated by the
filesystem itself when it gets read operations.
We fix the problem in SETATTR operations by
1) do not create a mtime update when we have an atime update (and vice
   versa), just fill the fields to avoid the filesystem restting the
   missing field to Epoch, but do not pretend we want to update it.
2) If the change is limited to atime, iscard it, as updates should be
   done by READ operations
3) Kernel part of PUFFS has been fixed to make sure reads on empty file
   are sent to the filesystem:
   http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html
Thanks to Tom Ivar Helbekkmo for reporting this issue.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Jan 13 16:51:30 2015 UTC (8 years ago) by manu
Branch: MAIN
Changes since 1.81: +28 -23 lines
Diff to previous 1.81 (colored)

Fix atime update

FUSE filesystems assume that SETATTR with atime is the result of utiimes()
being called. As a result, atime and mtime will be updated.  This happens
with MooseFS and glusterFS. atime is supposed to be updated by the
filesystem itself when it gets read operations.

We fix the problem in SETATTR operations by
1) do not create a mtime update when we have an atime update (and vice
   versa), just fill the fields to avoid the filesystem restting the
   missing field to Epoch, but do not pretend we want to update it.
2) If the change is limited to atime, iscard it, as updates should be
   done by READ operations
3) Kernel part of PUFFS has been fixed to make sure reads on empty file
   are sent to the filesystem:
   http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html

Thanks to Tom Ivar Helbekkmo for reporting this issue.

Revision 1.50.2.19 / (download) - annotate - [select for diffs], Tue Dec 2 22:01:37 2014 UTC (8 years, 2 months ago) by snj
Branch: netbsd-6
Changes since 1.50.2.18: +10 -5 lines
Diff to previous 1.50.2.18 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1193):
	lib/libperfuse/ops.c: revision 1.81
Allow setxattr to be called with a NULL value, instead of crashing.

Revision 1.66.2.13 / (download) - annotate - [select for diffs], Fri Nov 14 15:06:36 2014 UTC (8 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.12: +10 -5 lines
Diff to previous 1.66.2.12 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #231):
	lib/libperfuse/ops.c: revision 1.81
Allow setxattr to be called with a NULL value, instead of crashing.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Nov 12 05:08:43 2014 UTC (8 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.80: +10 -5 lines
Diff to previous 1.80 (colored)

Allow setxattr to be called with a NULL value, instead of crashing.

Revision 1.50.2.18 / (download) - annotate - [select for diffs], Sun Nov 9 11:03:41 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.17: +4 -9 lines
Diff to previous 1.50.2.17 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1186):
	lib/libperfuse/ops.c: revision 1.80
Restore build with -DDEBUG, and avoid a spurious diagnostic error with
-DDEBUG

Revision 1.66.2.12 / (download) - annotate - [select for diffs], Sun Nov 9 10:06:34 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-7
Changes since 1.66.2.11: +4 -9 lines
Diff to previous 1.66.2.11 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #192):
	lib/libperfuse/ops.c: revision 1.80
Restore build with -DDEBUG, and avoid a spurious diagnostic error with
-DDEBUG

Revision 1.50.2.17 / (download) - annotate - [select for diffs], Sun Nov 9 07:53:39 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.16: +11 -12 lines
Diff to previous 1.50.2.16 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1185):
	lib/libperfuse/ops.c: revision 1.79
Avoid deadlocks on write errors
On write errors, we failed to dequeue some operations, leading to
rare but unpleasant deadlocks

Revision 1.50.2.16 / (download) - annotate - [select for diffs], Sun Nov 9 07:02:57 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.15: +4 -2 lines
Diff to previous 1.50.2.15 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1177):
	lib/libperfuse/ops.c: revision 1.77
Fix invalid free in deletextattr FUSE handler
Do not free FUSE message on error as it was not allocated.

Revision 1.50.2.15 / (download) - annotate - [select for diffs], Sun Nov 9 06:29:22 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.14: +2 -2 lines
Diff to previous 1.50.2.14 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1167):
	lib/libperfuse/ops.c: revision 1.76
Report allocated bytes on FS correctly, instead of using file size
(which is wrong for sparse files)

Revision 1.50.2.14 / (download) - annotate - [select for diffs], Sun Nov 9 06:16:50 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.13: +15 -7 lines
Diff to previous 1.50.2.13 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1165):
	lib/libperfuse/ops.c: revision 1.75
Do not trust the filesystem's readdir to give us nul-terminated file
names

Revision 1.66.2.11 / (download) - annotate - [select for diffs], Wed Nov 5 18:18:27 2014 UTC (8 years, 2 months ago) by snj
Branch: netbsd-7
Changes since 1.66.2.10: +11 -12 lines
Diff to previous 1.66.2.10 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #183):
	lib/libperfuse/ops.c: revision 1.79
Avoid deadlocks on write errors
On write errors, we failed to dequeue some operations, leading to
rare but unpleasant deadlocks

Revision 1.66.2.10 / (download) - annotate - [select for diffs], Wed Nov 5 18:11:30 2014 UTC (8 years, 2 months ago) by snj
Branch: netbsd-7
Changes since 1.66.2.9: +40 -1 lines
Diff to previous 1.66.2.9 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #181):
	lib/libperfuse/fuse.h: revision 1.6
	lib/libperfuse/ops.c: revision 1.78
	lib/libperfuse/perfuse.c: revision 1.35
	lib/libperfuse/perfuse_priv.h: revision 1.36
	lib/libpuffs/dispatcher.c: revision 1.48
	lib/libpuffs/opdump.c: revision 1.37
	lib/libpuffs/puffs.c: revision 1.118
	lib/libpuffs/puffs.h: revision 1.126
	lib/libpuffs/puffs_ops.3: revisions 1.40-1.41
	sys/fs/puffs/puffs_msgif.h: revision 1.82-1.83
	sys/fs/puffs/puffs_msgif.h: revision 1.82
	sys/fs/puffs/puffs_vnops.c: revision 1.196
Add PUFFS support for fallocate and fdiscard operations
--
libpuffs support for fallocate and fdiscard operations
--
Add PUFFS_HAVE_FALLOCATE in puffs_msgif.h so that filesystem can decide
at build time wether fallocate is usable
--
FUSE fallocate support
There seems to be no fdiscard FUSE operation at the moment, hence that
one is left unused.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Nov 4 09:17:31 2014 UTC (8 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.79: +4 -9 lines
Diff to previous 1.79 (colored)

Restore build with -DDEBUG, and avoid a spurious diagnostic error with -DDEBUG

Revision 1.50.2.13 / (download) - annotate - [select for diffs], Tue Nov 4 01:52:53 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.12: +11 -11 lines
Diff to previous 1.50.2.12 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1151):
	lib/libperfuse/ops.c: revision 1.74
Avoid a file resize serialization deadlock when writing with
PUFFS_IO_APPEND flag. The symptom was a hang when appending to
a file with a null size.

Revision 1.50.2.12 / (download) - annotate - [select for diffs], Tue Nov 4 01:50:42 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.11: +2 -2 lines
Diff to previous 1.50.2.11 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1153):
	lib/libperfuse/ops.c		1.72
	lib/libperfuse/perfuse_priv.h	1.35

Fix build failure on amd64.

Revision 1.50.2.11 / (download) - annotate - [select for diffs], Mon Nov 3 19:40:10 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.10: +7 -1 lines
Diff to previous 1.50.2.10 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1148):
	lib/libperfuse/ops.c: revision 1.73
rmdir dir/.. must return an error. Use ENOTEMPTY like FFS does.

Revision 1.50.2.10 / (download) - annotate - [select for diffs], Mon Nov 3 19:37:58 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.9: +75 -11 lines
Diff to previous 1.50.2.9 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1147):
	lib/libperfuse/perfuse.c: revision 1.34
	lib/libperfuse/ops.c: revision 1.71
Improve POSIX compliance of FUSE filesystems through PERUSE
- access denied is EPERM and not EACCES
- access to file owned by someone else in a sticy-bit directory should
  be allowed for the sticy-bit directory owner
- setting sticky-bit on a non directory should produce EFTYPE
- implement PATHCONF method as much as we can.

Revision 1.50.2.9 / (download) - annotate - [select for diffs], Mon Nov 3 19:31:39 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.8: +8 -4 lines
Diff to previous 1.50.2.8 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1144):
	lib/libperfuse/ops.c: revision 1.70
We used to remove the trailing zeros in FUSE readlink replies, but
it seems it does not always happen. Just remove them if present.

Revision 1.50.2.8 / (download) - annotate - [select for diffs], Mon Nov 3 19:18:09 2014 UTC (8 years, 3 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.7: +91 -53 lines
Diff to previous 1.50.2.7 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #1140):
	lib/libperfuse/ops.c				1.63-1.69
	lib/libperfuse/perfuse.c			1.32-1.33
	lib/libperfuse/perfuse_priv.h			1.32-1.34
	lib/libperfuse/subr.c				1.20
	lib/libpuffs/creds.c				1.16
	lib/libpuffs/dispatcher.c			1.47
	lib/libpuffs/puffs.h				1.125
	lib/libpuffs/puffs_ops.3			1.37-1.38
	lib/libpuffs/requests.c				1.24
	sys/fs/puffs/puffs_msgif.h			1.81
	sys/fs/puffs/puffs_sys.h			1.85
	sys/fs/puffs/puffs_vnops.c			1.183
	usr.sbin/perfused/msg.c				1.22
Bring libpuffs, libperfuse and perfused on par with -current:
- implement  FUSE direct I/O
- remove useless code and warnings
- fix missing GETATTR bugs
- fix exended attribute get and list operations

Revision 1.79 / (download) - annotate - [select for diffs], Fri Oct 31 15:20:08 2014 UTC (8 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.78: +11 -12 lines
Diff to previous 1.78 (colored)

Avoid deadlocks on write errors

On write errors, we failed to dequeue some operations, leading to
rare but unpleasant deadlocks

Revision 1.78 / (download) - annotate - [select for diffs], Fri Oct 31 15:12:15 2014 UTC (8 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.77: +40 -1 lines
Diff to previous 1.77 (colored)

FUSE fallocate support
There seems to be no fdiscard FUSE operation at the moment, hence that one
is left unused.

Revision 1.66.2.9 / (download) - annotate - [select for diffs], Thu Oct 30 12:38:15 2014 UTC (8 years, 3 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.8: +4 -2 lines
Diff to previous 1.66.2.8 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #170):
	lib/libperfuse/ops.c: revision 1.77
Fix invalid free in deletextattr FUSE handler
Do not free FUSE message on error as it was not allocated.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Oct 28 16:54:11 2014 UTC (8 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.76: +4 -2 lines
Diff to previous 1.76 (colored)

Fix invalid free in deletextattr FUSE handler

Do not free FUSE message on error as it was not allocated.

Revision 1.66.2.8 / (download) - annotate - [select for diffs], Mon Oct 13 19:00:16 2014 UTC (8 years, 3 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.7: +2 -2 lines
Diff to previous 1.66.2.7 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #137):
	lib/libperfuse/ops.c: revision 1.76
Report allocated bytes on FS correctly, instead of using file size
(which is wrong for sparse files)

Revision 1.66.2.7 / (download) - annotate - [select for diffs], Sat Oct 11 16:25:19 2014 UTC (8 years, 3 months ago) by snj
Branch: netbsd-7
Changes since 1.66.2.6: +15 -7 lines
Diff to previous 1.66.2.6 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #134):
	lib/libperfuse/ops.c: revision 1.75
Do not trust the filesystem's readdir to give us nul-terminated file
names

Revision 1.76 / (download) - annotate - [select for diffs], Sat Oct 11 04:19:38 2014 UTC (8 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

Report allocated bytes on FS correctly, instead of using file size
(which is wrong for sparse files)

Revision 1.75 / (download) - annotate - [select for diffs], Tue Sep 30 00:06:19 2014 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.74: +15 -7 lines
Diff to previous 1.74 (colored)

Do not trust the filesystem's readdir to give us nul-terminated file names

Revision 1.66.2.6 / (download) - annotate - [select for diffs], Fri Sep 12 08:13:20 2014 UTC (8 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.5: +2 -2 lines
Diff to previous 1.66.2.5 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by enami in ticket #86):
	lib/libperfuse/perfuse_priv.h: revision 1.35
	lib/libperfuse/ops.c: revision 1.72
Fix build failure on amd64.

Revision 1.66.2.5 / (download) - annotate - [select for diffs], Thu Sep 11 13:41:57 2014 UTC (8 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.4: +11 -11 lines
Diff to previous 1.66.2.4 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #89):
	lib/libperfuse/ops.c: revision 1.74
Avoid a file resize serialization deadlock when writing with
PUFFS_IO_APPEND flag. The symptom was a hang when appending to
a file with a null size.

Revision 1.66.2.4 / (download) - annotate - [select for diffs], Thu Sep 11 12:17:10 2014 UTC (8 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.3: +75 -11 lines
Diff to previous 1.66.2.3 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #86):
	lib/libperfuse/perfuse.c: revision 1.34
	lib/libperfuse/ops.c: revision 1.71
Improve POSIX compliance of FUSE filesystems through PERDUSE
- access denied is EPERM and not EACCES
- access to file owned by someone else in a sticy-bit directory should
  be allowed for the sticy-bit directory owner
- setting sticky-bit on a non directory should produce EFTYPE
- implement PATHCONF method as much as we can.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Sep 11 04:05:52 2014 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.73: +11 -11 lines
Diff to previous 1.73 (colored)

Avoid a file resize serialization deadlock when writing with
PUFFS_IO_APPEND flag. The symptom was a hang when appending to
a file with a null size.

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Mon Sep 8 19:09:07 2014 UTC (8 years, 4 months ago) by msaitoh
Branch: netbsd-7
Changes since 1.66.2.2: +7 -1 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #78):
	lib/libperfuse/ops.c: revision 1.73
rmdir dir/.. must return an error. Use ENOTEMPTY like FFS does.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Sep 5 15:20:16 2014 UTC (8 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.72: +7 -1 lines
Diff to previous 1.72 (colored)

rmdir dir/.. must return an error. Use ENOTEMPRY like FFS does.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Sep 3 23:59:58 2014 UTC (8 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

Fix build failure on amd64.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Sep 3 16:01:45 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.70: +75 -11 lines
Diff to previous 1.70 (colored)

Improve POSIX compliance of FUSE filesystems through PERUSE
- access denied is EPERM and not EACCES
- access to file owned by someone else in a sticy-bit directory should
  be allowed for the sticy-bit directory owner
- setting sticky-bit on a non directory should produce EFTYPE
- implement PATHCONF method as much as we can.

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Sat Aug 30 19:30:28 2014 UTC (8 years, 5 months ago) by martin
Branch: netbsd-7
Changes since 1.66.2.1: +8 -4 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #71):
	lib/libperfuse/ops.c: revision 1.70
We used to remove the trailing zeros in FUSE readlink replies, but
it seems it does not always happen. Just remove them if present.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Aug 29 04:58:40 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.69: +8 -4 lines
Diff to previous 1.69 (colored)

We used to remove the trailing zeros in FUSE readlink replies, but
it seems it does not always happen. Just remove them if present.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Sun Aug 24 08:42:06 2014 UTC (8 years, 5 months ago) by martin
Branch: netbsd-7
Changes since 1.66: +14 -27 lines
Diff to previous 1.66 (colored)

Pull up following revision(s) (requested by manu in ticket #52):
	lib/libperfuse/perfuse_priv.h: revision 1.33
	lib/libperfuse/ops.c: revision 1.67
	lib/libpuffs/dispatcher.c: revision 1.47
	lib/libperfuse/perfuse_priv.h: revision 1.34
	lib/libperfuse/ops.c: revision 1.68
	lib/libperfuse/ops.c: revision 1.69
	lib/libpuffs/puffs_ops.3: revision 1.37
	lib/libpuffs/puffs_ops.3: revision 1.38
	lib/libperfuse/perfuse.c: revision 1.32
	lib/libperfuse/perfuse.c: revision 1.33
	usr.sbin/perfused/msg.c: revision 1.22
	lib/libpuffs/puffs.h: revision 1.125
Implement FUSE direct I/O.
Remove useless code and warnings

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:19 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.59.2.1: +106 -32 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Aug 19 15:29:14 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.68: +1 -3 lines
Diff to previous 1.68 (colored)

Remove usless warning that happens often with direct IO

Revision 1.68 / (download) - annotate - [select for diffs], Sat Aug 16 16:31:15 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.67: +1 -20 lines
Diff to previous 1.67 (colored)

Removed unimplemented mmap and seek method. seek's declaration caused
seek request to be passed backand forth between kernel and userland
while we did nothing about them.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Aug 16 16:28:43 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.66: +14 -6 lines
Diff to previous 1.66 (colored)

Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag
to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel
that read/write to the file should bypass the page cache.

Remove a warning about read beyond EOF which will now normally appear when
page cache is bypassed.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:52:12 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Rebase.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Aug 10 03:22:33 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.65: +53 -20 lines
Diff to previous 1.65 (colored)

- Make sure non root users cannot access system namespace attributes
- honour namespace specification when listing attributes
- Also fix message memory leak introduced by previous commit

Revision 1.65 / (download) - annotate - [select for diffs], Sat Aug 9 19:06:50 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.64: +10 -2 lines
Diff to previous 1.64 (colored)

getextattr: fix attribute length being reported to caller. If buffer
is too small, return ENORANGE.

Caught by glusterFS regression tests

Revision 1.64 / (download) - annotate - [select for diffs], Sat Aug 9 03:17:11 2014 UTC (8 years, 5 months ago) by manu
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

Send GETATTR to filesystem for removed but still-open files, as
it is the expected behavior (bug caught by glusterFS regression tests)

Revision 1.43.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:36:59 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.43.2.4: +44 -11 lines
Diff to previous 1.43.2.4 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jan 6 08:56:34 2014 UTC (9 years ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.62: +16 -6 lines
Diff to previous 1.62 (colored)

For filesystems mounted without -o use_ino, readdir is not
able to fetch inode number. We perfom an addtional lookup
on each file to get it.

In that case, do not lookup .. from root, as it breaks
out of the filesystem and hits NULL pointers.

Revision 1.50.2.7 / (download) - annotate - [select for diffs], Tue Jul 30 04:05:32 2013 UTC (9 years, 6 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.50.2.6: +29 -6 lines
Diff to previous 1.50.2.6 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #923):
	lib/libperfuse/ops.c: revision 1.61
	lib/libperfuse/ops.c: revision 1.62
One more explicit error log, and two bug fixes
1) with recent FUSE, when lookup returns a null ino, it means ENOENT
2) odd corner case that caused a bug on dd if=test of=test conv=notrunc
   This caused the file to be open first ro, then rw. A logic bug in
   perfuse_node_open caused it to skip the second operation, whereas
   it should open for writing, and store the write FH without touching
   the read FH.
Catch open without FREAD|FWRITE (it should not happen)

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Tue Jul 23 21:07:29 2013 UTC (9 years, 6 months ago) by riastradh
Branch: riastradh-drm2
Changes since 1.60: +29 -6 lines
Diff to previous 1.60 (colored) next main 1.61 (colored)

sync with HEAD

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jul 19 07:32:35 2013 UTC (9 years, 6 months ago) by manu
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1
Changes since 1.61: +5 -1 lines
Diff to previous 1.61 (colored)

Catch open without FREAD|FWRITE (it should not happen)

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 18 09:01:20 2013 UTC (9 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.60: +25 -6 lines
Diff to previous 1.60 (colored)

One more explicit error log, and two bug fixes
1) with recent FUSE, when lookup returns a null ino, it means ENOENT
2) odd corner case that caused a bug on dd if=test of=test conv=notrunc
   This caused the file to be open first ro, then rw. A logic bug in
   perfuse_node_open caused it to skip the second operation, whereas
   it should open for writing, and store the write FH without touching
   the read FH.

Revision 1.43.2.4 / (download) - annotate - [select for diffs], Wed Jan 16 05:32:26 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.43.2.3: +11 -1 lines
Diff to previous 1.43.2.3 (colored) to branchpoint 1.43 (colored)

sync with (a bit old) head

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:00:44 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.59: +11 -1 lines
Diff to previous 1.59 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 3 15:43:20 2012 UTC (10 years, 3 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base, agc-symver-base, agc-symver
Branch point for: riastradh-drm2
Changes since 1.59: +11 -1 lines
Diff to previous 1.59 (colored)

When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.

Revision 1.43.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:14 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.43.2.2: +517 -438 lines
Diff to previous 1.43.2.2 (colored) to branchpoint 1.43 (colored)

sync with head

Revision 1.50.2.6 / (download) - annotate - [select for diffs], Sun Aug 12 13:13:20 2012 UTC (10 years, 5 months ago) by martin
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.50.2.5: +570 -516 lines
Diff to previous 1.50.2.5 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #438):
	lib/libperfuse/perfuse_priv.h: revision 1.31
	sys/fs/puffs/puffs_msgif.h: revision 1.80
	sys/fs/puffs/puffs_vnops.c: revision 1.171
	lib/libpuffs/puffs_ops.3: revision 1.31
	sys/fs/puffs/puffs_vnops.c: revision 1.172
	sys/fs/puffs/puffs_vnops.c: revision 1.173
	sys/fs/puffs/puffs_vnops.c: revision 1.174
	usr.sbin/perfused/perfused.c: revision 1.24
	sys/fs/puffs/puffs_sys.h: revision 1.80
	sys/fs/puffs/puffs_sys.h: revision 1.81
	sys/fs/puffs/puffs_sys.h: revision 1.82
	lib/libperfuse/subr.c: revision 1.19
	lib/libperfuse/perfuse.c: revision 1.30
	sys/fs/puffs/puffs_msgif.c: revision 1.90
	sys/fs/puffs/puffs_msgif.c: revision 1.91
	sys/fs/puffs/puffs_msgif.c: revision 1.92
	lib/libperfuse/ops.c: revision 1.59
	lib/libpuffs/puffs.3: revision 1.53
	lib/libperfuse/debug.c: revision 1.12
	lib/libpuffs/puffs.3: revision 1.54
	sys/fs/puffs/puffs_vnops.c: revision 1.167
	sys/fs/puffs/puffs_msgif.h: revision 1.79
	usr.sbin/perfused/msg.c: revision 1.21
	sys/fs/puffs/puffs_vfsops.c: revision 1.102
	sys/fs/puffs/puffs_vfsops.c: revision 1.103
	sys/fs/puffs/puffs_vfsops.c: revision 1.105
	lib/libpuffs/puffs.h: revision 1.123
	lib/libperfuse/perfuse_if.h: revision 1.20
	lib/libperfuse/perfuse.c: revision 1.29
	lib/libpuffs/dispatcher.c: revision 1.42
	lib/libpuffs/dispatcher.c: revision 1.43
- Fix same vnodes associated with multiple cookies
The scheme used to retreive known nodes on lookup was flawed, as it only
used parent and name. This produced a different cookie for the same file
if it was renamed, when looking up ../ or when dealing with multiple files
associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of
inodes. This causes a huge rewrite of reclaim code, which do not attempt
to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim
There are a few situations where we issue multiple FUSE operations for
a PUFFS operation. On reclaim, we therefore have to wait for all FUSE
operation to complete, not just the current exchanges. We do this by
introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF
VOP_PUTPAGES causes FAF writes where the kernel does not check the
operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr
No need to wait for the result if the kernel does not want it. There is
however an exception for setattr that touch the size, we need to wait
for completion because we have other operations queued for after the
resize.
- Fix fchmod() on write-open file
fchmod() on a node open with write privilege will send setattr with both mode
and size set. This confuses some FUSE filesystem. Therefore we send two FUSE
operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code
still builds on netbsd-5 but does not have the node TTL feature anymore.
It works fine with kernel support on netbsd-6.
- Improve PUFFS_KFLAG_CACHE_FS_TTL by reclaiming older inactive nodes.
The normal kernel behavior is to retain inactive nodes in the freelist
until it runs out of vnodes. This has some merit for local filesystems,
where the cost of an allocation is about the same as the cost of a
lookup. But that situation is not true for distributed filesystems.
On the other hand, keeping inactive nodes for a long time hold memory
in the file server process, and when the kernel runs out of vnodes, it
produce reclaim avalanches that increase lattency for other operations.
We do not reclaim inactive vnodes immediatly either, as they may be
looked up again shortly. Instead we introduce a grace time and we
reclaim nodes that have been inactive beyond the grace time.
- Fix lookup/reclaim race condition.
The above improvement undercovered a race condition between lookup and
reclaim. If we reclaimed a vnode associated with a userland cookie while
a lookup returning that same cookiewas inprogress, then the kernel ends
up with a vnode associated with a cookie that has been reclaimed in
userland. Next operation on the cookie will crash (or at least confuse)
the filesystem.
We fix this by introducing a lookup count in kernel and userland. On
reclaim, the kernel sends the count, which enable userland to detect
situation where it initiated a lookup that is not completed in kernel.
In such a situation, the reclaim must be ignored, as the node is about
to be looked up again.
Fix hang unmount bug introduced by last commit.
We introduced a slow queue for delayed reclaims, while the existing
queue for unmount, flush and exist has been renamed fast queue. Both
queues had timestamp for when an operation should be done, but it was
useless for the fast queue, which is always used to run an operation
ASAP. And the timestamp test had an error that turned ASAP into "at next
tick", but nobody what there to wake the thread at next tick, hence
the hang. The fix is to remove the useless and buggy timestamp test for
fast queue.
Rename slow sopreq queue into node sopreq queue, to refet the fact that
is only intended for postponed node reclaims.
When purging the node sopreq queue, do not call puffs_msg_sendresp(), as
it makes no sense.
Fix race condition between (create|mknod|mkdir|symlino) and reclaim, just
like we did it between lookup and reclaim.
Missing bit in previous commit (prevent race between create|mknod|mkdir|symlink
and reclaim)
Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.
Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.
Enable the featuure for perfused, as this is how FUSE works.
Missing bit in previous commit (PUFFS_KFLAG_CACHE_DOTDOT option to avoid
looking up ..)

Revision 1.59 / (download) - annotate - [select for diffs], Sat Jul 21 05:49:42 2012 UTC (10 years, 6 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.58: +571 -517 lines
Diff to previous 1.58 (colored)

- Fix same vnodes associated with multiple cookies
The scheme used to retreive known nodes on lookup was flawed, as it only
used parent and name. This produced a different cookie for the same file
if it was renamed, when looking up ../ or when dealing with multiple files
associated with the same name through link(2).

We therefore abandon the use of node name and introduce hashed lists of
inodes. This causes a huge rewrite of reclaim code, which do not attempt
to keep parents allocated until all their children are reclaimed

- Fix race conditions in reclaim
There are a few situations where we issue multiple FUSE operations for
a PUFFS operation. On reclaim, we therefore have to wait for all FUSE
operation to complete, not just the current exchanges. We do this by
introducing node reference count with node_ref() and node_rele().

- Detect data loss caused by FAF
VOP_PUTPAGES causes FAF writes where the kernel does not check the
operation result. At least issue a warning on error.

- Enjoy FAF shortcut on setattr
No need to wait for the result if the kernel does not want it. There is
however an exception for setattr that touch the size, we need to wait
for completion because we have other operations queued for after the
resize.

- Fix fchmod() on write-open file
fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.

- Remove node TTL handling for netbsd-5 for simplicity sake. The code
still builds on netbsd-5 but does not have the node TTL feature anymore.
It works fine with kernel support on netbsd-6.

Revision 1.50.2.5 / (download) - annotate - [select for diffs], Thu Jul 5 17:26:14 2012 UTC (10 years, 7 months ago) by riz
Branch: netbsd-6
Changes since 1.50.2.4: +3 -3 lines
Diff to previous 1.50.2.4 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #392):
	lib/libpuffs/puffs_ops.3: revision 1.32
	lib/libperfuse/ops.c: revision 1.58
	lib/libpuffs/puffs.h: revision 1.122
	lib/libpuffs/dispatcher.c: revision 1.41
	lib/libperfuse/perfuse_priv.h: revision 1.30
Pass the FAF flag to handlers:
- setattr_ttl is updated to add a flag argument. Since it was not
present in
  a previous release, we can change its API
- write2 is introduced, this is write with an extra flag for FAF.
- fsync already has the FAF information in a flag and needs no change
- for other operations, FAF is unconditional
Fix the build by adding (unused) flags argument to
perfuse_node_setattr_ttl

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 28 13:53:13 2012 UTC (10 years, 7 months ago) by abs
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Fix the build by adding (unused) flags argument to perfuse_node_setattr_ttl

Revision 1.50.2.4 / (download) - annotate - [select for diffs], Sun Jun 24 16:07:12 2012 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6
Changes since 1.50.2.3: +84 -72 lines
Diff to previous 1.50.2.3 (colored) to branchpoint 1.50 (colored)

Pull up revisions:
  src/lib/libperfuse/ops.c revisions 1.56,1.57
(requested by manu in ticket #347).

Revision 1.57 / (download) - annotate - [select for diffs], Thu Jun 14 05:58:22 2012 UTC (10 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.56: +83 -72 lines
Diff to previous 1.56 (colored)

Fix memory leak when we discard a voided setattr operation

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jun 13 01:45:56 2012 UTC (10 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

Fix memory leak on setattr

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Tue Jun 5 16:25:24 2012 UTC (10 years, 8 months ago) by jdc
Branch: netbsd-6
Changes since 1.50.2.2: +14 -1 lines
Diff to previous 1.50.2.2 (colored) to branchpoint 1.50 (colored)

Pull up revision 1.55 (requested by manu in ticket #290).

Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
to set atime and mtime at the same time. Detect that situation just
like we detected ftruncate(2) and wipe atime and mtime if it occurs.

Revision 1.55 / (download) - annotate - [select for diffs], Mon May 28 02:13:32 2012 UTC (10 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.54: +14 -1 lines
Diff to previous 1.54 (colored)

Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
to set atime and mtime at the same time. Detect that situation just
like we detected ftruncate(2) and wipe atime and mtime if it occurs.

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:32 2012 UTC (10 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.43.2.1: +139 -96 lines
Diff to previous 1.43.2.1 (colored) to branchpoint 1.43 (colored)

sync with head.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Mon Apr 23 16:48:59 2012 UTC (10 years, 9 months ago) by riz
Branch: netbsd-6
Changes since 1.50.2.1: +301 -392 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #195):
	lib/libskey/skeysubr.c: revision 1.27
	lib/libkvm/kvm_getloadavg.c: revision 1.11
	lib/libwrap/update.c: revision 1.9
	lib/liby/yyerror.c: revision 1.9
	lib/libpuffs/puffs_ops.3: revision 1.30
	lib/libwrap/misc.c: revision 1.10
	lib/libwrap/hosts_access.c: revision 1.20
	lib/libpuffs/pnode.c: revision 1.11
	lib/libperfuse/subr.c: revision 1.17
	lib/libpuffs/pnode.c: revision 1.12
	lib/libperfuse/subr.c: revision 1.18
	lib/libwrap/options.c: revision 1.15
	lib/libwrap/fix_options.c: revision 1.11
	lib/libperfuse/ops.c: revision 1.52
	lib/libperfuse/ops.c: revision 1.53
	lib/libperfuse/ops.c: revision 1.54
	lib/libwrap/hosts_ctl.c: revision 1.5
	lib/libintl/gettext.c: revision 1.27
	lib/libwrap/shell_cmd.c: revision 1.6
	lib/libpuffs/dispatcher.c: revision 1.39
	lib/libperfuse/perfuse_priv.h: revision 1.27
	lib/libwrap/socket.c: revision 1.19
	lib/libpuffs/puffs.3: revision 1.50
	lib/libperfuse/perfuse_priv.h: revision 1.28
	lib/libpuffs/puffs_priv.h: revision 1.45
	lib/libpuffs/puffs.3: revision 1.51
	lib/libperfuse/perfuse_priv.h: revision 1.29
	lib/libwrap/percent_x.c: revision 1.5
	lib/libpuffs/puffs.3: revision 1.52
	lib/libperfuse/debug.c: revision 1.11
	sys/fs/puffs/puffs_vnops.c: revision 1.165
	lib/libwrap/tcpd.h: revision 1.13
	sys/fs/puffs/puffs_vnops.c: revision 1.166
	lib/libwrap/eval.c: revision 1.7
	sys/fs/puffs/puffs_msgif.h: revision 1.78
	sys/fs/puffs/puffs_vfsops.c: revision 1.101
	lib/libwrap/rfc931.c: revision 1.9
	lib/libwrap/clean_exit.c: revision 1.5
	lib/libpuffs/puffs.h: revision 1.120
	lib/libc/stdlib/jemalloc.c: revision 1.27
	lib/librmt/rmtlib.c: revision 1.26
	lib/libpuffs/puffs.h: revision 1.121
	sys/fs/puffs/puffs_sys.h: revision 1.79
	lib/librumpclient/rumpclient.c: revision 1.48
	lib/libwrap/refuse.c: revision 1.5
	lib/libperfuse/perfuse.c: revision 1.26
	lib/libperfuse/perfuse.c: revision 1.27
	tests/fs/puffs/t_fuzz.c: revision 1.5
	lib/libperfuse/perfuse.c: revision 1.28
	lib/libpuffs/dispatcher.c: revision 1.40
	sys/fs/puffs/puffs_node.c: revision 1.24
	lib/libwrap/diag.c: revision 1.9
	lib/libintl/textdomain.c: revision 1.13
Use C89 function definition
Add name and atttribute cache with filesytem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.
Split file system.
Comma fixes.
Remove dangling "and".
Bump date for previous.
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout
- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
  attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM
(how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests

Revision 1.54 / (download) - annotate - [select for diffs], Wed Apr 18 00:57:21 2012 UTC (10 years, 9 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.53: +139 -96 lines
Diff to previous 1.53 (colored)

- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
  attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM (how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:30 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.43: +367 -454 lines
Diff to previous 1.43 (colored)

sync with head

Revision 1.53 / (download) - annotate - [select for diffs], Sun Apr 8 15:13:06 2012 UTC (10 years, 9 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.52: +69 -17 lines
Diff to previous 1.52 (colored)

Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.

PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Mar 21 10:10:36 2012 UTC (10 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.51: +115 -301 lines
Diff to previous 1.51 (colored)

Use C89 function definition

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Sat Mar 10 16:42:30 2012 UTC (10 years, 10 months ago) by riz
Branch: netbsd-6
Changes since 1.50: +9 -6 lines
Diff to previous 1.50 (colored)

Pull up following revision(s) (requested by manu in ticket #104):
	lib/libperfuse/subr.c: revision 1.16
	lib/libperfuse/ops.c: revision 1.51
	lib/libperfuse/perfuse_priv.h: revision 1.26
The kernel can lookup the same node multiple time and will reclaim as
many times it looked up. All reclaims but the last one must be ignored,
otherwise we discard a node which will still get operations. We therefore
have to keep track of lookup/reclaim count and hnour reclaims only when
the count reaches zero.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Mar 8 14:58:57 2012 UTC (10 years, 10 months ago) by manu
Branch: MAIN
Changes since 1.50: +9 -6 lines
Diff to previous 1.50 (colored)

The kernel can lookup the same node multiple time and will reclaim as
many times it looked up. All reclaims but the last one must be ignored,
otherwise we discard a node which will still get operations. We therefore
have to keep track of lookup/reclaim count and hnour reclaims only when
the count reaches zero.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jan 29 06:22:02 2012 UTC (11 years ago) by manu
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.49: +16 -48 lines
Diff to previous 1.49 (colored)

Improve FUSE trace facility

Revision 1.49 / (download) - annotate - [select for diffs], Wed Dec 28 17:33:53 2011 UTC (11 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.48: +57 -1 lines
Diff to previous 1.48 (colored)

Add a FUSE trace facility, with statistics collection. This should help
tracking bugs and performance issues

Revision 1.48 / (download) - annotate - [select for diffs], Fri Dec 16 05:34:54 2011 UTC (11 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.47: +83 -126 lines
Diff to previous 1.47 (colored)

Rework puffs_framebuf management toremove leaks and abusive reuses. On
exchange error, the puffs_framebuf is now freed immediatly, before
requeuing outstanding requests.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Nov 28 05:33:33 2011 UTC (11 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.46: +47 -5 lines
Diff to previous 1.46 (colored)

- Add missing ENOENT or ESTALL when accessing deleted node
- Fix a warning, fix style (80 chars for a line)

Revision 1.46 / (download) - annotate - [select for diffs], Thu Nov 17 02:28:21 2011 UTC (11 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored)

Copy node expiration date before comparing it, otherwise the comparison
does not work (no idea why) and cached node is never used.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Nov 16 04:52:40 2011 UTC (11 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.44: +19 -6 lines
Diff to previous 1.44 (colored)

Correctly pass the advlock owner id from kernel to filesystem, instead of
using process PID.

Allow the usage of the read filehandle for advlock, in order to support
shared locks on read-only files

Revision 1.44 / (download) - annotate - [select for diffs], Thu Nov 10 16:21:09 2011 UTC (11 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.43: +9 -2 lines
Diff to previous 1.43 (colored)

Return EISDIR for read/write to directories. NetBSD directory read should
instead return a getent(2) output, but is that really used?

Revision 1.43 / (download) - annotate - [select for diffs], Sun Oct 30 05:11:37 2011 UTC (11 years, 3 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.42: +213 -94 lines
Diff to previous 1.42 (colored)

- Fix the confusion between fileno (opaque FUSE reference) and inode
  numbers. fileno must be used when exchanging FUSE messages.
- Do not use kernel name cache anymore, as it caused modification from
  other machines to be invisible.
- Honour name and attribute cache directive from FUSE filesystem

Revision 1.42 / (download) - annotate - [select for diffs], Sat Sep 10 10:06:10 2011 UTC (11 years, 4 months ago) by tron
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Avoid comparison between signed and unsigned integer expressions by
casting the offset to a unsigned type. This fixes the NetBSD/i386
and hopefully the NetBSD/amd64 build.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Sep 9 22:51:44 2011 UTC (11 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.40: +21 -20 lines
Diff to previous 1.40 (colored)

make this build on amd64 and remove redundant and unused code.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Sep 9 15:45:28 2011 UTC (11 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.39: +112 -24 lines
Diff to previous 1.39 (colored)

Serialize access to file size. We already have such a thing in the
kernel, where it fixes race for PUFFS filesystems, but we need it again
in perfused since FUSE filesystems are allowed to reorder requests.

The huge issue is in the asyncrhonous SETATTR sent by fsync. It is
followed by a syncrhnous FSYNC, so if the filesystem does not reorder
requests, once the FSYNC returns, we are confident the SETATTR is done.
But since FUSE can reorder, we need to implement sync in perfused.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Aug 13 23:12:15 2011 UTC (11 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored)

- fix warn/err confusiog
- fix debugging printf
- add func arguments to simple formats

Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 9 09:06:52 2011 UTC (11 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

Fix uninitiaized variable usage (never though lint would miss that when
used by return statement) that caused unprivilegied user to fail on
unlink(2) and rename(2) operations.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Aug 2 16:57:16 2011 UTC (11 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.36: +1 -4 lines
Diff to previous 1.36 (colored)

Do not reject reads on directory, it raises a useless EBADFD while the
thing can just fail silently.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Aug 2 14:53:38 2011 UTC (11 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.35: +78 -24 lines
Diff to previous 1.35 (colored)

Fix creds passed to FUSE when requests are done on behalf of the kernel.
We previously sent uid/gid set to -1, we now set it to 0.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 19 07:29:39 2011 UTC (11 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored)

Make sure libperfuse still builds on netbsd-5.1

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 18 02:14:01 2011 UTC (11 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.33: +22 -1 lines
Diff to previous 1.33 (colored)

ftruncate(2) cause a SETATTR with only va_size set, and some filesystems
(e.g.: glusterfs) will do a custom handling in such a situation. This
breaks because libpuffs folds a metadata (va_atime and va_mtime) update
in each SETATTR. We try to identify SETATTR caused by ftruncate(2) and
remove va_atime and va_mtime in such situation.

This fixes a bug with glusterfs, where parts of a file downloaded by
FTP was filled with zeros because of a ftruncate(2) sent out of order
with write(2) requests. glusterfs behavior depends on the undocumented
FUSE rule that ftruncate(2) will only set va_size in SETATTR.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 14 15:37:32 2011 UTC (11 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.32: +56 -36 lines
Diff to previous 1.32 (colored)

FUSE struct dirent's off is not the offset in the buffer, it is an opaque
cookie that the filesystem passes us, and that we need to send back on
the next READDIR. Most filesystem just ignore the value and send the
next chunk of buffer, but not all of them. Fixing this allows glusterfs
distributed volume to work.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jul 4 08:07:29 2011 UTC (11 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.31: +16 -2 lines
Diff to previous 1.31 (colored)

Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 28 16:19:16 2011 UTC (11 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.30: +212 -1 lines
Diff to previous 1.30 (colored)

Add support for extended attributes

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:18:39 2011 UTC (11 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.29: +21 -10 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 1 15:54:10 2011 UTC (11 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.29: +21 -10 lines
Diff to previous 1.29 (colored)

Fix race conditions between write and getattr/setattr, which lead to
inconsitencies between kernel and filesystem idea of file size during
writes with IO_APPEND.

At mine, this resulted in a configure script producing config.status
with ": clr\n" lines stripped (not 100% reproductible, but always this
specific string. That is of little interest except for my own future
reference).

When a write is in progress, getattr/setattr get/set the maximum size
among kernel idea (grown by write) and filesystem idea (not yet grown).

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 1 07:57:24 2011 UTC (11 years, 8 months ago) by manu
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.28: +1 -7 lines
Diff to previous 1.28 (colored)

Remove outdated comment about a fixed bug

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 30 14:50:08 2011 UTC (11 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.27: +6 -3 lines
Diff to previous 1.27 (colored)

Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs
where the FUSE filesyste replied to an operation and got an ENOBUFS it did
not handle.

We now are also able to cleanly unmount

Revision 1.27 / (download) - annotate - [select for diffs], Wed May 18 15:28:12 2011 UTC (11 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.26: +8 -5 lines
Diff to previous 1.26 (colored)

- Proper permission checks when doing directory traversal. e.g.: run
rm dir/file while dir was never looked up since the mount. In that
situation, we get lookup with pcn_nameiop NAMEI_DELETE for dir before
we get it for file. But for dir we are just looking for PUFFS_VEXEC.
This is solved by honouring NAMEI_ISLASTCN, which is set for the last
element only

- do not send O_EXCL to FUSE as documentation forbids it.

- fix warning

Revision 1.26 / (download) - annotate - [select for diffs], Wed May 11 14:52:48 2011 UTC (11 years, 8 months ago) by jakllsch
Branch: MAIN
Changes since 1.25: +6 -6 lines
Diff to previous 1.25 (colored)

Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE.

Revision 1.25 / (download) - annotate - [select for diffs], Tue May 3 13:19:50 2011 UTC (11 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.24: +36 -10 lines
Diff to previous 1.24 (colored)

Fixes for the advlock method. It can now sustain pkgsrc/devel/locktests
with glusterfs as backend

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 25 04:54:53 2011 UTC (11 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.23: +204 -228 lines
Diff to previous 1.23 (colored)

- Implement proper unprivilegied user permission verifications
Verification is now done in the lookup method, as it is the way to
go. Of course there are corner cases, such as the sticky bit which
need special handling in the remove method.

- Set full fsidx in vftstat method

- Do not pass O_APPEND to the filesystem. FUSE always sends the
write offset, so setting O_APPEND is useless. If the filesystem
uses it in an open(2) system call, it will even cause file
corruptions, since offsets given to pwrite(2) will be ignored.
This fix allows glusterfs to host a NetBSD ./build.sh -o build

- Do not use the FUSE access method, use getattr and check for
permission on our own. The problem is that a FUSE filesystem will
typically use the Linux-specific setfsuid() to perform access
control. If that is missing, any chack is likely to occur on
behalf of the user running the filesystem (typically root), causing
access method to return wrong information.

- When possible, avoid performing a getattr method call and use
cached value in puffs_node instead. We still retreive the latest
value by calling getattr when performing append write operation,
to minimize the chances that another writer appended since the
last time we did.

- Update puffs_node cached file size in write method

- Remove unused argument to perfuse_destroy_pn()

Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 11 05:37:58 2010 UTC (12 years, 3 months ago) by manu
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.22: +0 -0 lines
Diff to previous 1.22 (colored)

Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 11 01:52:05 2010 UTC (12 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.21: +9 -3 lines
Diff to previous 1.21 (colored)

FUSE filesystems' readlink returns a resolved link with a NUL trailing
character, and PUFFS do not want it. This fixes this bug, that returned
stat the informations for x instead of reporting ENOENT:
mkdir x && ln x z && stat -x z/whatever/you/want

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 11 01:08:26 2010 UTC (12 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.20: +134 -115 lines
Diff to previous 1.20 (colored)

- fix access control: pcn->pcn_cred is not user credentials
- Keep track of file generation
- remove size tracking in pnd_size, we have it in pn_va.va_size

Revision 1.20 / (download) - annotate - [select for diffs], Mon Oct 4 03:56:24 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.19: +12 -14 lines
Diff to previous 1.19 (colored)

- delete an obsoelte comment about inactive
- remove a test for getattr return field that was never filled
- correctly send filehandle and filehandle flags for getaattr

Revision 1.19 / (download) - annotate - [select for diffs], Sun Oct 3 05:46:47 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.18: +113 -68 lines
Diff to previous 1.18 (colored)

- Correctly handle rename whith overwritten destination
- Keep track of file name to avoid lookups when we can. This makes sure we
  do not have two cookies for the same inode, a situation that cause wreak
  havoc when we come to remove or rename a node.
- Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names
- In open, queue requests after checking for access, as there is no merit
  to queue a will-be-denied request while we can deny it immediatly
- request reclaim of removed nodes at inactive stage

Revision 1.18 / (download) - annotate - [select for diffs], Wed Sep 29 08:01:10 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.17: +239 -172 lines
Diff to previous 1.17 (colored)

= Open files =
- Restore open on our own in fsycn and readdir, as the node may not already
be open, and FUSE really wants it to be. No need to close immediatly, it
can be done at inactive time.

= Write operations =
- fix a nasty bug that corrupted files on write (written added twice)
- Keep track of file size in order to honour PUFFS_IO_APPEND

= many fixes in rename =
- handler overwritten nodes correctly
- wait for all operations on the node to drain before doing rename, as
filesystems may not cope with operations on a moving file.
- setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore
miss the inactive time for an overwritten node. This bounds us to give up
PUFFS_KFLAG_IAONDEMAND.

= Removed files =
- forbid most operations on a removed node, return ENOENT
- setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed
file reclaim

= Misc =
- Update outdated ARGSUSED for lint
- Fix a memory leak (puffs_pn_remove instead of puffs_pn_put)
- Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the
lookup code much simplier.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 23 16:02:34 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.16: +237 -147 lines
Diff to previous 1.16 (colored)

== file close operations ==
- use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are
immediatly send to the filesystem, and we do not have anymore write
after inactive. As a consequence, we can close files at inactive
stage, and there is not any concern left with files opened at
create time. We also do not have anymore to open ourselves in readdir and
fsync.

- Fsync on close (inactive stage). That makes sure we will not need to
do these operations once the file is closed (FUSE want an open file).
short sircuit the request that come after the close, bu not fsinc'ing
closed files,

- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls

== Removed nodes ==
- more ENOENT retunred for operations on removed node (but there
are probably some still missing): getattr, ooen, setattr, fsync

- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid
races during UNLINK completion. Also set PND_REMOVED on node we overwirte
in rename

== Filehandle fixes ==
- queue open operation to avoid getting two fh for one file

- set FH in getattr, if the file is open

- Just requires a read FH for fsyncdir, as we always opendir in read
mode. Ok, this is misleading :-)

== Misc ==
- do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time

- short circuit nilpotent operations in setattr

- add a filename diagnostic flag to dump file names

Revision 1.16 / (download) - annotate - [select for diffs], Mon Sep 20 07:00:21 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.15: +153 -97 lines
Diff to previous 1.15 (colored)

- performance improvement for read, readdir and write. Now we use
SOCK_DGRAM, we can send many pages at once without hitting any bug

- when creating a file, it is open for FUSE, but not for the kernel.
If the kernel does not do a subsequent open, we have a leak. We fight
against this by trying to close such file that the kernel left unopen
for some time.

- some code refactoring to make message exchange debug easier (more to come)

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 15 01:51:43 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.14: +16 -9 lines
Diff to previous 1.14 (colored)

- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to
assume datagram semantics: when using SOCK_STREAM, if perfused sends
frames faster than the filesystem consumes them, it will grab multiple
frames at once and discard anything beyond the first one. For now the
code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM
support will probably have to be removed for the sake of readability.

- Remeber to sync parent directories when moving a node

- In debug output, display the requeue type (readdir, write, etc...)

Revision 1.14 / (download) - annotate - [select for diffs], Thu Sep 9 09:12:35 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.13: +33 -17 lines
Diff to previous 1.13 (colored)

- call FSYNCDIR for directories
- directories can be open R/W (for FSYNCDIR)
- do not skip calls to FSYNC or FSYNCDIR if the filesystem returned ENOSYS:
it may change its mind, and it may also actually do something when retunring
ENOSYS
- When FSYNC and FSYNCDIR return ENOSYS, do not report it to kernel (silent
failure)

Revision 1.13 / (download) - annotate - [select for diffs], Tue Sep 7 16:58:13 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

Mode argument must contain the file type (S_* items) for create and mknod

Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 7 02:11:04 2010 UTC (12 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

- Do not checkfor peer credentials when perfused is autostarted and
therefore runs with filesystem privileges

- shut up warnings and debug messages when perfused is autostarted

- make perfused patch modifiable with CFLAGS for easier pkgsrc integration

- Fix build warnings

Revision 1.11 / (download) - annotate - [select for diffs], Mon Sep 6 01:40:24 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

More LP64 fixes

Revision 1.10 / (download) - annotate - [select for diffs], Mon Sep 6 01:17:05 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.9: +4 -3 lines
Diff to previous 1.9 (colored)

build fixes for LP64

Revision 1.9 / (download) - annotate - [select for diffs], Sun Sep 5 06:49:13 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.8: +66 -61 lines
Diff to previous 1.8 (colored)

- correctly set flags for CREATE

- after a node is deleted, some operations should return ENOENT, some
should be ignored. Fixed it for ACCESS, SETATTR and GETATTR. Other
operation may also need a fix.

- At reclaim time, there is no need to wait for READDIR and READ
completion, since the caller will never close a file before getting
readir() and read() replies. Waiting for WRITE completion is still
mandatory, but we must ensure that no queued WRITE is awaiting to
be scheduled. Once the queue is drained, we must check that the
reclaim operation was not canceled by a new file LOOKUP.

- At reclaim time, fixed a mix up between read and write fh to close

- Fixed permission checks for RENAME (it tested the node itself
instead of the source)

- When seting file mode, only MKNOD needs the filetype (S_* fields).
It is probably a bug to set it for other operations.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Sep 3 14:32:50 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored)

Fix reference count bug introduced by previous commit

Revision 1.7 / (download) - annotate - [select for diffs], Fri Sep 3 07:15:18 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.6: +281 -161 lines
Diff to previous 1.6 (colored)

- Postpone file close at reclaim time, since NetBSD sends fsync and
setattr(mtime, ctime) after close, while FUSE expects the file
to be open for these operations

- remove unused argument to node_mk_common()

- remove requeued requests when they are executed, not when they
are tagged for schedule

- try to make filehandle management simplier, by keeping track of only
one read and one write filehandle (the latter being really read/write).

- when CREATE is not available, we use the MKNOD/OPEN path. Fix a
bug here where we opened the parent directory instead of the node:
add the missing lookup of the mknod'ed node.

- lookup file we just created: glusterfs does not really see them
otherwise.

- open file when doing setattr(mtime, ctime) on non open files, as
some filesystems seems to require it.

- Do not flush pagecache for removed nodes

- Keep track of read/write operations in progress, and at reclaim
time, make sure they are over before closing and forgeting the file.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 2 08:58:06 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.5: +8 -11 lines
Diff to previous 1.5 (colored)

- only remove queued requests once they are executed, not when they
are set to be scheduled later
- remove an unused argument to make lint happy

Revision 1.5 / (download) - annotate - [select for diffs], Wed Sep 1 14:57:24 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.4: +38 -35 lines
Diff to previous 1.4 (colored)

Build fixes for LP64

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 28 03:46:21 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.3: +198 -10 lines
Diff to previous 1.3 (colored)

- set user/group ownership after object creation.

- enforce permissios checks. This needs to be  reviewed.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 27 09:58:17 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

- if perfused is not already started (cannot connect to /dev/fuse),
FUSE filesystems will attempt to start it on their own, and will
communicate using a socketpair

- do not advertise NULL file handle as being valid when sending themback to the FUSE filesystem.

- unmount if we cannot talk to the FUSE process anymore

- set calling process gid properly

- debug message cleanup

Revision 1.2 / (download) - annotate - [select for diffs], Thu Aug 26 13:29:01 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.1: +192 -36 lines
Diff to previous 1.1 (colored)

- open the file before doing fsync: glusterfs wants that.

- Automatically call fsync on close for files. If we just close, fsync
will come later and we will have to reopen

- Add a PND_DIRTY flag to keep track of files that really need a sync.
perfuse_node_fsync only calls the FUSE fsync method if there are data
to push.

- Add a PND_OPEN flag to keep track of open files. Checking non NULL
fh is not enough, as some filesystems will always set fh to 0.

- Add a sync diagnostic flag, to watch fsync and dirty flag activity.
Make the fh diagnostic flag more verbose

- Send the fh in setattr (it was hardcoded to 0)

I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!

Revision 1.1 / (download) - annotate - [select for diffs], Wed Aug 25 07:16:00 2010 UTC (12 years, 5 months ago) by manu
Branch: MAIN

libperfuse(3) is a PUFFS relay to FUSE. In order to use it,
FUSE filesystem must be patched to #include <perfuse.h> in the source
files that open /dev/fuse and perform the mount(2) system call. The
FUSE filesystem must be linked with -lperfuse.

libperfuse(3) implements the FUSE kernel interface, on which libfuse or
any FUSE filesystem that opens /dev/fuse directly can be used.

For now, an external daemon called perfused(8) is used. This may change
in the future.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>