Commit Graph

5460 Commits

Author SHA1 Message Date
pooka
67a4f392d8 use crunchops for crunchables 2010-12-13 21:48:01 +00:00
pooka
e73ffdda13 Add rump client support for module utilities. It should be noted
that while modstat and modunload and builtin modules work exactly
the same as in the host case, modload loads file system kernel
modules from the rump kernel namespace.  By default, archs which
have rump support for the kernel kernel ABI have the host module
directory mapped into the rump kernel namespace at the same location
(/stand/...).  Therefore, if the *host* module directory is populated,
"rump.modload foo" will work as expected.  Otherwise, RUMP_MODULEBASE
can be used to point to the module directory.
2010-12-13 20:48:44 +00:00
pooka
e8de1d91d0 be a happy crunch build 2010-12-13 19:19:10 +00:00
njoly
6c19f9ea7b op_read return value is a ssize_t, not an int. 2010-12-13 19:17:20 +00:00
pooka
f9740ada7f RUMP_ACTION -> RUMPPRG 2010-12-13 17:42:17 +00:00
pooka
e3d9b779d8 Convert from RUMP_ACTION to RUMPPRG. 2010-12-13 17:39:47 +00:00
pooka
a415ef09e9 Convert from the .ifdef RUMP_ACTION stuff to RUMPPRG. 2010-12-13 17:35:08 +00:00
jruoho
05a9f55544 Xref module(4). 2010-12-13 10:07:46 +00:00
riz
d365bee0c8 Remove bogus check which is not actually testing anything useful,
and depending on file system data, can actually be a false error.

Fixes what I was actually testing for in bin/44209, though the
actual problem was not what I originally described.
2010-12-12 22:48:59 +00:00
mhitch
a7e78491e5 Add support for old ffsv1 superblocks. After reading an old superblock,
copy appropriate data to where they are expected in the updated superblock.
When writing the updated superblock, move the updated values back to the
old ffsv1 superblock locations.  Also check for old superblock format when
updating the last cylinder group and adjust cg_old_ncyl appropriately.
Derived from how mksf sets them.  Should address PR bin/44209.
2010-12-12 19:53:23 +00:00
pooka
a97eadf766 multicore update 2010-12-12 11:38:42 +00:00
riz
6a4bbd2cea Remove accidentally-resurrected TODO item. 2010-12-08 15:23:53 +00:00
riz
8966eced0b If we're operating on a plain file instead of a device, ftruncate() it
to ensure it's been properly extended.  Clears up some problems at certain
blocksizes which showed up during creation of atf tests, which is done
using file-backed file systems.
2010-12-08 00:25:54 +00:00
riz
0b1ff958b5 As currently written, writeat() expects disk blocks, not fs blocks, so
when testing that the last sector of the new size is writeable, make
sure we're ACTUALLY writing in the new space, instead of possibly
overwriting something in the existing fs.

Discovered while writing tests - tests which uncovered file corruption at
certain block sizes.

XXX should rewrite writeat() to expect fs blocks instead of disk blocks.

OK mlelstv@
2010-12-07 23:29:55 +00:00
jmcneill
ed7bfdfad4 Allow for passing more than one module at a time:
$ sudo modunload auvitek xc5000 wintv_eeprom
2010-12-06 23:42:48 +00:00
pooka
39f08af21d mirror change of -lrumpcrypto ==> -lrumpkern_crypto 2010-12-05 20:13:26 +00:00
riz
3485b1dad5 Turns out, plain-file usage is already supported. *blush* 2010-12-03 05:23:34 +00:00
riz
4c7e04789a Knock one off the list. 2010-12-02 22:04:01 +00:00
riz
9f2c8ccc2b Use howmany() instead of "/" to calculate the number of cylinders for
the changed file system, so as to not drop a partial cylinder at the
end.  Fixes PR bin/44177.
2010-12-02 22:00:27 +00:00
elric
297cd81a0d Remove a line that was intended only for my personal testing and that
breaks things.
2010-12-02 18:02:58 +00:00
elric
7de6a71be4 In -G, refuse to operate if KEYGEN_URANDOM is specified as we already do
for KEYGEN_RANDOMKEY.

Print a warning if such a refusal is made---this will help the user understand
why there is an error.

Patch provided by:  Taylor R Campbell <campbell+netbsd@mumble.net>.
2010-12-02 04:54:32 +00:00
riz
6ad0ad89d6 Update TODO for resize_ffs(8), adding some stuff and removing some
ancient bits.
2010-12-01 17:39:54 +00:00
riz
6efa15a79a Do not look for a v1 file system at SBLOCK_UFS2, as this gets the wrong
superblock (first alternate) for a file system with 64k blocks.
Spotted by mhitch@.
2010-12-01 17:39:21 +00:00
riz
18174be827 Clean up this file:
- sync usage comment with current reality
- sort includes
- wrap lines
- use EXIT_FAILURE consistently
- make error messages consistent:  Cannot->Can't
- Remove "Old FFSv1 macros" in favor of system macros in ufs/ffs/fs.h .
  Leave dblksize() because it uses the on-disk dinode structure.

