Commit Graph
383 Commits
Author SHA1 Message Date
David E. O'Brien 250ca53067 MFC:
Convert all users of fldoff() to offsetof().  fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
2001-03-05 13:09:13 +00:00
Jonathan Lemon d2180fd164 MFC: sync kq up to current (extend to device layer, plus other fixes) 2001-02-26 04:23:21 +00:00
cvs2svn 8a69f5ef79 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2001-02-10 06:29:54 +00:00
cvs2svn 08f22b4dfb This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-12-23 19:49:29 +00:00
Matthew Dillon 07a766574c MFC ufs_readwrite.c 1.72, ext2_readwrite.c 1.20. Fix a data-consistency
race between write() and mmap().  I know this will slow write-appends
down a bit and I am researching a better solution, but the race needs to
be fixed now.
2000-12-22 18:44:34 +00:00
Bruce Evans d9d49643b7 MFC (1.6: quick fix for not writing group descriptor group, inode
bitmaps or block bitmaps before unmount() completes).

PR:		22726
2000-11-11 13:14:15 +00:00
Bruce Evans 0683627c64 MFC (pass the correct inode number to VFS_VGET() for mknod()).
Approved by:	jkh
2000-11-07 03:09:52 +00:00
Bruce Evans 319d05c53e MFC (support filesystems with the not-so-new "sparse_superblocks"
feature).

Approved by:	jkh
2000-11-05 19:17:40 +00:00
Bruce Evans 9f6bf860b1 MFC (1.25 fixed overruns of cookie buffer and directory buffer in
ext2_readdir()).
2000-10-27 10:08:37 +00:00
Cameron Grant acafef5305 MFC:
fix ecc/nmi problem
fix static
don't waste voices
2000-08-20 00:43:55 +00:00
Peter Wemm e7351cf99a move $FreeBSD$ to the same place as -current 2000-08-03 18:48:27 +00:00
Peter Wemm b245958cd3 MFC: $FreeBSD$ 2000-08-03 00:54:41 +00:00
David E. O'Brien 91c6aab4d6 MFC: x86 ASM cleanups allowed/required with/by Binutils 2.10.0.
1. Do not specify the size to operations; allow the assembler to decide.
   (we often were mixing 32-bit operations with 16-bit operands)
2. AT&T asm syntax requires a leading '*' in front of the operand for
   indirect calls and jumps.
2000-07-07 00:38:51 +00:00
Matthew Dillon 383c30fcec MFC sequential write detection heuristic. This extends the sequential
read heuristic to also cover sequential writes, causing write-behind
    to be used only for the sequential write case.  This solves a number of
    performance issues with random writes to medium sized files using
    large block sizes, as occurs with DBM files.
2000-04-26 20:36:36 +00:00
cvs2svn 4ed2551a19 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-04-13 14:40:41 +00:00
cvs2svn 842f308487 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-03-13 04:59:44 +00:00
Bruce Evans d1a417f17e Don't forget to check for unsupported features when updating. It was
possible to defeat the check for rw incompatibilty by mounting ro and
updating to rw.

Approved by:	jkh
2000-03-09 05:21:10 +00:00
Bruce Evans fc47f29c64 MFS (ext2_lookup.c 1.17.2.2, ext2_vnops.c 1.42.2.2: fix "filetype" support).
Approved by:	jkh
2000-03-03 08:00:27 +00:00
Peter Wemm 1c6f64061c Remove #if NDGB > 0 and #if NDGM > 0 2000-01-29 18:42:45 +00:00
Poul-Henning Kamp ba4ad1fcea Give vn_isdisk() a second argument where it can return a suitable errno.
Suggested by:	bde
2000-01-10 12:04:27 +00:00
Bruce Evans b9b652d2f6 Support filesystems with the not-so-new "filetype" feature. This
feature gives the d_type field for struct dirent.  We used to panic
in ext2_readdir() for filesystems with this feature.
2000-01-05 19:31:26 +00:00
Bruce Evans 6291b96b03 Don't allow mounting (or mounting R/W) of filesystems with unsupported
features (except for file types in directory entries, which will be
supported soon).

Centralized the magic number and compatibility checking.

Dropped support for ancient (pre-0.2b) filesystems, as in the Linux
version.  Our "support" consisted of printing more details in the error
message before failing at mount time.
2000-01-02 17:40:02 +00:00
Bruce Evans d68084cd89 Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. The
main changes are:
- many things are more dynamic; e.g., the inode size is a new parameter
  in the superblock instead of a constant.
- extensions are controlled by new flags in the superblock.
- directory entries may have a file type field.
These changes are not used yet, except for a spelling change which affects
ext2_cnv.c
2000-01-01 17:39:21 +00:00
Bruce Evans c9fbb5bc2c Merged cosmetic changes from the initial import on the vendor branch
(mainly things that were lost or misformatted in a different way by
moving them to ext2_fs_i.h and back, and ifdefs for user mode that
were excessively edited).
2000-01-01 16:26:43 +00:00
Bruce Evans 8e19715af3 Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)
to avoid the namespace problems caused by <ufs/ufs/inode.h> #defining
i_mode, etc.

