Commit Graph

957 Commits

Author SHA1 Message Date
pooka bbaa4c8c80 Cache vnode member variables necessary for operations after the
userspace call, namely our private mount structure, in the activation
record.  This avoids problems in situations where the userspace
file server happens to die during our upcall and the vnode is
forcibly reclaimed before we roll back to the current stack frame.
2007-10-11 12:31:45 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
pooka ad16af9917 g/c more unused stuff 2007-10-09 20:57:06 +00:00
pooka 4a4ec123bd g/c vntouser_req(), it's not used anymore 2007-10-09 15:49:34 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 59904ecbd2 Merge from vmlocking: fix dodgy use of VOP_ISLOCKED(). 2007-10-08 17:01:43 +00:00
pooka a6bfd0bd84 g/c the "sizeop" code previous used for ioctl/fcntl. It was already
commented out and has bitrotted beyond all recognition, so it needs
complete rethinking.
2007-10-04 21:20:47 +00:00
pooka c562677131 If kernel resource allocation fails after the file server has
committed something, issue an abort.  The abort is done through
the regular op channel, e.g. failed mkdir leads to regular rmdir,
inactive and reclaim.  No internal interface is planned currently
for the one file system out of a million which would implement it
to benefit from the one case in a billion where kernel resource
allocation actually does fail and out of that one case in a trillion
where internal vs. external would make a difference.
2007-10-02 01:17:17 +00:00
pooka 47cf5226f9 * better error checking: validate error values received from userland
to be vaild errno values
* include string describing error in PUFFS_ERR
* get rid of union in puffs_req, it's nothing but trouble
* pass pmp to async i/o callbacks
2007-10-01 21:09:07 +00:00
pooka c82fd73eb8 kill trailing whitespace 2007-09-29 20:17:36 +00:00
pooka c4ad0e4da1 Release vnode being created in error branch instead of leaving it
locked.  Ideally the function should be rewritten to do things in
a different order, but this tries to keep changes minimal aiming
for a possible netbsd-4 pullup.

fixes PR kern/37034
2007-09-28 19:48:42 +00:00
pooka db8a762626 comments & other minor maintenance 2007-09-27 23:25:10 +00:00
pooka 28636f63b4 Split routines handling nodes from puffs_subr to puffs_node.
No functional change.
2007-09-27 23:21:07 +00:00
pooka 1bbaeda6c3 nuke trailing , from enum. spotted by xtraeme 2007-09-27 23:10:42 +00:00
pooka 25d66b7667 Revert previous, it makes no sense whatsoever. 2007-09-27 23:03:25 +00:00
pooka 7f0d130f47 Undo state created in cookie2vnode if an error is returned. 2007-09-27 21:49:56 +00:00
pooka 7f467f6fac Differentiate between cookie2vnode returning an error and
return to caller, address unknown: no such cookie, no such node.
Make the callers use this info to either create a new vnode or bail.
2007-09-27 21:44:12 +00:00
pooka aa533e99dd Add error notifications, which are used to deliver errors from the
kernel to the file server for silly things the file server did,
e.g. attempting to create a file with size VSIZENOTSET.  The file
server can handle these as it chooses, but the default action is
for it to throw its hands in the air and sing "goodbye, cruel world,
it's over, walk on by".
2007-09-27 21:14:49 +00:00
pooka c342f5d6d4 Don't forget to insert the root node on the hash list.
... I should remember to test also if unmounting a file system works
before I commit stuff.
2007-09-27 18:06:41 +00:00
pooka 01895f64a7 Fix a race in how new cookies are checked. Previously the checking
was done separate of inserting the cookie into the lookup structure
and without any form of interlock.  This could lead to the same
cookie pointing to two different nodes.  Remedy the race by creating
a separate "checked and ready to be inserted" cookie list which
serves as an interlock without having to hold a fs-global creation
lock.
2007-09-27 14:35:14 +00:00
pooka 4d93faced9 add a few comments and g/c dead code 2007-09-24 19:15:42 +00:00
rumble 74c326b877 Simplify ptyfs_readdir at pooka's suggestion.
No functional change intended.
2007-09-24 01:00:02 +00:00
rumble 0ae0a486c7 Avoid stack allocation of large dirent structures in foo_readdir(). 2007-09-24 00:42:12 +00:00
rmind 49c0fadea3 smbfs_mount: Fix a possible dereference, and simplify the error case.
From CID: 4556

Tested by <dan>.
2007-09-21 01:33:04 +00:00
rumble f25f34f4c0 Don't explicitly set vp->v_size and then call uvm_vnp_setsize(). This is
not only unnecessary, but trips a kernel assertion introduced in r1.85 of
uvm/uvm_vnode.c.
2007-09-08 19:19:37 +00:00
rumble 0b6fb31125 In efs_readdir don't foolishly allocate and free dirents for each entry
before copying them out, rather just use a single one. Further, follow
the example of tmpfs and others by simply allocating on the stack.