More cleanup is needed.
No functional changes intended.
2010-12-01 17:33:45 +00:00
phx
c122e153ac Allow standalone commands to be recognized, as in the in-kernel keymaps.
Also allow the Cmd token. Examples:
keycode 210 = Cmd Cmd_BrightnessUp
keycode 211 = Cmd_VolumeToggle
2010-11-30 12:22:06 +00:00
riz
6f8b62aac7 Restore a couple of checks for updating the cg_old_ncyl value which
were commented out with XXX and a notation to "fix once fsck is fixed."
fsck seems to have been fixed for this particular issue sometime in the
7 years since the code was brought into the tree.

Update cg_old_niblk instead of cg_ni_blk, since this tool
currently supports ffsv1 only.

With these two changes, I can grow a file system and have the result
be clean according to fsck_ffs.  Shrinking still results in an unclean
file system.

OK mhitch@

While I'm here, fix a typo in an error message.
2010-11-29 19:54:10 +00:00
elric
f130bae6f7 Remove trailing whitespace (patch provided by: Taylor R Campbell
<campbell+netbsd@mumble.net>)
2010-11-27 17:08:36 +00:00
pooka
6070963e92 xref rump_smbfs 2010-11-21 18:33:08 +00:00
pooka
6f2301fb3c Implement ifconfig linkstr as proposed on tech-net. 2010-11-15 22:42:36 +00:00
roy
50de1251a3 Support the new RTM_IFINFO and RTM_CHGADDR messages. 2010-11-12 16:32:18 +00:00
pooka
afd4d3a773 add compile-conditional rumpclient support 2010-11-11 22:56:38 +00:00
pooka
f1d4214202 Update RUMP_ACTION to use rumpclient.
The server must of course have some disks configured.  Let's say
we have this simple server with disks as a few sparse host files:

main()
{
        rump_init();
        rump_pub_etfs_register("/disk1", "./disk1.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk2", "./disk2.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk3", "./disk3.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk4", "./disk4.img", RUMP_ETFS_BLK);
        pause();
}

And we run the server:

mainbus0 (root)
Kernelized RAIDframe activated
/disk1: hostpath ./disk1.img (97 GB)
/disk2: hostpath ./disk2.img (97 GB)
/disk3: hostpath ./disk3.img (97 GB)
/disk4: hostpath ./disk4.img (97 GB)

We can then configure the raid against the server:

> ./raidctl -c theraid.conf raid0

And lo, we have evidence of a level1 raid in the server dmesg:

raid0: RAID Level 1
raid0: Components: /disk1 /disk2 /disk3 /disk4
raid0: Total Sectors: 409599744 (199999 MB)

yea, i initialized it already in a previous run:

> ./raidctl -S raid0
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
2010-11-08 12:42:35 +00:00
pooka
2ddc760fc7 Need getifaddrs() for the rump client since it executes sysctl(2) 2010-11-05 16:23:56 +00:00
pooka
08fc937c06 make sysctl(8) work as a rump client 2010-11-05 15:55:23 +00:00
pooka
7d1c54af24 adapt to new rumpclient_init() signature 2010-11-05 13:52:41 +00:00
hannken
08a60b309b File system snapshots are no longer experimental. 2010-11-05 10:02:53 +00:00
pooka
b10965b180 #ifdef variable correctly 2010-11-04 23:38:18 +00:00
pooka
243f716534 be consistent in what to leave outside of SMALL 2010-11-04 23:37:27 +00:00
pooka
ddce2e059a Support RUMP_ACTION to compile a rump kernel client. 2010-11-04 23:36:10 +00:00
pooka
23c2b7b527 Update RUMP_ACTION to use the newstyle rump client. 2010-11-04 23:31:12 +00:00
wiz
4958aa2ca5 Various improvements. 2010-10-31 11:39:46 +00:00
haad
1e89108160 Add resize_ffs tool to build, change default behaviour to grow filesystem
to device size. Add parameter -s to specify size if user want to shrink
filesystem.

Apply some KNF, remove dead unused code.

Oked by christos@.
2010-10-30 21:16:07 +00:00
martin
d524fd1707 Memcpy into local variable to ensure proper alignement.
Fixes PR port-sparc64/43965.
2010-10-13 09:19:40 +00:00
ahoka
592d1c274a Avoid NaN when calculating std-dev, which fixes a crash on VAX. 2010-09-20 11:49:48 +00:00
drochner
ebb3b30048 minimal ansification/constification 2010-09-12 16:03:39 +00:00
tsutsui
b01393af8c Add a URL of Linux Documentation "The Second Extended Filesystem." 2010-09-10 15:51:20 +00:00
pooka
e596efac61 Add -G to usage, omission pointed out by wiz. Also, make usage format
nicer on a 80col terminal.
2010-08-09 21:14:26 +00:00
wiz
ed08a55d5a Sort option descriptions. 2010-08-09 20:23:20 +00:00
pooka
f87f7774e0 Add -G, which turns consistency check errors in warnings. The
current testing purpose is to create a file system with
block size > MAXPHYS.

(the check doesn't make that much sense anyway in these days of
mobile file systems, since we're interested in MAXPHYS where we
attempt to mount the file system, not where we happen to create it)
2010-08-09 17:20:57 +00:00
pooka
83c92bb41d Make it possible to set the retry timeout as a compile-time define.
This is useful for automated environments where everything (rpcbind,
mountd, nfsd and the client) is started in parallel in a split
second and there is a small chance we will race in there before
everything has been communicated to rpcbind.
2010-07-23 19:25:23 +00:00