Commit Graph

1183 Commits

Author SHA1 Message Date
yamt baee927713 introduce "ufs_ops" and use it for ITIMES. 2005-09-27 06:48:55 +00:00
yamt 050407b699 change um_maxfilesize to unsigned as its on-disk counterpart is. 2005-09-27 06:48:16 +00:00
yamt d3a07546a6 revert ffs_snapshot.c 1.20 because it's bogus. pointed by Simon Burge. 2005-09-26 14:10:32 +00:00
yamt 6138b82a56 always use nanotime rather than time.
it's bad to mix nanotime and time because it sometimes
make timestamps go backwards.
2005-09-26 13:52:20 +00:00
jmmv 9ba32cead7 Follow compat naming tradition: rename compat_export_args to export_args30. 2005-09-25 21:17:05 +00:00
jmmv 2a3e5eeb7c Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
2005-09-23 12:10:31 +00:00
rpaulo 3c4f143c6e Fix bogus if-clause introduced in previous revision. 2005-09-22 14:04:29 +00:00
rpaulo a12bed5a16 In ffs_unmount(), detect EOPNOTSUPP errno returned from
ufs_extattr_stop().

From FreeBSD.
2005-09-22 13:50:55 +00:00
rpaulo 1b8fb7a81f In ufs_extattr_stop(), if we haven't started yet, errno must be set
before bailing out.

From FreeBSD.
2005-09-22 13:49:03 +00:00
yamt 6dadccf7c5 ufs_balloc_range: correct range to clear PG_RDONLY.
fix a panic in ubc_fault.
2005-09-14 10:33:25 +00:00
christos ebc4ea57cf redefine panic if we are a user program. 2005-09-13 04:40:42 +00:00
christos 3544d898ac split out lfs_itimes(). It is used in fsck_lfs. 2005-09-13 04:13:25 +00:00
christos 49840169c0 Add another KASSERT. 2005-09-12 20:26:44 +00:00
christos c93a283e5f - access the ffs and ext2fs itimes functions through a pointer, so that
if the filesystem is not compiled in the kernel still links. Probably
  a better solution is to use weak symbols.
- move the filesystem-specific itime macros to the filesystem header files.
2005-09-12 20:23:03 +00:00
christos 30b59dc1e8 Add a KASSERT like the one ffs has. 2005-09-12 20:21:18 +00:00
drochner 9cde940a73 move the new ffs_itimes() to a berr place -- ffs_subr.c is shared with
userland
2005-09-12 20:09:59 +00:00
christos a12024da06 Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.
2005-09-12 16:24:41 +00:00
rpaulo ffd7544c80 Add missing '$' in __RCSID(). 2005-09-12 16:10:11 +00:00
rpaulo f2b738e568 In ufs_extattr_start(), unlock uepm_lock when bailing out.
Ok'd Jason Thorpe.
2005-09-12 16:09:06 +00:00
yamt d8798fec66 - for pagecache dependency, track which page in the block
has been written or not individually by (ab)using b_resid
  in pcbp as a bitmap.
- add a comment to explain why it's needed.

PR/15364.  reviewed by Chuck Silvers.
2005-09-09 15:04:07 +00:00
yamt 5b4c989faf revert the code to expand putpage requests to block boundary.
because:
	- it was incomplete in some cases.
	- it can confuse pagedaemon.
see PR/15364 for details.
2005-09-09 15:00:39 +00:00
xtraeme 23ebf62d26 * Remove __P()
* Use ANSI function declarations on ext2fs and mfs
2005-08-30 22:01:12 +00:00
thorpej e1afed9c2d Experimental support for extended attributes on UFS1 file systems, using a
backing file per attribute type indexed by inode number to hold the extended
attributes.

This is working pretty well on my test systems, except for the "autostart"
feature.  I need someone with a better handle on the VFS locking protocol
to go over that.

This is a work-in-progress.  There are parts of this that could be re-factored
allowing this approach to be used on other types of file systems.