This should have the side-effect of silencing false Coverity reports like
CID 4559 and 4554.
2007-09-08 18:17:59 +00:00
rumble df9eaeb9e0 CID 4553:
In efs_lookup, when checking whether a CREATE or RENAME operation would
succeed, be sure to pass the appropriate vnode pointer to VOP_ACCESS.
2007-09-08 16:21:27 +00:00
pooka d7dbef6aec move static KASSERT from mount to init 2007-09-05 22:34:17 +00:00
pooka 89e48410c4 * don't allow the file server to specify a node size to be VSIZENOTSET
* KASSERT that VNOVAL == VSIZENOTSET
2007-09-04 00:11:38 +00:00
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
pooka 4b8065ff1e mntflushbuf() cargo cult comment mania cleanup. there is no mntflushbuf(). 2007-07-09 00:01:42 +00:00
rumble 0bbb4e920d Clamp down tigher on the bound around 'numextents'. Add a few comments
to make it clearer what we're tracking.
2007-07-04 20:20:30 +00:00
rumble 0aef936cbe Additional fixes/enhancements:
1) Comply with the way buffercache(9) is intended to be used. Now we
       read in single blocks of EFS_BB_SIZE, never taking in variable
       length extents with a single bread() call.

    2) Handle symlinks with more than one extent. There's no reason for
       this to ever happen, but it's handled now.

    3) Finally, add a hint to our iteration initialiser so we can start
       from the desired offset, rather than naively looping through from
       the beginning each time. Since we can binary search the correct
       location quickly, this improves large sequential reads by about
       40% with 128MB files. Improvement should increase with file size.
2007-07-04 19:24:09 +00:00
rumble 1798f1d8df Fix a significant performance bug in efs_read:
When reading a file, we would erroneously iterate to the next extent
before having filled the entire uio request. This lead to unnecessary
extent iteration and excessive calls to efs_read.

Sequential read performance has doubled in the uncached case and
quadrupled when data is buffered.
2007-07-04 18:40:18 +00:00
pooka 84684ff767 check for invalid vtype 2007-07-02 21:14:00 +00:00
pooka ea1108ce11 support turning REQUIREDIR off and extra consume in lookup 2007-07-02 18:25:36 +00:00
pooka df6f052d2f Get rid of the "int *refs" parameter to inactive: the same can be
accomplished now with puffs_setbacks.
2007-07-02 10:24:17 +00:00
pooka 25285a0f9c loosen KASSERT: we can also fail due to ENOMEM 2007-07-01 23:30:42 +00:00
pooka d410664985 Give the file server to ability to request the entire pathname buffer
under lookup by using PUFFS_KFLAG_LOOKUP_FULLPNBUF instead just the
current component.
2007-07-01 22:54:16 +00:00
pooka ffe0a01441 Instead of supplying a plain pid, supply an abstract struct puffs_cid *,
which can currently be used to query the pid and lwpid.
2007-07-01 17:22:13 +00:00
pooka 438f52d212 make puffs_cred an opaque type 2007-07-01 15:30:15 +00:00
rumble 1b3d6b0053 Remove a superfluous pasted structure definition, permitting ALL to
build again.

Caught by Hisashi T Fujinaka.
2007-07-01 01:09:05 +00:00
pooka 6b0a9db09f Fix logic flaw in KASSERT. Seems like my lkm wasn't compiled with
DIAGNOSTIC ...
2007-06-30 16:28:14 +00:00
rumble 6bb85b28da Additional documentation on extents and some artificial limitations SGI
has introduced (and changed in backwards-incompatible ways) over the years.
2007-06-30 15:56:16 +00:00
pooka 835b0326c5 Using POOL_INIT here makes no sense, since file systems always have
an init method.  So get rid of it and #ifdef _LKM and just always
init in the init method.  Give malloc types the same treatment.
Makes file systems nicer to work with in linksetless environments
and fixes a few LKM discrepancies.
2007-06-30 09:37:53 +00:00
rumble 6912898dc8 Add read-only support for SGI's Extent File System.
Reviewed by pooka@.
2007-06-29 23:30:16 +00:00
tsutsui 4a838a2458 Fix mnt_dev_bshift value. Pointed out by rumble@.
I'm not sure how mnt_dev_bshift is used and
whether BFS_BSHIFT is correct for it, but as rumble
said shifting BFS_BSIZE (==512) seems completly wrong.
2007-06-28 12:33:18 +00:00
pooka f055736150 Simplify code, mainly vop_strategy. No functional change 2007-06-26 12:50:49 +00:00
pooka 53a4105885 Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.
2007-06-24 22:25:49 +00:00
pooka df01a64b7a Split the NOCACHE option in twain: NOCACHE_NAME & NOCACHE_PAGE. 2007-06-24 22:16:03 +00:00
pooka e601546393 Refactor the pnode2vnode translation slightly so that VFS_ROOT
can use it directly.
2007-06-21 14:54:49 +00:00
pooka 41df8e0fed Reorganize how the root vnode is fetched so that it doesn't always
go through VFS_ROOT() and allow to fetch it without locking it.
This allows us to call the cache flush operations also for the root
vnode and most notably fixes e.g. a "No such file or directory"
for a psshfs root directory ls -l when a file was locally deleted
and remotely re-created.

