Commit Graph

548 Commits

Author SHA1 Message Date
lukem ed54fa2d76 correctly cast arguments to scanc() 2001-08-09 08:16:42 +00:00
lukem 1a2d5cf412 be consistent and use "u_char" instead of "unsigned char" 2001-08-09 08:15:26 +00:00
lukem a73aa816f3 get argument name correct in comment describing vop_balloc_args 2001-08-08 08:36:36 +00:00
jdolecek 58ed62e500 Constraint 'blkcnt' of lfs_markv() syscall by 64KB. Reviewed by
Konrad Schroder <perseant@NetBSD.org>.
2001-08-03 06:02:42 +00:00
lukem 3cd4afc9e3 - multiple include protection
- pull in <ufs/ufs/dinode.h> for ufs_daddr_t
- mark a few fields as being "UNUSED" (because they are)
2001-07-27 01:28:06 +00:00
lukem c358141302 multiple include protection 2001-07-27 01:24:54 +00:00
jdolecek bd21ec5d2e lfs_writeseg(): make el_size a size_t (cosmetic only, no functional change) 2001-07-26 20:20:15 +00:00
lukem 714cac851d if printing the value of fs_clean, say 'fs_clean' instead of 'fs_flags' ... 2001-07-26 07:58:55 +00:00
lukem fcf7f6cd06 fix spelo 2001-07-26 07:55:54 +00:00
assar bec71dc090 change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations
2001-07-24 15:39:30 +00:00
perseant 4e3fced95b Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default.  Changes for the v2 layout include:

- Segments of non-PO2 size and arbitrary block offset, so these can be
  matched to convenient physical characteristics of the partition (e.g.,
  stripe or track size and offset).

- Address by fragment instead of by disk sector, paving the way for
  non-512-byte-sector devices.  In theory fragments can be as large
  as you like, though in reality they must be smaller than MAXBSIZE in size.

- Use serial number and filesystem identifier to ensure that roll-forward
  doesn't get old data and think it's new.  Roll-forward is enabled for
  v2 filesystems, though not for v1 filesystems by default.

- The inode free list is now a tailq, paving the way for undelete (undelete
  is not yet implemented, but can be without further non-backwards-compatible
  changes to disk structures).

- Inode atime information is kept in the Ifile, instead of on the inode;
  that is, the inode is never written *just* because atime was changed.
  Because of this the inodes remain near the file data on the disk, rather
  than wandering all over as the disk is read repeatedly.  This speeds up
  repeated reads by a small but noticeable amount.

Other changes of note include:

- The ifile written by newfs_lfs can now be of arbitrary length, it is no
  longer restricted to a single indirect block.

- Fixed an old bug where ctime was changed every time a vnode was created.
  I need to look more closely to make sure that the times are only updated
  during write(2) and friends, not after-the-fact during a segment write,
  and certainly not by the cleaner.
2001-07-13 20:30:18 +00:00
toshii 4866f1a22b Fix typo. s/extention/extension/ 2001-07-05 08:38:24 +00:00
chs c31ab668df in ext2fs_balloc_range(), clear PG_RDONLY on pages which now have backing store. 2001-07-04 21:16:01 +00:00
chs 2a7b0d97d6 in ufs_balloc_range(), clear PG_RDONLY on pages which now have backing store.
fixes PR 13353.
2001-07-04 21:08:48 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
mrg 804019f100 only include "fs_lfs.h" if _KERNEL_OPT. 2001-06-05 09:19:33 +00:00
chs d8bbc51566 fix an error case for quotas. 2001-06-03 16:49:07 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
chs 45701591c6 add a genfs_mmap() and change all of the disk-based filesystems
to implement VOP_MMAP() with the genfs version, in preparation for
actually using this VOP.
2001-05-28 02:50:51 +00:00
enami c17241f92a Don't flush possibilly relocated file system block if write is done
asynchronously.  They will be flushed later when necessary and flushing
now makes sequential write access very slow.
2001-04-18 03:48:23 +00:00
thorpej 5b35dc8136 When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
2001-04-16 22:41:09 +00:00
chs 331bd97cbd work around a problem with sync writes vs. softdeps. 2001-03-26 06:47:34 +00:00
fvdl ad5dcb280f Same change as in the UFS code: unlock vnode before setting v_op
to spec_vnode_ops. From Bill Studenmund.
2001-03-23 21:10:48 +00:00
fvdl 509b0d01a5 Do an explicit VOP_UNLOCK in ufs_vinit before setting v_op to
spec_vnode_ops_p. Workaround for a lock leak. Problem tracked
down by der Mouse.
2001-03-23 12:15:34 +00:00
sommerfeld d02dde9937 Change ffs_dirpref() to pay attention to the amount of available free
space before deciding which cylinder group should contain a new directory
inode.

Fixes kern/11983; works around some, but not all, of the side effects
of kern/11989.

