Commit Graph

399 Commits

Author SHA1 Message Date
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
yamt
0dc0c83b61 remove redundant prototypes. 2003-09-29 15:12:08 +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
yamt
17f9466183 some comments 2003-09-20 17:51:55 +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
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
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
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
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
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
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
yamt
3f84a2d3a1 a comment. 2003-07-02 14:07:16 +00:00
yamt
eb4e09d59f use queue.h macros. 2003-07-02 13:43:02 +00:00
yamt
82659031f4 use VFSTOUFS macro. 2003-07-02 13:41:38 +00:00
yamt
102c8a6a74 - add a new functions, lfs_writer_enter/leave, and use them instead of
duplicated code fragments.
- add an assertion.
2003-07-02 13:40:51 +00:00
yamt
f3506a9599 drain dirops before aqcuiring seglock. otherwise it might deadlocks.
PR/20676 (Karl Knutsson)
2003-07-02 13:39:03 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej
a06b275edc Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.
2003-06-29 18:43:21 +00:00
bouyer
75208caf18 Adapt for struct proc* -> struct lwp* changes. 2003-06-28 22:53:35 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
yamt
ab2238cfad make is_sequential a callback in order to achieve better lfs write clustering.
since lfs always rewrite blocks into the new segment,
current on-disk place of the block doesn't affect to write clustering.

ok'ed by Konrad Schroder.
2003-05-18 12:59:05 +00:00
nakayama
a6d8c9185d Avoid comparison is always false warning in gcc 3.3 w/ 64-bit size_t. 2003-05-17 01:44:39 +00:00
ragge
97fa6ef77b Add a missing ifdef DDB. 2003-05-07 18:49:29 +00:00
perseant
e18585deb2 Correct arguments to check_dirty, ensuring that all pages in a block are
written if any of them are dirty.  Pointed out by yamt.
2003-05-02 01:47:39 +00:00
perseant
100c8f971f Restrict the run of cluster blocks to on-disk contiguous blocks (back out
part of rev 1.115), to avoid writing over holes.  This is the lesser of two
evils, to be replaced soon.
2003-04-29 17:45:11 +00:00
yamt
982fbc7db4 add an assertion. 2003-04-29 07:44:04 +00:00
yamt
b4d5e11ffe fix a comment. 2003-04-27 06:47:45 +00:00
yamt
c2b802ff24 fix b_interlock lock/unlock mismatches. 2003-04-27 06:46:38 +00:00
perseant
b691ba8a71 Don't change update time on block write; lets e.g. "tar xp" work properly. 2003-04-27 04:18:29 +00:00
perseant
ef3c60764c Make LFS work better (though still not "well") as an NFS-exported
filesystem (and other things that needed to be fixed before the tests
would complete), to wit:

* Include the fs ident in the filehandle; improve stale filehandle checks.

* Change definition of blksize() to use the on-dinode size instead of
  the inode's i_size, so that fsck_lfs will work properly again.

* Use b_interlock in lfs_vtruncbuf.

* Postpone dirop reclamation until after the seglock has been released,
  so that lfs_truncate is not called with the segment lock held.

* Don't loop in lfs_fsync(), just write everything and wait.

* Be more careful about the interlock/uobjlock in lfs_putpages: when we
  lose this lock, we have to resynchronize dirtiness of pages in each
  block.

* Be sure to always write indirect blocks and update metadata in
  lfs_putpages; fixes a bug that caused blocks to be accounted to the
  wrong segment.
2003-04-23 07:20:37 +00:00
christos
80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
simonb
761de7345c '#if 0' out a variable that is currently only used in other '#if 0'd out
code.
2003-04-10 04:15:38 +00:00
thorpej
24a4b8faa6 Use PAGE_SIZE rather than NBPG. 2003-04-09 00:28:28 +00:00
fvdl
42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
yamt
0296b9ddb2 add assertions and a debug check. 2003-04-01 14:58:43 +00:00
yamt
418bd96252 lfs_strategy is used only for read. 2003-04-01 14:31:50 +00:00