Also fix some sloppy programming in root node fetch (mostly cosmetic).
2007-06-21 14:11:34 +00:00
pooka f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +00:00
pooka e2819ad1be In very verbose debug mode, print also return values for operations
(well, at least for those that go through checkop()).
2007-06-06 01:33:10 +00:00
yamt da51d139a4 improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.
2007-06-05 12:31:30 +00:00
yamt 7e6f80a234 \xa0 -> space. 2007-06-01 15:59:37 +00:00
pooka 68568e7a22 forgot to commit this with puffs_vnops.c 1.72:
Actually, we do need separate "no references in file server" and
"noref + inactive" flags if we wish to correctly support unix open
file semantics and optimize away pre-reclaim cache flushes.  So,
add PNODE_DYING which stands for norefs + inactive.
2007-05-19 16:50:49 +00:00
pooka 121b6fb7b3 Actually, we do need separate "no references in file server" and
"noref + inactive" flags if we wish to correctly support unix open
file semantics and optimize away pre-reclaim cache flushes.  So,
add PNODE_DYING which stands for norefs + inactive.
2007-05-19 16:35:01 +00:00
pooka e99cb62bcc Introduce noref setbacks, which the file server can use to signal
the kernel it has 0 references to the node in question.  In other
words, this can be used to avoid inactive(), or, if the file server
does not implement inactive, prompt reclaim for removed nodes.
2007-05-18 15:46:09 +00:00
pooka 93dd832918 selrecord() before calling userspace to avoid (very theoretical) race
where selinfo contains uninitialized garbage
2007-05-18 14:25:30 +00:00
pooka 9d9f624f97 Support VOP_POLL. This requires some acrobatics on the puffs_node,
as we give a reference to userspace for the puffs_node for the
duration of the poll call.  So reference count puffs_node separately
from the parent vnode.  vref()/vrele() is not possible due to a possible
surprise visit from VOP_INACTIVE.
2007-05-18 13:53:08 +00:00
pooka 339652951e Make it possible for the file server to specify the root vnode type
and other information instead of always using VDIR.  To make this
possible without races, require all root node information already
in puffs_mount() and nuke puffs_start2() and the associated start
operation completely.

requested/inspired by Tobias Nygren
2007-05-17 13:59:22 +00:00
pooka d79dbd3583 In case strategy memory allocation for B_ASYNC|B_READ fails,
make sure to release the buf.
2007-05-15 12:48:48 +00:00
pooka a6b1636499 Adventures in file systems, part (u_quad_t)-1: we can't use the
file system value for the size of device special files, as that
comes from specfs instead of the "host" file system.  Therefore,
take care that getattr doesn't override the value of vp->v_size.
2007-05-08 21:39:03 +00:00
pooka 4537434d57 If the op was interrupted, decrease ops waiting for fetch from the
file server only if the op was still waiting for fetch (as opposed
to waiting for the response).  Also, properly flag the possible
following inactive as an op for which we do not want to wait for
the response from the file server.
2007-05-08 21:16:55 +00:00
pooka 151ee075e9 Introduce puffs "setbacks", which can be used to set certain flags
for nodes upon return from the userspace.  Currently it can be used
to indicate that the file server should be notified of "inactive"
in case the file server has opted to not receive inactive every
time the reference count for a vnode drops to zero.  (inactive is
a common event, almost never requires any action and must be executed
sychronously, so it is wasteful).

While doing this, cleanup the release-relock nonsense from the
vntouser*() arguments.  It was never enabled and the whole LOCKEDVP()
concept was very broken to begin with.
2007-05-07 17:14:54 +00:00
pooka b5aae3d4e3 If setattr is called explicitly, use that as the sign to flush out
all metadata info cached in the kernel while we're setattr'ing in
any case.  Solves problems such as truncate (via extend-by-write)
+ chmod resulting in EPERM because the file was already read-only
when the actual truncate was flushed out of the kernel in fsync.
2007-05-06 19:43:14 +00:00
pooka 6ffefad6ef Fix a problem introduced when I converted puffs to use newlock2:
when unmounting the file system in case of a certain timing (and
possibly some other conditions), a thread would wait on a condition
variable, while another thread broadcast the cv and immediately
proceeded to destroy it.  The result was a system frozen completely
solid shorly after the process waiting for the cv woke up.  So
introduce reference counting to synchronize destruction of the
resources in unmount.

