Commit Graph

927 Commits

Author SHA1 Message Date
dbj fe7c786886 add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD
2003-10-14 14:02:56 +00:00
yamt 1fb76f9bad add a prototype of check_segsum(). 2003-10-14 13:51:51 +00:00
yamt d457c892fa when roll-forwarding, check segment serial numbers correctly. 2003-10-14 13:46:30 +00:00
yamt 73e762ca69 add a missing fsbtodb() to read a correct block for roll-forwarding. 2003-10-14 12:52:28 +00:00
yamt 1508246f38 remove a redundant definition of LFS_MAX_ACTIVE. 2003-10-14 12:51:31 +00:00
thorpej f7840303a1 Whitespace nits. 2003-10-13 17:07:55 +00:00
yamt dd4d591157 - a comment.
- bcopy -> memcpy
- increase 'p' only when needed.
2003-10-08 15:07:25 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
yamt 4ce4892712 assertions. 2003-10-03 15:35:54 +00:00
yamt 33feb8e686 reassignbuf() when lfs_writeseg() takes away B_DELWRI. 2003-10-03 15:35:03 +00:00
yamt 656ff745cf when inactivating segments, compare segment numbers correctly. 2003-10-03 13:02:54 +00:00
dbj 5c09d20130 Declare fs_old_flags and fs_flags as unsigned.
This fixes a bug introduced in revision 1.120 of ffs_vfsops dated 2003/09/13
which results in fs_flags having a value of 0x7fffff00 when a superblock
is updated to use the new layout.
Discussed in http://mail-index.netbsd.org/tech-kern/2003/09/28/0003.html
2003-09-29 20:34:23 +00:00
yamt 0dc0c83b61 remove redundant prototypes. 2003-09-29 15:12:08 +00:00
enami b50653d8aa In ffs_sbupdate(), swap the sblock after ffs_oldfscompat_write() is
applied rather than the original.
2003-09-25 23:39:17 +00:00
yamt 61d5d4362b fix a bug of lfs.
genfs_getpages() can read in more blocks than it should due to faked filesize
of lfs_gop_size().  it's a security problem and it makes gcc3 "internal error"

to fix this,
- in genfs_getpages(), always calculate diskeof and memeof separately
  so that filesystems (in this case, lfs) can use different strategies
  for them.
- introduce GOP_SIZE_MEM flag and use it to request in-core filesize.
  (it was an intention of GOP_SIZE_READ,
  but after the above change _READ is not a straightforward name)

after this, no one uses GOP_SIZE_{READ,WRITE} anymore but leave them for now.
2003-09-24 10:22:53 +00:00
yamt 67a5559821 cleanup IN_ADIROP/VDIROP handling a little. 2003-09-23 05:26:49 +00:00
yamt e2fbe9d54d remove unnecessary externs of lfs_do_flush. 2003-09-23 05:26:12 +00:00
jdolecek d07d321142 if mounted ASYNC, use delayed writes for metadata, which improves performance
of these operations significantly
based on FreeBSD ufs_lookup.c rev. 1.8, by John Dyson
2003-09-20 21:05:53 +00:00
yamt 17f9466183 some comments 2003-09-20 17:51:55 +00:00
enami 69615345e2 Fix a recently introduced bug which prevents csum totals being copied
when an old ffs filesytem is first mounted (as a result, df reports disk
full on old ffs filesystem or mfs created by old binary).  Problem first
noticed by onoe san.
2003-09-17 02:24:33 +00:00
yamt 7bd2f524bc indent. 2003-09-15 15:08:09 +00:00
bouyer ff7554f54c make sure to not get flags which are for internal use only from the on-disk
superblock.
Proposed in http://mail-index.netbsd.org/tech-kern/2003/09/06/0005.html
2003-09-13 14:09:15 +00:00
bouyer 5e33ea894e Commit changes proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/06/0001.html
http://mail-index.netbsd.org/tech-kern/2003/09/06/0006.html
to avoid compat problems with old ffsv1 by reuse of the old FS_SWAPPED
value for FS_FLAGS_UPDATED, and use of new, larger fields:
- Don't use FS_FLAGS_UPDATED to see if we need to update new fields from
  old fields in ffsv1 case.
