Commit Graph

1030 Commits

Author SHA1 Message Date
yamt
2209153ea4 lfs_gop_write: assert that ifile never come here. 2004-05-30 20:45:44 +00:00
hannken
55db9c1eb7 Fixup last commit. fs->fs_active must be initialized. 2004-05-27 17:04:52 +00:00
hannken
712c432a06 Don't use VTOI(vp)->i_flags to test for snapshot devices. Will not work
for non-UFS file systems. Test for VBLK vnode instead.
2004-05-26 20:33:10 +00:00
hannken
d63a5c8e01 Make it compile without option FFS_EI. 2004-05-26 11:17:39 +00:00
hannken
8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
atatat
53c625655c Sysctl descriptions under vfs subtree 2004-05-25 04:44:43 +00:00
kleink
25709a1d3a POSIX: Permit a process without the appropriate privilege to change a
file's group ID to its effective gid, in addition to the presently
permitted set of supplementary gids.

From Mark Davies in PR standards/25401.
2004-05-22 23:24:23 +00:00
atatat
10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
atatat
1d3a6a329e Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.
2004-05-20 05:39:34 +00:00
yamt
58912348a7 lfs_cluster_aiodone: turn an invariant condition into an assertion. 2004-05-19 11:29:32 +00:00
wiz
8cd26a6026 Fix typo in error message, reported by Piotr Meyer in PR 25418. 2004-05-02 06:59:20 +00:00
jrf
fc97fd571a First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

	- removed casts from unionfs, deadfs and fdesc
	  (there are more to hunt down still)
	- changed vfs_quotactl args argumet from caddr_t to void *
	- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.
2004-04-27 17:37:30 +00:00
simonb
b09560304e Unwrap a not-too-long line. 2004-04-26 01:40:40 +00:00
dbj
9a0dfd8c28 remove botched superblock upgrade warnings.
there are now alternate non-kernel checks and fixes for this problem.
relevent prs include:
bin/17910 kern/21283 kern/21404 port-macppc/23925 port-macppc/23926
install/25138
2004-04-25 21:02:26 +00:00
simonb
b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
yamt
54b5826d2c lfs_statvfs: report f_frsize correctly. 2004-04-22 10:45:56 +00:00
yamt
2b17bf3d63 check_dirty: fix another PHOLD leak. ("goto top" path) 2004-04-22 10:45:00 +00:00
christos
0b9201b140 similar fix to enami's in the fstypename field. Not really needed, but better
safe than sorry.
2004-04-21 12:00:36 +00:00
enami
d92f7ed982 Don't copy past the end of destination array boundary; the size of source
array changed due to recent statvfs change.
2004-04-21 07:58:02 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
yamt
aa514117d5 check_dirty: plug a PHOLD leak. from Greg Oster. 2004-04-20 11:52:17 +00:00
dbj
dec025329f remove code that attempts to correct superblock location. this
enforces an unnecessary restriction that the superblock be in the
particular expected locations.  Also, the compatibility case is
handled in ffs_oldfscompat_read.
2004-04-18 03:35:16 +00:00
dbj
d7c33aeb1e when enabling ffs compatibility in ffs_reload, use
sblockloc that superblock was read from
also note XXX that ffs_reload doesn't handle superblock moving
2004-04-18 03:30:23 +00:00
oster
87d110abfa If we bail out due to an error, we need 'unreserve' the space that
we'd reserved earlier.

Approved by: yamt
2004-03-30 14:50:46 +00:00
dsl
cd6c744984 Rework previous so that FS_FLAGS_UPDATED is only looked at for ffsv1 2004-03-27 12:40:46 +00:00
atatat
284a91c3ab Manually attach malloc types when being built as an lkm. 2004-03-27 04:43:43 +00:00
atatat
19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
bouyer
35decc6ed6 Fix disclaimer in my copyright. Pointed out by Thomas Klausner. 2004-03-22 19:23:08 +00:00
dsl
221ec38d03 Rework superblock validation logic to make adding validity tests easier.
Ensure that we don't use the first alternate superblock of a ffsv1
filesystem with 64k blocks (it is in the same place as an ffsv2 sb).
Fixes part of PR kern/24809
2004-03-21 18:48:24 +00:00
dsl
57f6eb7ead Change comments - one I wrote earlier wasn't right.
Add a couple of notes about areas of the superblock being reassigned
when ffsv2 was imported.
2004-03-20 17:26:16 +00:00
dsl
11f75824d0 Add a large comment about the balls-up caused by the ffsv2 superblock
not being at 8k - causes all sorts of problems, in particular with
ffsv1 filessytems with 64k blocks, and disks that are reformatted from
ffsv1 to ffsv2 (and v.v.).  see also PR kern/24809
2004-03-20 15:37:12 +00:00
yamt
3e796c5be5 reserve a MAXBSIZE-sized buffer for inodedeps for pagedaemon.
PR/24443.
2004-03-11 11:50:43 +00:00
yamt
bfe5a94adc as we always replace whole buf in the case of indirdep,
simply changing b_data is enough.  eliminate M_INDIRDEP.

PR/24443.
2004-03-11 11:48:16 +00:00
dbj
8ad71c85f1 quiet tls. change botched superblock warning to use -b 16 2004-03-11 07:14:12 +00:00
keihan
b220964103 s/netbsd.org/NetBSD.org/g 2004-03-10 09:56:59 +00:00
yamt
15c9d33810 calculate data checksum inline. 2004-03-09 07:43:49 +00:00
yamt
81ce5e8cc3 use correct segment size. this fixes memory corruption when using lfsv1. 2004-03-09 06:43:18 +00:00
yamt
25a0a3496e revert ufs_lookup.c rev.1.53 (MNT_ASYNC changes)
it was redundant because our bwrite() knows about MNT_ASYNC.

ok'ed by Jaromir Dolecek and Chuck Silvers.
2004-03-06 06:54:12 +00:00
uwe
20c14b226b Shut up gcc3 warning that `metalbn' might be used uninitialized.
XXX: The warning is bogus and only triggered on sh3.
2004-02-27 00:19:36 +00:00
oster
19eeec0a9c Add a missing:
pool_destroy(&lfs_dinode_pool);

to lfs_done().

Approved-by: yamt
2004-02-26 22:56:55 +00:00
yamt
f9571060ef lfs_putpages: fix a simple_lock mismatch. 2004-02-26 22:41:36 +00:00
wiz
73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
jdolecek
d06e4401fa make sblock_try[] const 2004-02-22 08:58:03 +00:00
yamt
a57f9a6ca5 lfs_update_single: add an assertion. 2004-01-29 12:10:07 +00:00
he
11544aaa71 Let the cast to (long long) for using the result as a printf argument
apply to the whole expression, not just the first factor.
2004-01-28 20:57:15 +00:00
yamt
3e9d8d6772 use bufmem instead of bufpages to make lfs a little less broken. 2004-01-28 10:54:23 +00:00
yamt
09ec20ca66 eliminate tricky usages of VOP_STRATEGY which are (no longer?) necessary. 2004-01-28 10:53:12 +00:00
hannken
d6170777cf Fix xxx_strategy() to use the vnode arg instead of bp->b_vp. 2004-01-26 10:39:29 +00:00
hannken
84b45bc333 Fix mfs_strategy() to use the vp argument.
From YAMAMOTO Takashi <yamt@netbsd.org>.
2004-01-26 10:02:31 +00:00
itojun
c1675e235e avoid panic on monut_mfs. Greg Oster 2004-01-26 04:25:02 +00:00