Commit Graph

104 Commits

Author SHA1 Message Date
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
kleink d4a8052f98 Fix some arithmetics lossage on typeless pointers. 1998-05-08 18:31:13 +00:00
bouyer 091dafd39f Add support for reading/writing FFS in non-native byte order, conditioned
to "options FFS_EI". The superblock and inodes (without blk addr) are
byteswapped at disk read/write time, other metadatas are byteswapped
when used (as they are acceeded directly in the buffer cache).
This required the addition of a "um_flags" field to struct ufsmount.
ffs_bswap.c contains superblock and inode byteswap routines also used
by userland utilities.
1998-03-18 15:57:26 +00:00
drochner 22dbd3c3da Don't cast the quad_t file size to u_long, this can cause overflows. 1998-03-03 09:02:51 +00:00
fvdl 221505c12f Make this compile again with UVM 1998-03-03 01:49:21 +00:00
fvdl d201db498e Remove accidentally enabled lfs_mountroot from vfsops struct. 1998-03-01 22:16:39 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej 95e2e3b91b Include the LFS option header. 1998-02-19 00:54:39 +00:00
thorpej b5bf2ed6d0 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
chs abf50cf8c3 add UVM stuff. 1998-02-07 17:28:18 +00:00
thorpej df7ad322f2 Nuke spurious semicolon, from Konrad Schroder <perseant@hhhh.org>. 1998-01-13 03:30:39 +00:00
mjacob 949982f2a4 In calculating the f_bavail field, don't take 32 bit quantities and
multiply them by 90 (to be divided by 100) and expect them to be sane
for very large values (I was getting a negative 'avail' count).
1997-10-16 18:29:11 +00:00
lukem 319d918511 prototype lfs_cksum ifndef KERNEL 1997-09-15 06:44:48 +00:00
drochner 8c0a9bab00 Don't cast 64bit (off_t) file sizes to vm_offset_t (32bit on many
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.
1997-07-04 20:22:09 +00:00
pk 2e8a55e122 TIMESPEC_TO_TIMEVAL => TIMEVAL_TO_TIMESPEC 1997-06-13 08:59:51 +00:00
bouyer 76c414a957 Add support for ext2fs, this needed a few modifications to ufs/ufs/inode.h:
- added an "union inode_ext" to struct inode, for the per-fs extentions.
  For now only ext2fs uses it.
- i_din is now an union:
	union {
		struct  dinode ffs_din; /* 128 bytes of the on-disk dinode. */
		struct ext2fs_dinode e2fs_din; /* 128 bytes of the on-disk dinode. */
	} i_din
  Added a lot of #define i_ffs_* and i_e2fs_* to access the fields.
- Added two macros: FFS_ITIMES and EXT2FS_ITIMES. ITIMES calls the rigth
  macro, depending on the time of the inode. ITIMES is used where necessary,
  FFS_ITIMES and EXT2FS_ITIMES in other places.
1997-06-11 10:09:37 +00:00
mycroft 66c4e32b11 Just increment the generation count. Using the time is bogus and defeats
fsirand(8).
1997-03-10 06:18:28 +00:00
cgd 90688fce27 Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
1996-12-22 10:10:12 +00:00
is ebe1c82eda Make the struct lfs 512 bytes long on 32bit machines whose compiler doesn't
align 32bit integers. Use explicit sized typing at some other places.

XXX This still won't fix lfs for 64bit machines, as we have some
assumptions about sizeof(pointer)=sizeof(u_int32_t) in here, and (if I
looked right) a misaligned u_int64_t. The right fix (to cite cgd) will
be to seperate on-disk-representation from in-core, but I don't have
the time (at the moment) to do this.
1996-12-05 19:01:46 +00:00
cgd f6e4567c57 cast int64_t-sized types to "long long" before printing them with %qd.
gcc thinks that the 'q' modifier describes a "long long", and so -Wformat
whines when printing with 'q' on the alpha, since int64_t-sized types are
done with variations on "long" rather than "long long".
1996-11-15 23:11:56 +00:00
christos 90c7de0919 revert previous kprintf changes 1996-10-12 21:58:44 +00:00
christos de1b2b437e printf -> kprintf, sprintf -> ksprintf 1996-10-10 17:16:17 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft c52352c819 Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.
1996-09-01 23:47:48 +00:00
mycroft 261382c331 Change VOP_UPDATE() semantics:
* Make 2nd and 3rd args timespecs, not timevals.
* Consistently pass a Boolean as the 4th arg (except in LFS).
Also, fix ffs_update() and lfs_update() to actually change the nsec fields.
1996-05-11 18:26:27 +00:00
pk 44af669e3d Appease gcc: unused variables if !QUOTA 1996-03-25 12:53:35 +00:00
christos 48fda0b4ca Fix printf format strings 1996-03-17 02:16:18 +00:00
christos 7e24291099 Protect include in lfs_cksum.c so that it can be used by userland programs. 1996-02-16 02:22:05 +00:00
christos e2c2c98181 di_size is a quad and needs %qu not %lu 1996-02-12 22:08:47 +00:00
christos 11e9f2ce94 Add fwd declaration for struct ucred 1996-02-12 15:20:12 +00:00
christos 7bd9e243f3 lfs prototypes 1996-02-09 22:28:45 +00:00
mycroft 53fccab940 Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.
1996-02-09 14:45:36 +00:00
jtc dd05bd5124 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:04:52 +00:00
thorpej 1955514b6c Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-21 23:39:20 +00:00
cgd 8f62c773e8 don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN 1995-06-18 14:45:14 +00:00
cgd 94b7cf1b85 compensate for timeval/timespec/stat structure changes. 1995-06-15 23:22:41 +00:00
mycroft f75ba16b09 Update to use timer{add,sub}(). 1995-03-21 13:33:34 +00:00
mycroft 2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
cgd ad86c7f247 size for copyinstr should be u_long 1995-03-08 01:51:49 +00:00
mycroft 41f181e0d8 Clean up the code to frob mnt_stat a bit. 1995-01-18 09:44:34 +00:00
mycroft 9843f45605 Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.
1995-01-18 06:19:49 +00:00
mycroft 1b682c968a Add RCS ids where missing. 1994-12-21 20:00:18 +00:00
mycroft b4aa6d3a28 Call foo_statfs() from a common place when mounting. 1994-12-15 19:46:08 +00:00
mycroft a63cb01c7d Sync with CSRG. 1994-12-14 13:03:35 +00:00
mycroft c5b0ae2805 Not ready for part of the previous change yet... 1994-12-13 20:51:56 +00:00
mycroft 527b796ff5 Turn lease_check() into a vnode op, per CSRG. 1994-12-13 20:14:30 +00:00
mycroft b619d35b99 Use __timeradd(), not timevaladd(). 1994-12-11 17:57:15 +00:00
mycroft a4aea8ad25 Round struct lfs to 512 bytes. 1994-11-17 16:58:41 +00:00
cgd f0c1138373 update for new syscall args description mechanism, and deal safely
with wider types.
1994-10-20 04:20:55 +00:00
cgd 2f658e4b73 c syntax 1994-09-20 06:45:17 +00:00
cgd 0bac4d47b1 C syntax fix, and syscall args style (For later.) 1994-08-21 03:15:32 +00:00
cgd fccfa11af5 New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
mycroft d81c1f39c2 This i_flags should be i_flag. 1994-06-16 03:25:40 +00:00
mycroft 264b874c14 Update to 4.4-Lite fs code, with local changes. 1994-06-08 11:41:58 +00:00