- when writing back the superblock, copy back the flags to the old location
  if only old flags are set (FS_FLAGS_UPDATED won't be set in this case)
  in ffsv1 case.
2003-09-13 13:47:04 +00:00
christos 136f9cd821 PR/15397: Jason Thorpe: directory operations on pathnames that refer to
directories and have trailing slashes should succeed. Ok'd by kjk.
Fix provided by enami.
2003-09-11 17:33:42 +00:00
yamt f80b24474d g/c CHECK_COPYIN. 2003-09-10 11:09:11 +00:00
yamt 753a6151b9 comments on lfs_issequential_hole. 2003-09-07 21:00:36 +00:00
yamt 4868f89aae buffer cache mp locks. 2003-09-07 11:55:43 +00:00
yamt d20e923a9c - raise spl to bio in lfs_countlocked() rather than having callers to do so.
- buffer cache MP locks.
- assert B_CALL buffers are not on the free queue.
2003-09-07 11:53:57 +00:00
yamt 4a78faea0f - buffer cache MP locks.
- avoid changing buffer state on the free queue.
2003-09-07 11:47:07 +00:00
yamt 3ed90e8152 use LFS_DEBUG_COUNTLOCKED macro. 2003-09-07 11:44:22 +00:00
itojun 761c22ff58 use arc4random instead of random (mask with INT32_MAX to avoid getting
negative numbers unexpectedly).
2003-09-05 21:58:35 +00:00
yamt 01e41ddfe3 don't call LFS_DEBUG_COUNTLOCKED after bread().
lfs_countlocked doesn't count buffers that isn't on the freelist.
2003-09-04 12:28:53 +00:00
dsl 92c5eba410 Split CGSIZE definition so it can be used with 64bit fpg values.
Split cg_start so magic can be done in libsa when it is known that the
filesystem isn't UFS2.
2003-08-21 14:41:00 +00:00
dsl 72fa43211e gcc for sparc seems to barf at 'int_var * 0x100000000ull' so do
'(uint64_t)(uint)int_var << 32' even though it generates twice as many
instructions on i386!
2003-08-16 07:04:17 +00:00
dsl 8d9878ecb4 Remove only (last?) use of SETHIGH and SETLOW before gcc starts warning
about the odd construct.  Also fixes kern/6525.
2003-08-10 09:54:06 +00:00
dsl 5638922967 Stop panic if 'mknod xxx b 0 0' done on a full filesystem.
panics in ffs_full_fsync because v_specmountpoint requires that the NULL
v_specinfo be followed.
Tidy up in the same order in all error paths so compiler can merge the
code sequences.

Fixes PR kern/22419
2003-08-09 19:02:53 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
pk 918bf35fad Pass the inode flags to set as an argument to ufs_dirrewrite().
Use it to restore the behaviour of not updating the modified time of a
directory that moves to a new parent.
2003-08-05 15:45:48 +00:00
yamt bdbaf98d1e using normal bufcache buffer for cluster buffer head. 2003-07-30 13:36:40 +00:00
yamt 1bc98d3c14 - check EROFS earlier in lfs_markv.
- remove wrong error recovery code (fake buffers are never on bufqueue)
  and put a comment instead.
2003-07-30 12:38:53 +00:00
yamt 3bded40734 remove an unused definition of LFS_VREF_THRESHOLD. 2003-07-30 12:34:00 +00:00
yamt 4573bf3772 yield cpu in directory entry search loop in ufs_lookup().
this loop can take a bit long time with large buffer cache.
2003-07-23 13:56:53 +00:00
yamt bddddad951 KNF. 2003-07-23 13:53:51 +00:00
yamt d7aa0312b2 add parenthesis missed in rev.1.127. 2003-07-23 13:46:57 +00:00
yamt 9d61ee54c4 whitespace 2003-07-23 13:44:55 +00:00
yamt f4fc192872 add KASSERTs in lfs_issequential_hole. 2003-07-23 13:38:18 +00:00
yamt 3433c3992e cast UFS1 on-disk block pointers to int32_t before assign it to daddr_t.
it's needed for LFS because UNWRITTEN is a negative number.
2003-07-23 13:36:17 +00:00
yamt 2ba5ae7ea6 more MP locks. 2003-07-12 16:19:00 +00:00
yamt 12ad26b293 - wrap long lines.
- remove a mysterious blank line.
2003-07-12 16:17:52 +00:00
yamt 3852db2096 - protect global resource counts with lfs_subsys_lock.
- clean up scattered externs a little.
2003-07-12 16:17:06 +00:00