I was able to repeat the problem only on my laptop in some special
cases, so I do not know how common it was.  Ironically, killing
the file server process violently instead of unmount() didn't have
this problem because it never entered the unmount path from two
directions.
2007-05-01 12:18:40 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
pooka b474c785b7 If ubc style write fails, do not extend the file by zero-padding
it.  It might be that the file server is either crashing or just
returning consistent errors.  uiomove() would handle the error,
but if the pages weren't faulted in, memset() to the unfaultable
ubc window would cause a kernel page fault.
2007-04-24 16:29:29 +00:00
pooka c25fa1208b remember to flag park as done when we're done with it 2007-04-24 09:44:57 +00:00
pooka 8689b1a6b2 Now that puffs_park is allocated from the heap and actually freed
by the userdead routine, don't do a TAILQ_FOREACH but rather an
honest for loop.
2007-04-22 21:52:37 +00:00
pooka 6770f9f87e Issue close to the file server asynchronously. We're not interested
in the return value.
2007-04-22 18:50:28 +00:00
pooka bc38632c58 define PUFFS_KFLAG_WTCACHE, which makes the page cache write-through 2007-04-22 18:02:05 +00:00
pooka e4526ed3a0 Take care not to access park->park_preq if the waiter is gone, as
that memory is no longer available.
2007-04-21 10:36:59 +00:00
pooka 1de42023d1 don't mutex_enter() manually, we've already park_reference()d a few
lines earlier for entering the same mutex
2007-04-20 21:35:31 +00:00
pooka ac5f1b1b78 * in readdir, don't copy extra memory back and forth to userspace
* consistent usage of the variable argsize with the rest of the module
2007-04-20 11:56:35 +00:00
pooka 07ba7a7d5f Size of a readdir cookie is sizeof(**ap->a_cookies), not
sizeof(*ap->a_cookies).  Fixes nfs readdir in the case that a
directory had lots of entries with short names.
2007-04-20 11:36:25 +00:00
yamt 337d052ee1 hold proclist_mutex when calling psignal(). 2007-04-19 11:05:14 +00:00
pooka 5880c46d2d fix comment in previous 2007-04-16 14:09:53 +00:00
pooka 947c4b9f60 Allow to set non-blocking mode for transport fd even if the file
system is not yet mounted.
2007-04-16 14:09:00 +00:00
pooka f2cea5c791 Sanity-check & possibly adjust number of hash buckets already before
returning the mount argument structure to userspace.
2007-04-16 13:54:07 +00:00
pooka 96fd5059d7 catch invalid size file handles already in the kernel 2007-04-16 13:24:35 +00:00
pooka 4ccbce8168 Give the file server the ability to specify the file handle length
instead of defining a static length file handle on the framework-level.
2007-04-16 13:03:26 +00:00
chs aba740b225 define a pager flag PGO_RECLAIM, similar to FSYNC_RECLAIM, and use it
to skip unnecessary flushing when layered file system vnodes are recycled.
this also prevents a deadlock with the dodgy LFS putpages routine.
fixes the non-LFS part of PR 36150.
2007-04-16 05:14:54 +00:00
xtraeme 8d9be19250 size_t is unsigned, so use zu rather than zd which is for ssize_t,
as Matt Thomas pointed out.
2007-04-14 16:52:22 +00:00
xtraeme 6465fceffd Use zd to printf size_t. 2007-04-14 16:13:18 +00:00
pooka 0c3748498f Allow file servers to request the number of hash cookie buckets for
pnode -> vnode reverse lookup.
2007-04-13 15:25:35 +00:00
pooka 4e4ce72bb3 * add fhlen to kernel argument structure
* rename it to puffs_kargs instead of puffs_args
2007-04-13 13:31:11 +00:00
reinoud 1adc8479ba Some rogue implementations use random physical partion numbers just to
break other implementations so lookup the physical number instead of
indexing it. Choosing random numbers here is legal according to the specs,
but not a logical choice and most likely done as a wierd kind of copy
protection.

Rogue implementation found to use this
	*Microsoft CDIMAGE UDF
2007-04-12 01:56:36 +00:00
pooka f50d2a26f2 * support VFS_FHTOVP and VFS_VPTOFH
* support cookies in for VOP_READDIR

nfs exporting puffs file systems works now
2007-04-11 21:03:05 +00:00
pooka c634885e0f make overspammy debug printf less overspammy 2007-04-11 09:43:19 +00:00
pooka bc8224a1b3 fix comment: struct fid is in fstypes.h now 2007-04-09 12:21:24 +00:00
hannken fc6776f366 Remove now obsolete vn_start_write() and vn_finished_write() and
corresponding flags.

Revert softdep_trackbufs() to its state before vn_start_write() was added.

Remove from struct mount now unneeded flags IMNT_SUSPEND* and
members mnt_writeopcountupper, mnt_writeopcountlower and mnt_leaf.

Welcome to 4.99.17
2007-04-08 11:20:42 +00:00
hannken e956461048 Remove calls to now obsolete vn_start_write() and vn_finished_write(). 2007-04-07 15:06:53 +00:00
pooka 43c6ec1a06 support flushing pagecache 2007-04-06 17:48:44 +00:00
pooka 13fa815486 actually, we don't need a separate op for flushing the whole page cache
of a node, just use the range op with endoff = 0
2007-04-06 17:05:34 +00:00
pooka bd8d0a2ae0 * enable PUFFS_INVAL_PAGECACHE_NODE_RANGE
* add input parameter validation
2007-04-06 16:37:02 +00:00
pooka 3651f3e73b Fix one more bug from today's commit: don't remove the op for which
getops runs out of file server buffer space from the request queue.
Otherwise that operation silently vanishes and things go, well, quite
wrong.
2007-04-04 21:02:30 +00:00
pooka a0d5166093 fix two loop mutex botches in previous 2007-04-04 20:22:47 +00:00
pooka fa71b0706d Make it possible to interrupt waiters for fs operation completion
again.  This is useful until locking is further developed and basically
any deadlocks can be solved by killing appropriate processes.

