Commit Graph

17 Commits

Author SHA1 Message Date
jmmv 862d1d4e18 There is no need to check for the resulting value of a strto*l call after
ERANGE has been raised.  Just remove the extra checks, which were incorrect
anyway in almost all calls because they did not match their corresponding
strto*l function.

This caused mount_tmpfs to not catch some error cases in, e.g., i386, as
strtoll was returning LLONG_MAX instead of LONG_MAX, which are different
in this platform (but not on 64-bit ones).

Problem found by martin@; thanks!
2006-03-26 16:15:15 +00:00
christos 7067dcb9a4 Always check the results of getmntopts() and free them. 2006-03-21 21:11:41 +00:00
christos 3d8d9aa461 define __POOL_EXPOSE. 2006-02-11 05:49:48 +00:00
jmmv ff68701afc Point to the share/examples/fstab/fstab.ramdisk file for some more information. 2005-12-24 13:02:53 +00:00
jmmv ea3755726f Do not use stdbool.h; it breaks the build on ports using gcc 2.x (such as
vax).  Ew.  Pointed out by he@.
2005-09-30 14:25:07 +00:00
jmmv 34afcb6a5d Add an EXAMPLES section. Requested by martti@ to clarify the purpose of
the field before the mount point.
2005-09-29 20:54:23 +00:00
jmmv a42b78b9cc Handle overflow errors in dehumanize_number. Noticed by chs@. 2005-09-26 09:49:22 +00:00
jmmv dee202322b Implement the getargs option. I knew the code in the kernel had to be of
some use...
2005-09-25 19:04:49 +00:00
jmmv ff29f0196f Fix some type mismatch issues (gid_t and uid_t are unsigned); pointed out
by chs@.
2005-09-25 18:55:51 +00:00
jmmv 63fb4d1c52 Kill reference to tmpfs(9). Noticed by "pancake". 2005-09-25 18:27:30 +00:00
jmmv 25d775ba47 Change two variables from size_t to long as they are used with long
values (strtol).  Silences a warning from lint.
2005-09-25 08:15:30 +00:00
jmmv c23e2abdd5 Ignore case of trailing unit specifiers in size measures to remove confusion. 2005-09-25 08:11:50 +00:00
jmmv 847bd3696d Inherit owner, group and mode of the mount directory so that mounting a
tmpfs over, e.g., /tmp, is trivial.
2005-09-25 08:08:12 +00:00
jmmv b0085cab71 Kill the tmpfs(9) manual page; it was just documenting internal details of
tmpfs' "API" and was already rotting.

Instead, merge all the relevant comments into the code.  This includes
acknowledgements to Google's Summer of Code 2005 program (they were in the
AUTHORS section of tmpfs(9) before), so all the files need to be changed
to include this sentence alongside the title.  (Note that this was not a
requirement of the program.)
2005-09-23 15:36:15 +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
jmmv 8e0a777ab1 wiz@ remembers that the preferred way to spell file-system in NetBSD is
file system.
2005-09-10 22:28:57 +00:00
jmmv ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00