Commit Graph

352 Commits

Author SHA1 Message Date
riz 9f6ad5fff1 Swap the order of the tf_gen and tf_id members of struct tmpfs_fid,
since tf_id needs 8-byte alignment on some architectures (like amd64).
struct tmpfs_fid now fits in 16 bytes on amd64 again.
OK matt@
2006-03-31 20:27:49 +00:00
martin 625f1bbe61 Restrict generation numbers to 32bit values - we would have had to bump
_VFS_MAXFIDSZ to 24 otherwise for 64bit archs.
2006-03-26 20:18:58 +00:00
christos f8912e4424 PR/32986: Kouichirou Hiratsuka: Don't proceed with unmounting the filesystem
if vflush failed. Thank to Jeff Ito for adopting a similar fix from FreeBSD.
2006-03-20 19:54:15 +00:00
christos 5a57baa413 don't use MALLOC with a non-constant size; use malloc instead. 2006-03-17 23:29:07 +00:00
christos bd047b110f remove trailing newlines 2006-03-05 16:55:44 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
thorpej 58853410ae Use device_class() instead of accessing dv_class directly. 2006-02-21 04:32:38 +00:00
christos 61315901b1 PR/31850: Geoff Wing: tmpfs does not honor sticky directories. 2006-02-21 03:19:45 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
jmmv 064fbe7e18 Do not use unnamed structures/unions without instances; they break the
build under vax because of gcc 2.95.  Found by he@.
2006-02-16 14:57:50 +00:00
christos 6547cf74f3 make the include files usable from userland. 2006-02-10 16:00:02 +00:00
reinoud 979954f179 VND and harddiscs have their own defect free space management. 2006-02-04 23:21:43 +00:00
reinoud 8c7d758cbc Change a comment into a TODO and fix up case where we could return an
illegal allready-freed memory space.
2006-02-04 21:29:11 +00:00
christos d3ef798d46 protect the whole file, not parts of it. 2006-02-02 21:58:40 +00:00
reinoud 6ee0cb5d5d Replace reinclude protection names with less generic versions. 2006-02-02 16:14:26 +00:00
reinoud 73bc73c9ad De __P() prototypes. 2006-02-02 15:57:35 +00:00
reinoud 14ab2cc9e6 Fix header re-inclusion protection defines to a less generic naming
scheme.
2006-02-02 15:52:23 +00:00
reinoud aba87fd86c Fix $NetBSD$ tags. (sorry) 2006-02-02 15:38:35 +00:00
reinoud 09457a8a6e Initial import of a UDF file system implementation for NetBSD.
Finally the logic glue and the set distribution lists modifications.
2006-02-02 15:26:32 +00:00
reinoud cff5e7ad2c Initial import of a UDF file system implementation for NetBSD.
The code supports read access to all media types that CD/DVD type drives
can recognize including DVD-RAM and BD- drives as well as harddisc partions
and vnd devices. UDF versions upto the latest 2.60 are to be supported
though due to lack of test media version 2.50 and 2.60 are not implemented
yet though easy to add. Both open and closed media are supported.

Write access is planned and in preparation. To facilitate this some hooks
are present in the code that are not strictly needed in a read-only
implementation but which allow writing to be added more easily.

Implemented and tested media types are CD-ROM, CD-R, CD-RW, CD-MRW,
DVD-ROM, DVD*R, DVD*RW, DVD+MRW but the same code can also read DVD-RAM,
HD-DVD and BluRay discs. Also vnd devices have been tested with several
sector sizes.

Discs created and written by UDFclient, Nero's InCD and Roxio's
DirectCD/Drag2Disc read fine.
2006-02-02 15:19:15 +00:00
jmmv 1aa1083c54 Cut a too long line introduced during the conversion to lwps. 2006-01-26 20:07:34 +00:00
tsutsui 7a10e95ea9 free() -> dealloc() for _STANDALONE. 2006-01-26 16:27:43 +00:00
christos 9c6e6ff8b2 Protect against uio_lwp being NULL from Pavel Cahyna 2006-01-14 23:49:59 +00:00
yamt 403fb83166 smbfs: use curlwp rather than uio->uio_lwp.
the latter is a garbage in the case of UIO_SYSSPACE.
PR/32499 from Juan RP.
2006-01-12 13:36:17 +00:00
wrstuden 160f564c51 Change union_unmount() to not play with the fs root vnode explicitly.
Let it get recycled along with all of the others. This is important
as if the root vnode has already been reclaimed, then we get a panic
when we try to vget it.