ext2_fs_i.h had nothing to do with the Linux version.  It was a small
part of the Linux version of ext2_fs.h (the part that declares extra
in-core fields for an inode).  We don't need it because we use the
ufs in-core inode for the extra fields.
2000-01-01 14:43:20 +00:00
Bruce Evans 5c8b462df8 Updated/corrected the list of GPL'ed files. 2000-01-01 11:27:50 +00:00
Bruce Evans 0b1dd186eb This file is not used directly. The small parts of it that are used were
merged into ext2_vfsops.c in rev.1.1.  This broke both merging from the
vendor branch and the non-GPL'ed-ness of ext2_vfsops.c.
2000-01-01 11:17:28 +00:00
Bruce Evans 33891a9f1a This file is not used directly. It was merged into ext2_linux_balloc.c
in rev.1.1.
2000-01-01 11:11:13 +00:00
Bruce Evans c15ee3ea23 This commit was generated by cvs2svn to compensate for changes in r55289,
which included commits to RCS files with non-trunk default branches.
2000-01-01 11:05:19 +00:00
Bruce Evans 6969f4fedf Import the Linux ext2fs files that our GPL'ed ext2fs files seem to be
based on.

Obtained from:	Linux 1.2.2 distribution
2000-01-01 11:05:19 +00:00
Peter Wemm c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Robert Watson 91f37dcba1 Second pass commit to introduce new ACL and Extended Attribute system
calls, vnops, vfsops, both in /kern, and to individual file systems that
require a vfsop_ array entry.

Reviewed by:	eivind
1999-12-19 06:08:07 +00:00
Eivind Eklund 762e6b856c Introduce NDFREE (and remove VOP_ABORTOP) 1999-12-15 23:02:35 +00:00
Poul-Henning Kamp 0429e37ade struct mountlist and struct mount.mnt_list have no business being
a CIRCLEQ.  Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.

This removes ugly  mp != (void*)&mountlist  comparisons.

Requested by:   phk
Submitted by:   Jake Burkholder [email protected]
PR:             14967
1999-11-20 10:00:46 +00:00
David E. O'Brien 594017f90d Fix __asm__ clobber list abuse.
Submitted by:	bde
1999-11-15 23:16:06 +00:00
Eivind Eklund dd8c04f4c7 Remove WILLRELE from VOP_SYMLINK
Note: Previous commit to these files (except coda_vnops and devfs_vnops)
that claimed to remove WILLRELE from VOP_RENAME actually removed it from
VOP_MKNOD.
1999-11-13 20:58:17 +00:00
Eivind Eklund edfe736df9 Remove WILLRELE from VOP_RENAME 1999-11-12 03:34:28 +00:00
Poul-Henning Kamp 698f9cf828 Next step in the device cleanup process.
Correctly lock vnodes when calling VOP_OPEN() from filesystem mount code.

Unify spec_open() for bdev and cdev cases.

Remove the disabled bdev specific read/write code.
1999-11-09 14:15:33 +00:00
Bruce Evans 5bd5c8b9e5 Quick fix for breakage of ext2fs link counts as reported by stat(2) by
the soft updates changes: only report the link count to be i_effnlink
in ufs_getattr() for file systems that maintain i_effnlink.

Tested by:	Mike Dracopoulos <[email protected]>
1999-11-03 12:05:39 +00:00
Mike Smith 6d14782861 Newline-terminate the complaint message about not being able to find
the root vnode pointer.
1999-11-01 23:57:28 +00:00
Mike Smith 28663e65ca Remember folks, it's:
1) test
 2) commit
 3) test again

Guess who forgot 1 and 3?  8)
1999-10-12 02:23:14 +00:00
Poul-Henning Kamp c23f21660c remove unused #include 1999-10-11 19:16:54 +00:00
Poul-Henning Kamp b89392e703 Remove the D_NOCLUSTER[RW] options which were added because vn had
problems.  Now that Matt has fixed vn, this can go.  The vn driver
should have used d_maxio (now si_iosize_max) anyway.
1999-09-30 07:11:30 +00:00
Poul-Henning Kamp 1b5464ef9d Remove v_maxio from struct vnode.
Replace it with mnt_iosize_max in struct mount.

Nits from:	bde
1999-09-29 20:05:33 +00:00
Poul-Henning Kamp 1ab305ef60 Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.

Reviewed by: julian, bde
1999-09-28 11:45:31 +00:00
Poul-Henning Kamp d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Poul-Henning Kamp ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Matthew Dillon 67ddfcaf69 More removals of vnode->v_lastr, replaced by preexisting seqcount
heuristic to detect sequential operation.

    VM-related forced clustering code removed from ufs in preparation for a
    commit to vm/vm_fault.c that does it more generally.

Reviewed by: David Greenman <[email protected]>, Alan Cox <[email protected]>
1999-09-20 23:27:58 +00:00
Poul-Henning Kamp faad302913 Fix a harmless bug I introduced, simplify a bit more while here. 1999-09-20 21:14:43 +00:00
Poul-Henning Kamp fae03f66d1 Step one of replacing devsw->d_maxio with si_bsize_max.
Rename dev->si_bsize_max to si_iosize_max and set it in spec_open
if the device didn't.

Set vp->v_maxio from dev->si_bsize_max in spec_open rather than
in ufs_bmap.c
1999-09-20 19:57:28 +00:00