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
enami
bfbd2cd3ab
Add forward declaration of struct lwp instead of struct proc. Sort those
...
while I'm here.
2003-06-29 05:43:56 +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
fvdl
67c9fa950a
OS X still seems to use the old nrpos field in the superblock, and gets
...
unhappy after NetBSD wrote an Apple UFS filesystem. Just set it to 0
in this case.
2003-06-12 18:50:43 +00:00
fvdl
d9f47e809c
free the ext2fs dinode struct in ext2fs_reclaim. From Ted Unangst.
2003-05-26 21:22:19 +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
kristerw
07936511f0
The C language does not permit statements of the form
...
(X ? Y : Z) = 0;
even though gcc handles this by a stupid extension.
Transform these to correct C.
Approved by fvdl.
2003-05-15 20:25:31 +00:00
ragge
97fa6ef77b
Add a missing ifdef DDB.
2003-05-07 18:49:29 +00:00
gmcgarry
835240b191
Print pid on error. From Greg A. Woods in PR#17393.
2003-05-04 01:52:18 +00:00
christos
7a96f65456
make sure we update fs_fsmnt.
2003-05-03 16:24:35 +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
3f3b3242de
constify 'mastertemplate'.
2003-04-29 07:45:23 +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
fvdl
94e92b1bb3
Assign the right linkcount when renaming a directory.
2003-04-25 23:12:33 +00:00
gmcgarry
0645f99b01
More ufs2 merge fall-out. Pass the correct pointer to the dinode
...
for clearing. Fixes PR#21241.
2003-04-24 08:05:35 +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
tls
85c8cfb533
Correct use of MAXBSIZE where MAXPHYS was intended. This is a necessary
...
first step towards per-device MAXPHYS, and has the beneficial side effect
of allowing clustering to MAXPHYS even on systems that need to run with
a reduced MAXBSIZE to get more metadata buffers.
2003-04-23 00:55:17 +00:00
christos
d864ba0136
fix lkm malloc lossage.
2003-04-22 17:14:12 +00:00
christos
db7b52084a
choose the smaller size of the two strings when memcpy'ing them. A better
...
fix would be to strncpy and null terminate? From enami.
2003-04-22 13:18:52 +00:00
christos
a94b10edf1
PR/2996: Greg Oster: Fix comment to match reality. Names are padded to
...
four bytes, but the bytes are not null.
2003-04-19 22:02:39 +00:00
fvdl
0545901d27
configdirs was changed to an array of u_int8_t, so don't compare values
...
to 65535.
2003-04-17 09:32:43 +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
yamt
aa51f25824
ufs_rwXX: cast to unsigned even without FFS_EI to avoid
...
possible nasty signed vs unsigned problems.
2003-04-16 14:27:03 +00:00
yamt
1963d34b78
use bswap32 and bswap64 correctly.
...
(fs_pendingblocks and fs_pendinginodes)
2003-04-16 14:20:25 +00:00
fvdl
d0152b0231
ffs_reclaim may be called while the dinode pointer in the inode structure
...
is still NULL (in the case of an error in ffs_vget). Check for this
condition before doing a pool_put.
2003-04-16 07:38:25 +00:00
fvdl
ba400f9233
Don't cache buffers used when finding the superblock, it can lead to
...
seeing bogus data for the first cg with certain block/frag sizes.
From enami tsugutomo.
2003-04-12 10:35:58 +00:00
fvdl
9e0b0abaa7
Use variables for some cg accesses; makes things more readable and more
...
similar to FreeBSD. No functional change.
2003-04-12 10:33:17 +00:00
fvdl
4cdcaab92d
Remove diagnostic ufs_vinit check, this isn't quite the right place for it;
...
it'll be reinstated elsewhere.
2003-04-11 14:13:28 +00:00
fvdl
64f0bf8882
Adjust diagnostic check for bad mode field; only the VNON case should
...
matter. From Enami.
2003-04-11 10:36:33 +00:00
enami
b0715b0b82
Make ffs_cg_swap() works even if same chunk is passed as new and old cg.
...
This is necessary to prevent newfs from dumping core when it is asked to
create a UFS1 file system of non-native endian.
2003-04-11 10:20:35 +00:00
fvdl
bf82cd91c6
Add diagnostic check to ufs_vinit in order to catch bad mode fields in
...
inodes early.
2003-04-10 20:22:04 +00:00
fvdl
63ab1add00
Initialize the 'mirror' i_flags fiels in struct inode to 0.
2003-04-10 20:03:40 +00:00
fvdl
2758e6ad60
Remove some leftover diagnostic checks.
2003-04-10 20:02:36 +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