Commit Graph

728 Commits

Author SHA1 Message Date
pooka 05eae67bb1 Add a third type of fh option, passthrough, where the kernel does
not attempt to handle struct fid at all and passes it as such to
userspace.
2007-08-23 14:36:46 +00:00
pooka e6d6dce9bf Mimic namei structure changes for puffs. bump both kernel & lib version. 2007-08-22 17:54:30 +00:00
pooka 1b189c72ab In the new world order (a.k.a. the human-understandable world order)
VOP_LOOKUP ignores LOCKPARENT completely, so make this ignore it also.

XXX: tested only with rump, but I can't really see how this worked
at all before
2007-08-17 17:44:43 +00:00
pooka 25a346d4fb Nuke PUFFSLOOKUP_FOO and move to NAMEI_FOO 2007-08-15 14:19:19 +00:00
pooka d1cd2c26a2 * don't call VOP_ACCESS in lookup, that's the file system's problem
* be more careful with r/o fs to catch EEXIST in lookup CREATE
* some comment polish
2007-08-13 09:48:55 +00:00
pooka 4c3f2a2acf enforce MNT_RDONLY 2007-08-12 19:44:15 +00:00
pooka 493dccb979 sprinkle #ifdef _KERNEL 2007-08-08 09:21:34 +00:00
rumble 1e80c150c7 Fix a parenthesis bug that would nearly always make the superblock magic
check evaluate to true.
2007-08-06 23:25:27 +00:00
pooka 31d16d310e Make VFS_SYNC always succeed instead of always fail.
Fixes non-forced unmount.
2007-08-06 21:10:24 +00:00
pooka 0ed76b1676 When resizing a node, first drop extra pages and zero tail, and only
then set the new size.  Otherwise zerolen will always be, well, 0.
2007-08-06 16:08:55 +00:00
pooka 9dc896c9de Set mnt_fs_bshift and mnt_dev_bshift to reasonable dummy-values. 2007-08-03 13:00:19 +00:00
pooka e226ccdf0c add comment to flag a slight problem 2007-08-01 14:20:45 +00:00
pooka 8d1f899239 * nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods
2007-07-31 21:14:15 +00:00
pooka 573c189296 properly setup ubcflags 2007-07-30 14:49:01 +00:00
pooka eaf29fa688 Move PUFFS_TYPEPREFIX to puffs_msgif.h since it's used in a macro there. 2007-07-30 09:04:58 +00:00
rumble 3ea6a6534e Use _DIRENT_MINSIZE when determining the number of NFS cookies to allocate,
rather than hard-coding 16.
2007-07-29 21:17:41 +00:00
rumble 1c42082598 Only set *ap->a_cookies when we're returning success. Also, do not hard-
code 16, but rather use _DIRENT_MINSIZE as the divisor when determining
the number of cookies to allocate.

Noticed by pooka@.
2007-07-29 20:58:10 +00:00
rumble 8f9941b474 Support NFS cookies and the eofflag in efs_readdir. Also, be sure to
update uio->uio_offset as not doing so would cause large directory reads
to misbehave.

EFS is now properly NFS-exportable.
2007-07-29 20:15:20 +00:00
ad a0d1fd8d0c It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 13:31:07 +00:00
pooka b7321c1a86 apply ketchup to vop_mmap_args comment 2007-07-29 13:12:42 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
rumble f486212a0e When computing the superblock checksum, use an unsigned short to avoid an
undesired sign-extension. Now EFS works on big endian machines, too.
2007-07-29 00:56:04 +00:00
yamt 3822af7031 ubc_uiomove: add an "advice" argument rather than using UVM_ADV_RANDOM blindly. 2007-07-27 09:50:36 +00:00
pooka 8b45aab0cf include <uvm/uvm_prot.h> 2007-07-27 09:18:54 +00:00
pooka 1ce406a846 Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.
2007-07-27 08:26:38 +00:00
pooka d9970c8066 Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter. 2007-07-26 22:57:36 +00:00
pooka daeb749df5 ntfs_unmount:
* panic if flushing system nodes fails: we have released too many
  resources and would die anyway the next time unmount is attempted