Thanks especially to Tommi Kyntola and Antti Louko for sitting down
with me and discussing resource ownership and locking strategies
in implementing this.
2007-04-04 16:13:51 +00:00
pooka ad018126a3 s/ppark/park/ to make all the variable names consistent - park is
always a pointer now.  no functional change
2007-04-04 15:50:56 +00:00
rmind 523c1fc3e1 filecore_mountfs: Remove the dead code - fcmp cannot be non-zero here.
CID: 714
2007-04-04 02:00:58 +00:00
pooka 9cc76110cd In sync, skip vnodes which have a null v_data pointer. This is a
workaround for the problem analyzed more deeply in kern/30831.  In
short, the problem is keeping the vnode on the mount point vnode
list during reclaim.  If reclaim happens to sleep (as is a possibility
with smbfs due to calling vrele() and therefore possibly VOP_INACTIVE),
code going through the entire mountpoint vnode list will hit
half-reclaimed vnodes.
2007-04-03 14:18:19 +00:00
pooka de976b706d g/c some commented ltsleep calls accidentally left from newlock2 adaptation 2007-03-30 18:25:02 +00:00
pooka 115fa924ee * abstract ASYNCBIOREAD and let callers freely issue a callback called
from putop.  even though there's only one user currently, makes code
  more readable
* move "delta" to a standard parameter in vntouser and get rid of the
  specialcase vntouser_delta
2007-03-30 17:48:57 +00:00
pooka 78762a532d in userdead assign waiter return value only if there is a waiter for
a particular request
2007-03-29 22:11:43 +00:00
pooka 6ce49d93c1 convert to MALLOC_JUSTDEFINE 2007-03-29 16:30:07 +00:00
pooka 78693816f2 Convert spinlocks & sleep/wakeup to newlock2 locking stuff. Fix a
bunch of bugs.

* park structures are now always allocated from a pool instead of a
  mixed stack/malloc allocation
* get rid of the whole adjbuf concept, always just alloc the maximal
  amount of memory to satisfy a request
* little regression: don't allow interrupting wait from file system
  to userspace; this had problems already before, but now the problems
  really started to shine through.  I'll try to make this work again
  some day.
* fix bmap to return a sensible value in runp
2007-03-29 16:04:26 +00:00
dillo 41627b2c38 Add support for HFS Wrapper (HFS+ volume inside an HFS volume).
Remove offset argument, we should now find an HFS+ volume in any
of its standard places.

Based on work from and test image provided by Pelle Johansson.
2007-03-22 13:21:28 +00:00
dillo 30f474b9e1 Add support for HFS Wrapper (HFS+ volume inside an HFS volume).
Remove offset argument, we should now find an HFS+ volume in any
of its standard places.
2007-03-22 13:21:27 +00:00
dillo 081267c306 Add a few. 2007-03-22 13:20:13 +00:00
pooka 2bddbed0e0 export puffs version of namei ISLASTCN macro to userspace 2007-03-20 18:28:49 +00:00
tsutsui c55df5782d Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-20 11:27:48 +00:00
pooka 8d9c021816 * rework the page cache interaction a bit: cache metadata in the
kernel and flush it out all at once instead of continuous updating
* add support for delivering notifications to the file server about
  when a page was written to (but disabled by default for now).  the
  file server can use this to request flushing or invalidating the
  kernel page cache
2007-03-20 10:21:58 +00:00
dillo 0fb2977031 args.path is in UIO_USERSPACE too.
Fixes statvfs on macppc and PR kern/36012.
Thanks to Magnus Henoch for testing.
2007-03-19 09:16:22 +00:00
pooka 040eb2fb48 Support B_READ|B_ASYNC in strategy by calling biodone() directly
when the file server puts the result.
2007-03-14 12:13:58 +00:00
ad 297c1212be Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-13 14:16:07 +00:00
ad 4b1d78c00e Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-13 02:11:28 +00:00
ad 86ed875648 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-13 01:34:21 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
dillo e100c48afd Fix PR kern/35953 by mange at freemail dot hu (panic on mount):
(hfslib_open_volume) We are only interested in the catalgo and
extents header, so read the first 512 bytes, not the whole first
extent.  Also makes mounting a lot faster.
2007-03-09 22:14:09 +00:00
dillo d0c955805c Remove hfsp directories, they have been reimported as hfs. 2007-03-06 11:31:21 +00:00
dillo 56c3e41252 Complete rename of hfsp to hfs, requested by thorpej. 2007-03-06 11:28:44 +00:00
dillo 25e99827c3 Rename files from hfsp to hfs. 2007-03-06 00:22:04 +00:00
dillo d3fee42230 Temporarily readd, until rename is complete -- renaming the directory
is not enough.

