bouyer
4787b2ea75
- intentation
...
- sync LK_* flags with ffs/ufs
1998-12-02 10:44:52 +00:00
kenh
cbc0f73bee
Update device special file modification times if NODEVMTIME isn't set.
1998-12-01 23:18:48 +00:00
bouyer
bef8c343db
In ext2fs_sync(), don't flush the vnode if vput() returned an error. Fixes
...
PR kern/6495.
1998-12-01 14:37:44 +00:00
thorpej
1fcae7f1be
defopt FFS_EI
1998-11-12 19:51:10 +00:00
mycroft
d4026f6eb5
GC the B_CACHE bit.
1998-11-09 01:18:34 +00:00
cgd
515148e0a3
cast arg to dbtob to u_quad_t; consisent, and fixed size unnecessary
1998-11-06 23:03:06 +00:00
cgd
af24dfc946
argument to dbtob needs to be cast to u_quad_t here to avoid shift lossage
1998-11-06 23:02:12 +00:00
mycroft
1a5b9c6c30
Do not corrupt file flags when file system is full!
1998-10-27 21:32:58 +00:00
thorpej
978c3d97f5
For consistency w/ FFS/LFS, define EXT2_DINODE_SIZE, and use it instead
...
of pointer arithmetic and/or sizeof(struct ext2fs_dinode).
1998-10-23 00:33:23 +00:00
thorpej
5ecbc50348
Use DINODE_SIZE rather than sizeof(struct dinode).
1998-10-23 00:32:35 +00:00
thorpej
f7948d05a1
Use DINODE_SIZE rather than pointer arithmetic.
1998-10-23 00:31:28 +00:00
thorpej
c8a2232a27
Define a symbolic constant to represent the size of a dinode.
1998-10-23 00:28:45 +00:00
christos
e62c8fd824
Missed a conditional for FFS_EI; appears when we compile without -Ox
1998-10-04 18:07:57 +00:00
bouyer
5440442505
Not time to #include <machine/bswap.h>m, it will come with the move
...
of bswap*() from libutil to libc. Sorry !
1998-09-30 09:08:16 +00:00
bouyer
b10470bc11
#include opt_uvm.h only if _KENREL and !_LKM
...
Make ext2fs_init() call ufs_init(). it was doing the init by itself,
testing for extern done != 0. This bug was hidden by the fact that
ext2fs_init() is called before ffs_init().
1998-09-29 10:24:57 +00:00
pk
3059ae05ba
Apply patch from PR#5542: buffer overflow in lfs_markv().
1998-09-15 10:53:22 +00:00
christos
361a71f864
Fix copyright '\t' -> ' '
1998-09-13 15:14:40 +00:00
pk
37109879dc
PR#6032: define fixed sized on-disk superblock structure.
1998-09-11 21:27:12 +00:00
fvdl
077a042a3f
Fix some maxsymlinklen comparisons for old filesystems that were
...
wrong after the byteswap changes.
1998-09-08 08:37:12 +00:00
fvdl
8fe5a08b64
Correct maxsymlink comparison for old filesystems that was clobbered in
...
byteswap changes.
1998-09-08 08:21:12 +00:00
kenh
466e22e1b7
Add a NODEVMTIME compile-time option. This will inhibit the updating
...
of modification times on device special files. Probably only useful
for low-power systems.
1998-09-04 16:04:26 +00:00
thorpej
38cf17f475
Use the pool allocator and the "nointr" pool page allocator for LFS inodes.
1998-09-01 03:26:05 +00:00
thorpej
3ae149efac
Use the pool allocator and "nointr" pool page allocator for ext2fs inodes.
1998-09-01 03:20:46 +00:00
thorpej
60cfe320cc
Use the pool allocator and the "nointr" pool page allocator for FFS inodes.
...
XXX MFS also comes in here for inodes, and used a different malloc type,
but the structure is the same, so we just use the FFS inode pool.
1998-09-01 03:11:08 +00:00
rvb
7e0aabe421
Remove v_type != DIR check. First, vn_readdir already does
...
this check, before calling VOP_READDIR. Second, vn_readdir
returns a different error even. Finally, some FS's might
want to write their directories into files that look like
BSD directories and then have ufs_readdir parse them.
1998-08-30 00:16:04 +00:00
thorpej
9f42788795
Add some braces to make egcs happy.
1998-08-25 04:43:46 +00:00
thorpej
39f683419f
Back out part of last change (uninitialized work-around).
1998-08-18 18:15:41 +00:00
thorpej
6fc90a1a4d
Add some braces to make egcs happy (ambiguous else warning). Also,
...
deal with bogus uninitialized warning (__noreturn__ related)
1998-08-18 06:47:53 +00:00
matthias
574106c52b
create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
...
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry
27ca6798df
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-09 20:15:38 +00:00
mrg
5d236ade07
minr KNF nit ..
1998-08-09 03:16:23 +00:00
kleink
12a866151b
Recognize _PC_SYNC_IO.
1998-08-03 14:19:57 +00:00
kleink
933111f98f
Implement support for IEEE Std 1003.1b-1993 synchronous I/O:
...
* in the read vnode operator, check for IO_SYNC being set in the ioflag and
synchronously update the file's meta-data if appropriate.
* in the write vnode operator, update the appropriate checks for IO_SYNC being
set in the ioflag to reflect that IO_DSYNC is now inclusive-or'ed into
IO_SYNC, and require all IO_SYNC bits to be set for operations defined by
synchronized I/O file integrity completion but not by synchronized I/O data
integrity completion.
1998-08-02 18:57:23 +00:00
mjacob
d0aa61ad21
fix to accomodate change in vn_rdwr prototype
1998-07-28 20:37:33 +00:00
thorpej
6326c90134
Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
...
to match the new uio_resid type.
1998-07-28 18:37:47 +00:00
thorpej
e95c22ee96
Don't cast the null residual pointer passed to vn_rdwr().
1998-07-28 18:17:34 +00:00
drochner
2dcc522f1d
The fragtbl[], inside[] and around[] variables are needed by "fsck",
...
so we can't put them inside "#ifdef _KERNEL".
Put declarations inside .c files where needed to preserve namespace.
1998-07-28 17:30:01 +00:00
mycroft
829367f279
Omit some externs if not _KERNEL.
1998-07-28 04:17:51 +00:00
jonathan
d275e56dee
* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
...
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
thorpej
0f66e53c03
Use genfs_lease_check()
1998-06-25 22:20:39 +00:00
sommerfe
7ba7fbbb23
Always include fifos; "not an option any more".
1998-06-24 20:58:44 +00:00
sommerfe
76f1116825
Don't include opt_fifo.h if not kernel...
1998-06-23 23:15:50 +00:00
sommerfe
becaafeea0
defopt for options FIFO
1998-06-22 22:00:59 +00:00
mrg
670c3dfa60
splify UVM #ifdef.
1998-06-20 13:14:53 +00:00
kleink
2d869bbacf
KNF, mostly of FFS_EI changes.
1998-06-13 16:26:22 +00:00
cgd
651b44e211
Rework the way kernel include files are installed. In the new method,
...
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
kleink
74ce7ac984
KNF: only include one of <sys/{param,types}.h>, not both.
1998-06-10 15:57:39 +00:00
scottr
7171cca4b8
Protect various config(8)-generated files from inclusion while
...
building LKMs. Fixes PR 5557.
1998-06-09 07:46:31 +00:00
mikel
c1f8034333
ffs_ -> ext2fs_ in warning; art@openbsd.org
1998-06-09 06:33:22 +00:00
ragge
1a66918fc0
Wrong include file order; caused compile error on vax.
1998-06-08 17:59:08 +00:00
scottr
d48f258f90
Use the newly-defined opt_quota.h.
1998-06-08 04:27:50 +00:00
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
ross
ac5774c288
Fix a 64-bit pointer/int warning.
1998-03-19 03:42:35 +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
kleink
5cf59ee9ad
Move the permission check in vfs_syscalls.c::change_owner() back to
...
ufs_chown() again - the facility required in this context would be a
filesystem-specific super-user determination, which is not available yet.
1998-03-10 11:56:40 +00:00
cgd
c35a34ab68
ext2fs_checkoverlap is (or at least seems) unused, and its prototype is
...
#ifdef DIAGNOSTIC. Make the function #ifdef DIAGNOSTIC, as well, so we
don't get a warning about the function declaration not being a prototype.
1998-03-04 06:50:25 +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
e5209f31b8
A cookie should point to the *next* entry. Grrr.
1998-03-02 22:26:14 +00:00
bouyer
6d339338e6
Close kern/5077: When DIAGNOSTIC is defined, don't complain about
...
bad magic numbers at a mount attempt. A message is still printed when the
magic number is OK, but the version number or the block size is bad.
Patch from Soren S. Jorvang, but different from the one in the PR.
1998-03-02 16:13:42 +00:00
fvdl
d201db498e
Remove accidentally enabled lfs_mountroot from vfsops struct.
1998-03-01 22:16:39 +00:00
fvdl
8c7c2ea123
Remove accidentally enabled mfs_mountroot from vfsops struct.
1998-03-01 22:16:01 +00:00
fvdl
7ba6a2daac
Remove extraneous files from Lite2 merge.
1998-03-01 13:45:28 +00:00
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