This addresses PR: kern/31382
2006-01-05 20:31:33 +00:00
tsutsui 1f5055228d Add preliminary support for System V Boot File System.
Written by UCHIYAMA Yasushi <uch@netbsd>.
2005-12-29 14:53:45 +00:00
chs 0545b6e0cb changes for making DIAGNOSTIC not change the kernel ABI:
- for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.
2005-12-27 04:06:45 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
jmmv f37f56be99 Remove a conditional by always using inlined functions in favour of macros.
This way, the code is clearer and there shouldn't be any performance
difference (if the compiler DTRT).  Suggested by chs@.
2005-12-24 12:31:57 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt 1fa8bcda47 VFS_TO_TMPFS: remove a wrong assertion.
it's wrong because TMPFS_PAGES_MAX can be decreased.
2005-12-06 21:46:34 +00:00
christos aa1c65555d protect against multiple inclusion instead of forbidding their access from
userland, and #ifdef _KERNEL all their kernel functions.
2005-12-03 22:16:16 +00:00
christos 4bffed72de - protect userland exported files against multiple inclusion.
- make sure that kernel only files don't compile in userland using #error
- XXX: some kernel only files still get installed.
- XXX: some files used in userland, don't get installed.
2005-12-03 17:34:43 +00:00
yamt 221616873d merge yamt-readahead branch. 2005-11-29 22:52:02 +00:00
dan 3a01b7a8ba take into account memory used for file cache pages, and wired pages,
when calculating potential free space
2005-11-28 22:28:36 +00:00
dan cbba09ed4d simplify calculation of free swap space using uvm-exported statistics,
with thanks to yamt@ for useful hints.
2005-11-28 22:06:20 +00:00
yamt 6a17dd42f4 - ignore truncation for VCHR/VBLK/VFIFO as it used to be
before yamt-vop merge.  PR/32049 from Atsushi Onoe.
- reject setattr which attempts to change size of VLNK/VSOCK.
2005-11-11 15:50:57 +00:00
yamt 807ce4c6fc tmpfs_reg_resize: drop swap slots on truncation.
fix a problem pointed by jmmv@.
2005-11-08 23:04:03 +00:00
christos fe1de4d6e3 PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
2005-11-04 21:04:20 +00:00
yamt a748ea88dd merge yamt-vop branch. remove following VOPs.
VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE
2005-11-02 12:38:58 +00:00
dyoung ba91bb71cf Bug fix: correct the sense of an if-condition in tmpfs_spec_close:
because VOP_UPDATE() usually succeeded, spec_close() was not usually
called.  Only skip the spec_close() step if VOP_UPDATE() returns
an error result.  Now /dev/watchdog works as expected when /dev/
is a tmpfs; previously, it was impossible to disarm a user-tickled
watchdog.
2005-11-02 05:41:50 +00:00
dyoung b441f8100f Bug fix: change tmpfs_spec_bwrite from tmpfs_bwrite to vn_bwrite,
per yamt's suggestion.  Previously, if /dev/ was mounted on a tmpfs,
block device buffers were never flushed to disk.  Trying to unmount
a dirty filesystem (umount /dev/wd0e, say) caused an endless stream
of vflushbuf warnings, because tmpfs_bwrite was not flushing buffers.
The fix told to me by yamt solves the problem.
2005-11-02 05:39:16 +00:00
christos f229ea7f53 make debugging code compile after 64 bit inode changes. 2005-10-23 04:28:53 +00:00
simonb 30ab8089df Update the mod and access times directly from ptyfs_read() and
ptyfs_write() rather than setting a flag and updating these times
through ptyfs_itimes() at some indeterminate time in the future.
However, just use the "time" variable to set the times instead of
using a potentially expensive call to nanotime().  A HZ resolution
on these timestamps is more than enough.

(Possibly incomplete) fix for PR kern/31430.
OK'd be christos@.
2005-10-12 15:23:33 +00:00
jmmv ab7e099bbc Follow symlinks during lookup (i.e., don't stop too early) so that symlinks
to directories work as expected.  Diagnosed by Greg Oster.
2005-10-03 19:36:42 +00:00
christos 39e9173002 use a counter to prevent from mounting ptyfs twice. Using save_ptm is not
good enough, because if we don't have COMPAT_BSDPTY, then it will stay NULL.
2005-10-01 05:30:12 +00:00
jmmv 38c8dceb4b Explicitly initialize the tn_lockf field. I expect problems in some
situations otherwise...
2005-09-30 14:29:19 +00:00
dyoung 3d52cdeb53 In cd9660_mount, initialize imp to VFSTOISOFS(mp) instead of NULL.
Remove redundant assignments to imp.  This fixes the page fault
panic when the kernel mounts an ISO9660 filesystem, introduced at
revision 1.27.
2005-09-30 08:15:46 +00:00
jmmv b6d141c71c Implement the tmpfs_advlock operation. Makes "user-level" file locking
work (aka lockf(3)).
2005-09-29 19:48:21 +00:00