Adapted from FreeBSD.
2005-08-28 19:37:58 +00:00
yamt 4c32aa5945 PRId64 -> ld in UVMHIST_LOG format strings. 2005-08-24 10:19:43 +00:00
yamt d5c3f1e190 ufs_readdir: don't leak kernel garbage to userland. 2005-08-23 12:27:47 +00:00
yamt 3f2c6f0661 ufs_readdir: when computing the maximum number of entries,
use _DIRENT_RECLEN(cdp, 1) instead of "4".
2005-08-23 12:27:16 +00:00
christos 0b0eb1328b Don't overload MAXNAMLEN, use a separate constant for each filesystem type. 2005-08-23 08:05:13 +00:00
yamt 84c9e5bbc1 whitespace. 2005-08-22 09:08:17 +00:00
christos b0e192f2b6 change ino_t to u_int32_t for syscall compatibility. 2005-08-22 08:53:03 +00:00
christos 23e602002f now that we've changed the _DIRENT_ALIGN macro, provide a d_fileno for struct
direct
2005-08-19 05:28:48 +00:00
christos 50f8955b6e 64 bit inode changes. 2005-08-19 02:04:03 +00:00
jmmv 38501db2ff Drop extra word from comment. 2005-08-12 22:31:51 +00:00
christos bce5269120 Move extern kernel variable declarations, into a _KERNEL protected session
so that the don't pollute userland's namespace.
2005-07-31 20:18:32 +00:00
yamt 946832fd33 revert VCHR part of ffs_vnops.c 1.71.
as VCHR uses the device pager, no point to call VOP_PUTPAGES here.
pointed by Chuck Silvers.
2005-07-26 12:14:46 +00:00
drochner e32ba1775e fix crash in mount error handling: don't free storage which was not
malloc'd
2005-07-25 11:42:38 +00:00
yamt b7bfe82866 update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.
2005-07-23 12:18:41 +00:00
yamt 6afb995fea ffs_full_fsync: because VBLK/VCHR can be mmap'ed,
do VOP_PUTPAGES for them as well.
2005-07-21 22:00:08 +00:00
yamt 2a6dc9d02d - introduce PGO_NOBLOCKALLOC and use it for ubc mapping
to prevent unnecessary block allocations in the case that
  page size > block size.

- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
  VM_PROT_READ.
2005-07-17 09:13:35 +00:00
thorpej 29af9583d2 Use ANSI function decls. 2005-07-15 05:01:16 +00:00
thorpej 4457fd076f Defflag UFS_DIRHASH. 2005-07-10 01:08:52 +00:00
thorpej 175c3312a8 - Use ANSI function decls.
- Sprinkle some static.
2005-07-10 00:18:52 +00:00
kml dab4c6d721 Ensure that we change the size of the vnode at the same time as
we change the size of the inode, and use ext2fs_size uniformly.
This fixes a crash that occurs when I create a directory, then
move it, all on an ext2 filesystem.
2005-06-28 16:53:14 +00:00
yamt 44d128fa8e - constify genfs_ops.
- use member designators.
2005-06-28 09:30:37 +00:00
atatat df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
atatat 420d91208b Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
code.  I know it's not the prettiest code, but it seems to work rather
well in spite of itself.
2005-06-09 02:19:59 +00:00
dbj 7753d41b8e remove (long) cast on bpref, which is daddr_t 2005-06-06 17:10:25 +00:00
dbj 331e001f0c the cluster summary must be swapped even for ufs2 2005-06-03 01:14:07 +00:00
is 4daeda666d fix copy/paste/don'tupdate bug (fix from PR 22232 by Robert Elz). 2005-06-02 10:08:36 +00:00
christos c76e17575e s/buf/sbuf. 2005-05-31 02:37:50 +00:00
christos 07d1f24ff5 rename delay because it is a function on sparc. 2005-05-30 22:13:22 +00:00