* KASSERT that VOP_CLOSE succeeds, but always return 0.  once again
  we have released too many resources

XXX: maybe rewrite to be a bit more robust
2007-07-26 18:43:14 +00:00
pooka 53a9d4abfa Don't do nfs server consistency checks in readdir, especially since
the check depended on the nfs server implementation.
2007-07-26 18:15:42 +00:00
jmmv 7180494a8d Multiple fixes for tmpfs' rename operation:
- Raise an error if renaming a file to a directory.
- Raise an error if renaming a directory to a file.
- Raise an error if renaming a directory to a non-empty directory.
- Properly allow renaming a directory to an empty directory.
  The system could previously crash if the kernel had DIAGNOSTIC enabled,
  as this triggered a bogus assertion.

Problem found by Geoff Wing.
2007-07-23 15:41:01 +00:00
pooka 606670f3e8 Initialize size and/or writesize when creating a vnode. 2007-07-23 11:27:45 +00:00
pooka 9f125ab035 Also set writesize when creating node.
noticed by Markus W Kilbinger
2007-07-23 11:05:47 +00:00
pooka 11c7e45cc2 Rearrange previous to make it work by other than chance.
noticed by xtraeme's gcc flags
2007-07-23 08:52:47 +00:00
pooka ae519de8f0 Set union vnode size when creating a vnode.
fixes kern/36679 by Geoff C. Wing
2007-07-23 08:21:50 +00:00
pooka 8565af3eda use NULL, not 0, to pass a pointer 2007-07-22 18:59:00 +00:00
pooka 9a0aaa5422 Keep track of the maximum size we have supplied the file server (or
it has supplied us).  If we fault pages which are at offset >= server
size, but less than the in-kernel vnode size, inform the file server
of the latest developments in file size before issueing the fault.
The avoids confusion with files which are not written start to finish.

fixes kern/36429 by yamt
2007-07-22 18:22:49 +00:00
ad 744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
pooka 9137aeda4b In sync, skip over vnodes based on if they are clean rather than
if they have pages.
2007-07-20 16:46:43 +00:00
pooka 3d29492693 add debug printf 2007-07-19 22:05:22 +00:00
pooka d5a9a344fd Initialize pnode to 0 after fetching it from the pool. At least
one effect is poll() working much better, as selinfo doesn't contain
random bits.
2007-07-19 19:04:47 +00:00
pooka b2a23735c5 don't request more than the maximum request size in readdir 2007-07-19 09:38:01 +00:00
pooka 0bc4555326 Make the minimum request size twice the minimum request structure size.
Otherwise ops with payload would have no room for payload.
2007-07-19 09:26:12 +00:00
pooka 09fe9d53cd define PUFFSREQSIZEOP ioctl, which can be used to fetch the
maximum request size
2007-07-19 07:52:45 +00:00
pooka e9d0d9309a kill MFSNAMELEN limit 2007-07-18 21:08:35 +00:00
pooka 0450206384 Set a file server supplied file system type in the type field and set
the mntfromname to be the place mounted from instead of the type.
2007-07-17 11:29:43 +00:00
pooka e24b0872a4 Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok
2007-07-17 11:19:31 +00:00
pooka 404c3d29ef 1|2 is more correct when it's 3 instead of 2. This makes calls to
the file server inactive less over-eagerly executed and masks some
problems with the new mounting style.  Effectively, it makes some
file systems such as psshfs mountable again (only without -o allops).
2007-07-16 16:11:23 +00:00
dsl 6210687bcf Remove the copyout() of the mount args from puffs_mount(), the buffer
supplied is a kernel address.
The puffs userspace code has been changed to do a 2nd call with
MNT_GETARGS to retrieve the information.
2007-07-14 16:06:53 +00:00
dsl 2721ab6c7b Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.
2007-07-12 19:35:32 +00:00
ad c21083c17f s/pagedaemon_lwp/pagedaemon_proc/ 2007-07-09 21:55:10 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00