Commit Graph

517 Commits

Author SHA1 Message Date
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
pooka ab88ea8145 remove r/o mount check done also in vfs lookup() 2007-01-01 23:07:36 +00:00
pooka b4b651b5e3 async update node metadata for spec- and fifoops 2007-01-01 20:16:36 +00:00
pooka 76ac7d114d properly handle VOP_REMOVE case where vp == dvp 2007-01-01 20:14:36 +00:00
pooka 06ebafad63 explicitly disable ioctl and fcntl for now - support has bitrotted 2007-01-01 14:41:21 +00:00
pooka 7983048ec7 * use PUFFS_KFLAG_NOCACHE to also signal that we don't want the namecache
* enter files into the namecache immediately when new nodes are created
  (if it's a caching mount, of course)
2006-12-30 01:29:03 +00:00
elad a220cee1c3 Remove support for immutable and append-only flags on ptyfs. 2006-12-29 18:05:17 +00:00
pooka 99c833023e rename the kernel-provided componentname to puffs_kcn; libpuffs now
provides puffs_cn built on top of it
2006-12-29 15:38:37 +00:00
pooka 73f96ea2e7 Don't allow calls to be queued while MOUNTING. We don't make any
kernel->server calls at that time and it allows a window where
operations use an incorrect root node cookie.

XXX: there's still a (very much smaller and biglock safe) race, but
that's going to be solved by some more thorough restructuring
2006-12-29 01:37:11 +00:00
wiz 3ed1aa9185 Spell "separate" correctly. From Zafer Aydogan. 2006-12-25 18:39:47 +00:00
wiz 19c7b24184 Spell "schedule" correctly. From Zafer Aydogan. 2006-12-25 18:36:05 +00:00
wiz cc67b3a29f Spell "algorithm" correctly. From Zafer Aydogan. 2006-12-25 18:32:16 +00:00
pooka 349f1154dd Don't return EWOULDBLOCK in case we have delivered some requests
even if we are operating on a nonblocking descriptor.
2006-12-10 23:53:51 +00:00
pooka 411590432c * free puffs_instance structure in all cases when closing the descriptor
* comment, rcsid & kassert police
2006-12-10 23:43:55 +00:00
pooka 5d1ddd3277 PCATCH in tsleep while waiting for operations in getop. Otherwise
we could end up in an unkillable deadlock if GETOP was called when
an operation that had locked the root vnode was already in userspace.
2006-12-10 22:37:04 +00:00
pooka 84295069e0 Fix a race condition that would cause the mountpoint to be cleaned
from under someone waiting for the fs server response in puffs_unmount()
if the descriptor was closed during the response wait (such as bug
leading to a crash in fs implementation unmount()).
2006-12-10 22:33:31 +00:00
chs c398ae9734 a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
2006-12-09 16:11:50 +00:00
enami 7edaf87909 The function wget() is always responsible to maintain length of component
not yet compared.  Otherwise pathname lookup fails on certain condition.
2006-12-08 22:04:56 +00:00
pooka 2911d34706 In case of an error, return an error. Otherwise the worst case was
that dostatvfs() wrote to a recently deceased struct mount.
2006-12-07 22:06:02 +00:00
pooka 251d9ef9df let implementation ultimately decide if mmap is supported - pass
VOP_MMAP to fs server
2006-12-07 16:58:39 +00:00
pooka 997d4f41fa shuffle functions around a bit: move the transport (/dev/puffs) to
a different file from the messaging (request contents).  no functional
change
2006-12-05 23:41:24 +00:00
pooka a966070d38 adjust file size in write only if file grows. but since this change is
in the "never use ubc" branch, I don't think it matters except for cosmetics.
2006-12-05 23:07:42 +00:00
pooka 0435bcee31 Allow multiple requests to be transferred in each GET/PUTOP. For
a single request, the performance is still the same.
2006-12-05 23:03:28 +00:00
pooka ca5da47950 prefix kernel flags with PUFFS_KFLAG to have a separate namespace
from the library flags
2006-12-01 12:48:31 +00:00
pooka 74baaf5c7d don't call the fs server for all operations, only those it has told
us that it implements
2006-12-01 12:37:41 +00:00
christos 8c4a6d7ec4 PR/35151: Christian Groessler: file size reported incorrectly for files > 2GB
on a FAT32 file system on a 64bit host
2006-11-30 15:59:23 +00:00
pooka 898c6532b4 don't allow mmap if operating uncached 2006-11-28 13:20:03 +00:00
christos 9f1ff68ee1 fix missing initializer 2006-11-25 17:43:58 +00:00
scw 4f0ca2726e Support FAT filesystems on non-DEV_BSIZE media.
Based on the patches provided in PR kern/17398 by Trevin Beattie.
2006-11-25 12:17:30 +00:00
pooka 99eb16cb3c if we are going to bail due to the mountpoint being gone from under
us while waiting for syncer lock, release the newly acquired syncer
lock prior to bailing
2006-11-21 01:53:33 +00:00
pooka 65cab72c29 cosmetics 2006-11-21 01:51:42 +00:00
pooka c3f1058e4f Actually, for NOCACHE, use direct read/write instead of going through
page cache at all and invalidating.  XXX: mmap
2006-11-18 22:45:39 +00:00
pooka e1444e745f Always override f_iosize from stat() to DEV_BSIZE for now. Places such
as vnd use the information, so until "dealing with it" is defined, it's
overriden by the kernel.
2006-11-18 19:46:32 +00:00
pooka a1485f3144 make puffs_strategy more robust 2006-11-18 19:33:02 +00:00
pooka 61a717befb prevent value 0 for mnt_stat.f_iosize, it is sometimes used as a divider 2006-11-18 12:50:59 +00:00
pooka 0eca4b2eaa Require statvfs info from startreq so that we have that info available.
Also, don't pass fsid to userspace and just fill it in the kernel.
2006-11-18 12:39:48 +00:00
pooka dfa114e254 As a first generation best-effort hack, use NOCACHE to mean "file
size can change without the kernel knowing" and therefore query
the file size before invoking read or write operations.
2006-11-18 08:18:24 +00:00
pooka e5e4a4f6bc Introduce uncached operation, makes sense when the file system backend
can be modified from elsewhere than the file system interface
2006-11-17 17:48:02 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
pooka 2293b63a7e Fix a race condition with unmount where the mountpoint might disappear
from under us while waiting for syncer_lock and before we got to vfs_busy.
This happens easily e.g. when the userspace server loses its will to
live in VOP_RECLAIM, which is called from vflush() in VFS_UNMOUNT.  We
get two competing unmounters.  When the first one finishes, it releases
syncer_lock.  Now the second one tries to vfs_busy(), but is greeted
with garbage in *mp.

XXX: Technically this is a more general issue and should be fixed
elsewhere, but it's hard to trigger it with normal file systems
unless they are unmounted "simultaneously" twice and are dirty
enough for flushing to take a while.  So make a note about it in
the little black book next to the poems and postpone the crusade
for now.
2006-11-14 19:36:50 +00:00
pooka 93a5732221 No need to return a special value for CREATE/RENAME lookup, so just
handle ENOENT.  If there's a real error, userspace will return
something else.
2006-11-13 20:57:56 +00:00