(I need sleep, will clean this up tomorrow.  Sorry for the mess.)
2007-03-06 00:15:50 +00:00
dillo 601515c0d6 Renamed to HFS. 2007-03-06 00:11:38 +00:00
dillo 4f1d6e612e nitial import of (experimental read-only) implementation of Apple
HFS+ file system.

Originally developed for Google Summer of Code 2005 by Yevgeny Binder,
updated and enhanced by me.
2007-03-06 00:10:34 +00:00
dillo 9274a5c0f1 Integrate apmlabel and HFS+ file system. 2007-03-05 23:18:01 +00:00
dillo 9cf283f2a5 Initial import of (experimental read-only) implementation of Apple
HFS+ file system.

Originally developed for Google Summer of Code 2005 by Yevgeny Binder,
updated and enhanced by me.
2007-03-05 23:01:06 +00:00
jnemeth 5e186a4bae yet more caddr_t -> void * fallout 2007-03-04 21:36:38 +00:00
jnemeth 8b8caa1a52 more caddr_t -> void * fallout 2007-03-04 21:18:08 +00:00
yamt 731acd91f9 fix fallout from caddr_t changes. 2007-03-04 15:41:02 +00:00
yamt 7f8abc50b4 fix fallout from caddr_t changes. 2007-03-04 14:53:09 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
pooka 81bb031653 Make wait for the user file server PCATCHable. This makes it
possible to recover the system by just killing processes in case
a file server manages to recurse into itself either by fault of
file server implementation or by pilot error.  The downside is that
the code is extremely hard to follow and practically screams out
for newlock2 (in addition to screaming "bug here").  The whole
PCATCH nonsense and induced megacomplexity can hopefully be avoided
in the future by tweaking other parts of the implementation.
2007-02-27 23:43:23 +00:00
ad b89010bfa3 Destroy the hash locks on final unmount. 2007-02-27 16:11:51 +00:00
drochner 33ac0de1eb -add __unused declarations to make it possible to use only half of it
-fix a bitmask (harmless) and remove two unnecessary ones
We should find a better location for that code!
2007-02-26 12:33:08 +00:00
thorpej 4f3d5a9cc0 TRUE -> true, FALSE -> false 2007-02-22 06:34:42 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
pooka 8f09e1c196 Properly fix rev 1.44: limit error values from the file server to
positive values of errno and 0.  Otherwise it can return internal values
such as EJUSTRETURN and screw things up.

thanks to Bill for reminding me to revisit this
2007-02-20 19:45:37 +00:00
ad adbb9ec2fa Call genfs_node_destroy() where appropriate. 2007-02-20 16:21:03 +00:00
kochi 2794f98855 fix the problem reported in kern/35457, "cant mount msdosfs on floppy".
Since 1.40, which introduced support for non-DEV_BSIZE media,
mounting msdos floppy returned ENOTTY.

This is because floppy driver does not support DIOCGPART or DIOCWEDGEINFO
ioctl.

Those ioctls should not be a requirement for mounting msdosfs.

This patch is made by Christian Biere.
2007-02-17 18:39:15 +00:00
hannken 198beb0314 Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().
2007-02-16 17:23:53 +00:00
pooka ddd5ed5765 Check against root node cookie when fetching a new vnode and invoke
VFS_ROOT() if the cookies match.  Without this fix, if the root
vnode was reclaimed, doing lookups for dotdot from the root vnode
was possible.  In practice this occured only through getcwd.
2007-02-16 16:37:55 +00:00
pooka cd12688f17 Sanity-check linklen returned from file server in READLINK. 2007-02-15 19:50:54 +00:00
ad f918a311cb Fix error in previous. 2007-02-15 16:18:23 +00:00
ad 9abeea588a Replace some uses of lockmgr() / simplelocks. 2007-02-15 15:40:50 +00:00
pooka c1b906f44a Hide the debug prints behind PUFFSDEBUG instead of DEBUG. Make the
latter define the former.
2007-02-15 12:14:34 +00:00
pooka cd66766e1a * in write, do sync pageflush for the ubc case every 64k, otherwise
the user file server can't really keep up and just writing and writing
  may result in kernel memory exhaustion.  this lossage is also partially
  due to the stupid way mtime + size info is handled currently, but that
  should change soon (*knock knock* ;)
