to prevent from accidentally loading ./module.kmod when we actually wanted to
load module from the system module area.
To load a module from a filesystem path, the module name must contain at
least on path separator character (/), to load a module from the system
module areas, the name must not contain a path separator character:
modload ./mymod.kmod # loads mymod.kmod from the curren directory
modload mymod # loads mymod.kmod from the system module area
component in a failed RAID set in order to avoid potentially configuring
RAId 1 sets with erroneous values taken from random extent data in the
replacement component partitions.
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
This should fix cross-build problems, but I can't really test
that now, so I am not re-enabling the inclusion of v7fs support
in makefs.
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.
See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
afterwards. Fixes newfs_msdos at least on sparc. Incidentally,
the msdosfs tests also start working on sparc, which about halves
the number of test failures on that platform.
"FSS_UNLINK_ON_CREATE" to unlink the backing store before
the snapshot gets created.
With this change dump(8) no longer dumps the zero-sized, but named
snapshot it is working on. Same applies to fsck_ffs(8).
for some reason. (But I have no idea why that would be -- if you have one
of these really ancient partitions and you're about to run disklabel, you
can easily run fdisk first and change the partition type to NetBSD.)
As it stands, the code will munch FreeBSD installs under some
circumstances, which is really not acceptable behavior.
The code, along with the kernel support that's been disabled by
default for several years, and some related but less dangerous code in
sysinst, should prboably be removed entirely after -6 is branched.
Discussed on tech-kern and tech-userlevel; closes PR 44496.
This is also almost certainly the cause of PR 42521 and PR 38841.
to access, manage and manipulate device-mapper driver. Which opens us bunch
of new possibilities like
dm-multipath device target
dm-crypt device target
dm-ccd compatibility layer
With this import I'm bringing in dmctl tool for working with dm driver ,too.
I plan to replace gpl2 licensed dmsetup command with our dmctl tool in near
feature. It can also by placed to /rescue where we was not able to put
dmsetup because of licensing problems.
With libdm in tree we can now write RUMP atf test suite for dm driver to
ensure LVM subsystem stability as time goes.
Reviewed by: blymn@ and rmind@
Oked: by no objections on tech-userlevel@
the following work:
mount -t tmpfs -o union tmpfs /
(some caveats are implied, such as if you "mkdir /usr" you're
screwed, but then again you'll get there with "rm -rf /usr" even
without union -- we supply rope)
per discussion with zafer, use case for jibbed
printed. There's now a lot of PRIu16 and PRIu32, some PRIu8, some
SCNu32, and a few cases where %u and %d were reversed. Multiplication
of 32-bit and 8-bit values is cast to uint64_t and printed with PRIu64.
Inspired by a report from Patrick Welche on current-users.
With the ending head set at 0xff one machine I have will never leave
the initial startup screen if such a disk is present. Additionally,
Wikipedia suggests without citiation that 254 is the maximium allowable
value for the head, and this seems to be the case.
host, and vice versa), to fix PR#44203.
Add support for growing (but not yet shrinking) UFS2 file systems. Partially
addresses PR#44205.
While I'm here, reformat the code for closer adherence to KNF.
Fairly extensive testing was performed, using the shortly-to-be-committed
updated ATF tests. Patch posted to tech-userlevel on 21 December 2010,
no comments.
unsupported, while catching up to some changes in my local tree which
will hopefully support them at some time in the future.
Also, change "device" variable to "special", to reflect the fact
that resize_ffs will work on a plain file.
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.
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.
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.
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.
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@
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>.
- 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.
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.
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.
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)
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.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.
this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.
i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.
some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
tells whether it should detect and convert to binary a hexadecimal octet
string of the form 0x0123ABab, or leave those strings undecoded.
If the argument for a 'media', 'mediamode', 'mediaopt', '-mediaopt',
'nwkey', or 'bssid' keyword is a hexadecimal octet string, do not detect
and decode it. (Note that setifnwkey decodes hexadecimal strings on its
own.)
This fixes a bug noticed by Jim Miller where the trailing zero-octets
were discarded from hexadecimal octet-string arguments for 'nwkey'.
a live file system.
While here modify snap_open() to accept a character device as its
first arg and remove now unneeded get_snap_device().
Reviewed by: Manuel Bouyer <bouyer@netbsd.org>