Tested by me for well over a month on my laptop; preliminary versions of
the fix were tested by Frank van der Linden and Herb Peyerl.
2001-03-13 21:16:23 +00:00
chs 060e70db41 min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
2001-02-27 04:37:44 +00:00
chs dfd2654fd2 min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
2001-02-27 02:55:40 +00:00
fvdl 418264a670 Some bugfixes from rev 1.33 and 1.34 of this file in FreeBSD (some
in effect cosmetic). Original FreeBSD commit messages:

==
date: 2000/03/15 07:18:15;  author: mckusick;  state: Exp;  lines: +4 -4
Bug fixes for currently harmless bugs that could rise to bite
the unwary if the code were called in slightly different ways.

[...]

2) In ufs_lookup() there is an off-by-one error in the test that checks
if dp->i_diroff is outside the range of the the current directory size.
This is completely harmless, since the following while-loop condition
'dp->i_offset < endsearch' is never met, so the code immediately
does a second pass starting at dp->i_offset = 0.

3) Again in ufs_lookup(), the condition in a sanity check is wrong
for directories that are longer than one block. This bug means that
the sanity check is only effective for small directories.

Submitted by:   Ian Dowse <iedowse@maths.tcd.ie>

==

date: 2000/03/09 18:54:59;  author: dillon;  state: Exp;  lines: +2 -2
branches:  1.33.2;
    In the 'found' case for ufs_lookup() the underlying bp's data was
    being accessed after the bp had been releaed.  A simple move of the
    brelse() solves the problem.

Approved by: jkh
Submitted by:  Ian Dowse <iedowse@maths.tcd.ie>

==
2001-02-26 20:25:11 +00:00
lukem 5694890732 convert to ANSI KNF 2001-02-26 18:09:20 +00:00
lukem ae86fc2df2 some KNF 2001-02-26 17:12:08 +00:00
cgd 4dddddfe62 fix bug (pointed out as sequence point violation warning with current-ish gcc)
caused by use of makedev(major,minor++).  makedev() now (since 32-bit
dev_t conversion) evaluates its second argument twice.
2001-02-24 00:05:22 +00:00
eeh d0eaafc17f Use int32_t for on-disk time_t values. 2001-02-23 02:25:10 +00:00
chs 5e3caa8b52 skip truncating a file to 0 before freeing it if it's already zero-length. 2001-02-18 20:17:04 +00:00
chs 77b8e1c11d fix the range args to pgo_flush() in the error path of ufs_balloc_range(). 2001-02-18 20:13:29 +00:00
chs 31f045ca75 remove debug code that was left in by accident. 2001-02-07 22:40:06 +00:00
tsutsui ec8b1c000e Fix nested extern declaration of prtactive. 2001-02-07 12:40:43 +00:00
chs a1c22f6d67 add casts to an assertion in ffs_alloc() so it works with offsets past 4GB. 2001-02-05 10:55:02 +00:00
christos bf4fd5e39c don't include lfs_extern.h; ufs/inode.h does too. 2001-02-04 21:51:19 +00:00
augustss 46ee162100 Fix from chuq:
don't update UVM's notion of the file size before the VOP_FSYNC() when
we're partially truncating a file with softdeps enabled.  doing so could
free pages without updating the dependency info, which would result in
"panic: softdep_write_inodeblock: direct pointer #1 mismatch 0 != N".
2001-01-27 04:23:21 +00:00
itohy 7c338ddc48 Call inittodr() from lfs_mountroot() so that the system time is set properly
when booted from LFS.
2001-01-26 07:59:23 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
mycroft fad85a24d8 On a RW->RO transition, explicitly clear fs_fmod after the cgupdate/sbupdate,
to prevent spurious writebacks and whinging about the (correct!) clean flag.
(Why this isn't done in ffs_sbupdate(), I dunno...)
2001-01-10 17:49:18 +00:00
ad d8735dd13a RCS ID 2001-01-10 16:45:56 +00:00
chs bc21905f3c attach the softdep pagecache pseudo-buffers to the inode
so we can find them quickly in the softdep truncate path.
2001-01-10 04:47:10 +00:00
mycroft 7f2aa054f1 ffs_reload(): Copy fs_ronly into the new superblock, too, as it may have been
modified on disk (e.g. by fsck(8)).  This flag should really be elsewhere.
2001-01-09 10:44:19 +00:00
joff a6ef389457 If DIAGNOSTIC and the segment writer gets a badly sized buffer, panic()
instead of silently corrupting the filesystem.
2001-01-09 05:05:35 +00:00
matt ad346bb9eb Convert a MALLOC with a variable size to malloc(). Saves 220 bytes of text
on VAX.
2001-01-01 05:17:26 +00:00
enami 95a1bfa14c - 16 * 8 != 168
- offset should be endian independent.
2000-12-23 14:42:06 +00:00
enami 0e4a3d44c0 Cosmetic changes 2000-12-23 14:09:52 +00:00