* score a few debug printfs
2007-02-10 13:12:43 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
pooka b2668f252f honor B_ASYNC 2007-02-09 08:53:51 +00:00
pooka 95700e9a12 assign value for strategy output parameter b_resid instead of decreasing it 2007-02-09 08:15:41 +00:00
pooka 692448474d If the file server doesn't support write, don't use genfs_null_putpages
for putpages, as it assumes a vnode doesn't have any pages.  For
mounts using the page cache this is simply not true.  Rather,
prevent opening a regular file in write-mode.  That way a vnode
can never have dirty pages which would need to be flushed (i.e.
written).
2007-02-08 22:55:06 +00:00
pooka 82b88def96 chuq shone arcane wisdom on me: b_bcount comes in, b_resid goes out 2007-02-08 05:09:25 +00:00
pooka b7a2d4ecbb Don't block and wait for file server response in case strategy is
run in pagedaemon context: it gives the file server way more control
over the fate of the entire kernel than what we're comfortable with.
2007-02-08 04:52:23 +00:00
pooka ebfeab6747 Limit errors from puffs_lookup to 0, EJUSTRETURN and ENOENT, as
that's what namei/lookup expects.
2007-02-06 01:53:11 +00:00
chs 0507747213 more fixes for the new vnode locking scheme:
- don't use SAVESTART in calls to relookup() from unionfs,
   just vref() the desired vnode when we need to.
 - fix locking and refcounting in the unionfs EEXIST error cases.
 - release any vnode locks before calling VFS_ROOT(), vfs_busy() is enough.
   this allows us to simplify union_root() and fix PR 3006.
 - union_lock() doesn't handle shared lock requests correctly,
   so convert them to exclusive instead.  fixes PR 34775.
 - in relookup(), avoid reusing "dp" for different purposes,
   the error handling wasn't right.  (actually just get rid of dp.)
   also, change relookup() to ignore LOCKLEAF and always return the
   vnode locked since the callers already expect this.
2007-02-04 15:03:20 +00:00
pooka 3f280a11a4 fstrans owner automatically gets a normal lock, don't need to lazy lock
pointed out by hannken
2007-02-03 16:29:05 +00:00
hannken 4d607243ba Change fstrans enum types to upper case.
No functional change.

From Antti Kantee <pooka@netbsd.org>
2007-01-29 15:42:50 +00:00
hubertf eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
pooka 842f8f2a8a don't need pi_lock for struct member access, so don't take it 2007-01-28 00:27:33 +00:00
cbiere b70ba117e6 * Added missing cast in isonum_712().
* Added const-qualifiers.
 * Removed unnecessary duplicate prototypes.
 * Use the endian conversion functions from <sys/endian.h>.
2007-01-27 07:20:31 +00:00
cbiere 0108d79ceb Use the endian conversion functions from sys/endian.h. 2007-01-27 07:18:10 +00:00
pooka 0eaa3c5c67 We don't handle fsync in checkop anymore, so direct the fifoop fsync
also to a place less panicy, namely fifo_fsync (because currently the
metadata information is update when the node is changed.  This will
probably change soon, though).
2007-01-26 23:25:56 +00:00
pooka d2595d03c5 Initial attempt at suspend/snapshot support for userspace file
servers.  This is still pretty much on the level "if it breaks ...".
It should work for single-threaded servers which handle one operation
from start to finish in one go.  Also, it does not yet totally
correctly synchronize metadata and data in some cases.  So needless
to say, it needs improvement, but it is possible that will have to
wait for some lock revampage.
2007-01-26 22:59:49 +00:00
pooka 61ffb7330d if strategy fails, set bp->b_error and B_ERROR 2007-01-25 23:43:57 +00:00
pooka 2dcf5f359a don't hold spinlocks (except vnode interlock) when doing vget() 2007-01-25 17:43:56 +00:00
pooka 7fa4b7d96a fix comment (no functional change) 2007-01-23 18:27:50 +00:00
reinoud be6d76ac92 Fix typo
-                * assoicated with this mount point, start over.
+                * associated with this mount point, start over.
2007-01-22 16:07:33 +00:00
pooka 2874c0e4be optimize a bit: don't flush pages for vnodes which have no references
in the kernel or links in the backend
2007-01-21 16:29:31 +00:00
pooka 092746dfb6 remove diagnostic printf 2007-01-21 14:52:20 +00:00
christos 6b98a17401 - If the filesystem lives on a wedge, then we try to get wedge information
since DIOCGPART is going to fail. Unfortunately there is no way to get the
  geometry information we need from the wedge; it would be nice for wedges
  to support a geometry ioctl. The values we cannot retrieve are marked with
  XXX.
- Add a lot more debugging.
2007-01-20 23:34:09 +00:00
christos 226df6aaef only change atime on access. 2007-01-19 20:10:36 +00:00
pooka 7f8363fa95 hannken noted that the latest gcc (?) complains about uninitialized
variable use in puffs_strategy() for "dowritefaf" (incorrectly)
and "error" (correctly, although the function is practically of
type void)
2007-01-19 17:52:01 +00:00
pooka b2a7b240df In case the fs server is in the kernel doing an operation on a
completely different file system, we still might re-enter the same
puffs fs in case we execute something on the other file system,
which wants to get a new vnode and ends up recycling a puffs vnode
for the purpose.  In this case the fs server will sleep in the
kernel until it itself handles the operation .... which of course
is a slightly unlikely event.

After analyzing the path from getcleanvnode() to the vnode cemetary,
identify that fsync and putpages (strategy) are the ones in danger
of striking a deadlock deal.  Abuse the vnode flag VXLOCK to tell
them "this vnode is irreversably going to meet its maker, don't
care about user server return values" (failure is not acceptable
down the vgonel() path) and issue the respective operations as
Fire-And-Forget (FAF) operations.  no wait -> no deadlock.

