Commit Graph

185 Commits

Author SHA1 Message Date
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
fvdl
e8d05f0741 Import 4.4BSD-Lite2 1998-03-01 02:12:49 +00:00
fvdl
b50e39fa45 Import 4.4BSD-Lite for reference 1998-03-01 02:09:33 +00:00
thorpej
95e2e3b91b Include the LFS option header. 1998-02-19 00:54:39 +00:00
drochner
ba81b6f6df add missing vfsops element 1998-02-18 17:02:20 +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
kleink
e34b0a84a9 Move some permission-checking code for file owner/group changes up to
vfs_syscalls.c::change_owner().  Also, always update the inode's change time
if the operation succeeds.
1998-02-14 19:56:30 +00:00
mrg
d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00
chs
abf50cf8c3 add UVM stuff. 1998-02-07 17:28:18 +00:00
chs
f64abc7b4c add flags arg to hashinit(), to pass to malloc(). 1998-02-07 02:44:44 +00:00
mrg
1a8c7604f4 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)
1998-02-05 07:59:28 +00:00
thorpej
df7ad322f2 Nuke spurious semicolon, from Konrad Schroder <perseant@hhhh.org>. 1998-01-13 03:30:39 +00:00
bouyer
459fd0e350 When allocating an inode with dtime set, also bzero e2di_blocks[]. 1997-10-27 14:43:41 +00:00
bouyer
89f2b833f4 Uses ext2fs_vinit not ufs_vinit.
In ext2fs, an inode is deleted either when mode == 0 or dtime != 0. If
  dtime != 0, reset others fields before using the inode, or we could end
  up with the wrong v_op in ext2fs_vinit.
While I'm there, kill a unused variable in ext2fs_readwrite
1997-10-23 11:41:16 +00:00
christos
e12c721705 Add missing cast for nlink_t 1997-10-17 02:05:34 +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
enami
499f056402 Backout last change for ufs_readlink. The permission check is now done
in vfs layer.
1997-10-11 00:10:57 +00:00
bouyer
f5d86626ec Update for 64 bits directory cookies. 1997-10-10 10:00:12 +00:00
fvdl
6a0575f33e Last arg to VOP_READDIR became off_t. 1997-10-10 02:13:42 +00:00
bouyer
6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
enami
164890a9fc In the function ufs_readlink(), check read permission before
reading link.
1997-10-03 16:45:49 +00:00
lukem
319d918511 prototype lfs_cksum ifndef KERNEL 1997-09-15 06:44:48 +00:00
bouyer
09cf6dacdf Fix bad cut&paste from ufs code: we can't align uio_resid to a directory
block size boundary, because size of the returned dir entry may be bigger than
the one read.
1997-08-04 09:11:00 +00:00
bouyer
3bf1a6ad00 ufs_getlbns needs an array of NIADDR+1 struct indir's, and not NIADDR.
This fixes a panic due to stack corruption when reading larges files.
1997-07-24 17:18:03 +00:00
fvdl
e351013e56 Fix messed up RCS Id. 1997-07-22 14:36:31 +00:00
fvdl
f2377e977b When allocating a new block, store the result obtained through counting
indirect blocks in a 64 bit integer, to prevent overflows when computing
NINDIR^3
1997-07-17 23:40:07 +00:00
bouyer
1d5e0e6e91 Add a lock locking around inode hashing. 1997-07-17 16:56:44 +00:00
fvdl
286a3374b9 Give the hash lock a better name, it's not just ffs that uses it. 1997-07-15 19:08:18 +00:00
fvdl
5d96e77ef6 Get locking around inode hashing right. 1997-07-07 23:37:36 +00:00
fvdl
acffafa288 Oops, I messed up the lock. Reverting it until I have time to fix it,
to avoid people getting trouble after the supscan hits.
1997-07-07 11:47:06 +00:00
fvdl
b362aa16be Put lock around inode hashing, because getnewvnode or MALLOC might block,
creating race conditions.
1997-07-06 12:43:43 +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
bouyer
77d5755416 Sync with ufs/ufs:
Avoid panic triggered by rename("foo/", "bar/..") (From Mycroft, via christos)
1997-07-01 07:34:03 +00:00
fvdl
9b30a6a4e5 Return EPERM for an attempt to remove a directory with VOP_REMOVE, not EISDIR. 1997-06-30 20:16:31 +00:00
fvdl
822371a987 Return EPERM, not EISDIR for an attempt to remove a directory. 1997-06-30 20:13:44 +00:00
christos
b59135a6fb Avoid panic triggered by rename("foo/", "bar/..") (From Mycroft) 1997-06-26 22:23:17 +00:00
pk
2e8a55e122 TIMESPEC_TO_TIMEVAL => TIMEVAL_TO_TIMESPEC 1997-06-13 08:59:51 +00:00
mrg
295af85e9e remove swap configuration. 1997-06-12 17:12:17 +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
bouyer
9e3c291da4 The ext2fs layer, based on the ffs/ufs one. Uses a few functions from
sys/ufs/ufs/
1997-06-11 09:33:37 +00:00
kleink
9c03d5cf55 When doing a CREATE, RENAME or DELETE w/ DOWHITEOUT and ISWHITEOUT lookup on a
non-existent file and the end of the pathname is reached, and this `current'
directory resides on a read-only mounted file system, don't update/prepare
its inode for the actual operation but return EROFS.
1997-05-12 19:04:16 +00:00
mycroft
e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft
837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
mikel
55f53d7fdb return EPERM from ufs_setattr() if an attempt is made by non-superuser
to change superuser-only file flags; fixes PR kern/3491.
1997-04-23 05:47:54 +00:00
kleink
9c16cd8a46 Implement a POSIX compliant genfs VOP_SEEK() and use it in the appropriate
places; by Chris G. Demetriou and myself.
1997-04-11 21:52:00 +00:00
kleink
2cfcc6c893 Return immediately upon zero byte reads, as updating st_atime in this case
violates POSIX.1 read() semantics.
1997-04-04 14:21:32 +00:00
mikel
b81091e992 POSIX.1 specifies that a failed link() to a directory must return EPERM,
and EMLINK was not documented; from Klaus Klein in PR standards/3397.
Also documented EOPNOTSUPP for filesystems that don't support hard links.
1997-03-27 07:30:25 +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
fvdl
8b21bbed9b Implement similar fix as in the NQNFS fix from BSDI, to avoid race conditions
when unmounting. It cleans up the loop a bit too.
1997-02-22 03:25:05 +00:00
thorpej
727078d31e - Add ffs_mountroot to ffs_vfsops.
- Only attempt to mount a root FFS on a DV_DISK class device.
1997-01-31 03:05:31 +00:00