This of course is a "fix" skating on thin ice.  A better, more
generic solution is already in sight, but will take more effort to
implement.
2007-01-19 14:59:50 +00:00
hannken 1b9c6382e3 New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).
2007-01-19 14:49:08 +00:00
pooka 2a1cb9e956 debug print requests going into the queue 2007-01-19 13:01:15 +00:00
reinoud a6abe0260b Fix important directory lookup bug that could result in an endless loop. It
fixes the case where a directory lookup is done in a directory has never
been visted/listed; the search optimalisation that searches the directory
from where it left behind the last time would never reach the initial
offset of zero since it would always have at least processed one entry.
2007-01-17 13:02:44 +00:00
reinoud 3c9b632bb2 Use the generic clock_ymdhms_to_secs() instead of home-brewn version to
translate UDF timestamps to timespec.
2007-01-17 12:49:01 +00:00
pooka fb784fec83 g/c revoke msg structure 2007-01-16 22:38:19 +00:00
pooka acd0be5c12 * don't wait for the answer of VOP_RECLAIM, just fire-and-forget
* revoke puffs_revoke.  we can deal with it just by calling genfs_revoke
2007-01-16 21:58:49 +00:00
pooka 84906bc20f Store puffs_node's on lists hashed with the cookie value instead
of just one flat list.
2007-01-15 23:29:08 +00:00
pooka a18a275954 * do not accept the directory cookie as the result of a lookup (otherwise
we'd be locking against ourselves)
* do not accept duplicate cookies when creating new nodes
2007-01-15 20:40:29 +00:00
pooka 5b381d2cab Since fsync is really putpages + fsync, check for both separately
instead of using just putpages to decide the op's faith.

And the real beef in this commit is of course a tyop fix in a comment.
2007-01-11 16:08:58 +00:00
pooka a96ba7013e In vfs_sync(), call VOP_PUTPAGES() for dirty vnodes directly instead
of rolling around VOP_FSYNC().  The user server will be given the
VFS_SYNC instruction and it can do its own equivalent of VOP_FSYNC()
if it pleases, no need for the kernel to explicitly issue #{vnodes}
FSYNCs.
2007-01-09 23:10:23 +00:00
pooka 5959243a1b comment out flushmulti for now, it's not done and kdump will complain
as mjf noted
2007-01-09 21:59:05 +00:00
pooka 8d142a9d0c Introduce flush operations, which the fs server can use to control
kernel caching.  Currently supported are only flushing the name
cache for a directory or flushing the name cache for the entire fs.

Also, get rid of PNODE_INACTIVE status, since it was racy and
essentially didn't work.  All this on top of being useless in the
first place ....
2007-01-09 18:14:31 +00:00
pooka a0fc370456 in vfs_sync flush page cache only for vnodes with dirty pages, not for
vnodes with pages (dirty or otherwise)
2007-01-09 18:01:05 +00:00
pooka 7ed9318946 vfs sync, flushes regular file data only (user server can take care of
flushing any metadata it might have hidden away)
2007-01-07 19:28:48 +00:00
pooka 8456438f43 getcwd wants eofflag - set eofflag in readdir if amount of data is 0 2007-01-07 00:53:13 +00:00
elad 1e70d64818 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 16:55:29 +00:00
elad faad322a82 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 15:42:37 +00:00
reinoud f77d911f26 Forgot one place for UDF_ICB_FILETYPE_RANDOMACCESS. 2007-01-04 04:18:00 +00:00
reinoud 1d48d18121 Add UDF_ICB_FILETYPE_REALTIME type as found on UDF 2.50 discs. Also revert
a multiplication order to enforce 64 bit math.
2007-01-04 04:15:43 +00:00
reinoud 636b044677 Fix compilation issue when specifying different flags or compiling with a
different compiler. Thanks to Jared for noting.
2007-01-04 02:42:19 +00:00
reinoud e54e795b0d Implement read-only access to UDF 2.50 and UDF 2.60 discs that use metadata
partition mappings. This brings the NetBSD implementation to read all discs
upto date and will read all discs currently defined by OSTA.
2007-01-04 02:02:40 +00:00
pooka b613212772 * check userspace version and prevent incompatible mount
* some general maintenance
2007-01-02 15:51:21 +00:00
elad d4e1860d1a Add KAUTH_SYSTEM_CHSYSFLAGS so we can get rid of the last three
securelevel references (ufs, ext2fs, tmpfs).

Intentionally undocumented.
2007-01-02 11:18:56 +00:00
pooka 4f931d80b2 * fix locking gotchas when trying to unlink "."
* return standard EPERM when trying to unlink a directory
* reorder some checks in rmdir avoid problems if trying to rmdir ".."

jmmv ok
2007-01-02 11:02:19 +00:00
pooka 4040720335 In rename, tdvp == tvp holds if we are renaming a directory to "."
(XXX: for all the sense that makes).  Deal with it gracefully here
for now.
2007-01-02 00:14:15 +00:00