| Age | Commit message (Collapse) | Author |
|
filesystem. This is useful in the case where the cleaner is compiled
into code, such as rump_lfs and the ATF tests. This helps to fix
bin/54488
|
|
Reviewed by Christos
|
|
|
|
|
|
|
|
|
|
|
|
Napalm the old byteswap access logic for these.
|
|
Therefore, storing the value in the superblock and reading it out
again is silly and offers the opportunity for it to become corrupted.
So, don't do that (most of the code already didn't) and use the
existing constant instead. Initialize new 32-bit superblocks with
the value for the sake of old userland programs, but don't keep the
value in the 64-bit superblock at all.
(approved by Margo Seltzer)
|
|
This prevents regressions in the ulfs code when switching to the new
accessors. Note that while adding byteswapping to the other accessors
is straightforward, I haven't done it yet; and that also is not enough
to make LFS_EI work, because there are places lying around that bypass
the accessors for one reason and another and all of them need to be
updated. That is going to have to wait for a later day as LFS_EI is
not on the critical path right now.
|
|
(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)
|
|
This also entailed sorting out part of struct segment, as that
contains a pointer into the current FINFO data.
|
|
Also fix some of the FINFO handling as it's closely entangled.
|
|
Add and use accessors. There are also a bunch of places that cast and
I hope I've found them all...
|
|
XXX: while this is written to disk, it seems like much of it would
XXX: be better set up as a commpage shared with the cleaner.
|
|
Also make note of a cleaner limitation: it seems that when it goes to
coalesce discontiguous files, it mallocs an array with one BLOCK_INFO
for every block in the file. Therefore, with 64-bit LFS, on a 32-bit
platform it will be possible to have files large enough to overflow
the cleaner's address space. Currently these will be skipped and cause
warnings via syslog.
At some point someone should rewrite the logic to coalesce files to
use chunks of some reasonable size, as discontinuity between such
chunks is immaterial and mallocing this much space is silly and
fragile. Also, the kernel only accepts up to 65536 blocks at a time
for bmapv and markv, so processing more than this at once probably
isn't useful and may not even work currently. I don't want to change
this around just now as it's not entirely trivial.
|
|
Add pieces of support for using both superblock types where
convenient, and specifically to the superblock accessors, but don't
actually enable it anywhere.
First substantive step on PR 50000.
|
|
I thought at first maybe the cases that test the version should be
rolled into the accessors, but on the whole I think the conclusion on
that is no.
|
|
tidyups and corrections in passing.
|
|
Remove previous hacks.
|
|
(This changes the rest of the code over; all the accessors were
already added.)
The difference between this commit and the previous one is arbitrary,
but the previous one passed the regression tests on its own so I'm
keeping it separate to help with any bisections that might be needed
in the future.
|
|
superblock. This will allow switching between 32/64 bit forms on the
fly; it will also allow handling LFS_EI reasonably tidily. (That
currently doesn't work on the superblock.)
It also gets rid of cpp abuse in the form of fake structure member
macros.
Also, instead of doing sleep/wakeup on &lfs_avail and &lfs_nextseg
inside the on-disk superblock, add extra elements to the in-memory
struct lfs for this. (XXX: these should be changed to condvars, but
not right now)
XXX: this migrates a structure needed by the lfs code in libsa (struct
salfs) into lfs.h, where it doesn't belong, but for the time being
this is necessary in order to allow the accessors (and the various
lfs macros and other goop that relies on them) to compile.
|
|
|
|
|
|
This was done so that boot blocks that want to compile both FFS and LFS in
the same file work.
|
|
|
|
and will be obviously required by userland tools that need to read
the on-disk structures.
Also, DINODE{1,2}_SIZE -> LFS_DINODE{1,2}_SIZE.
|
|
|
|
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.
No functional change intended.
|
|
From NAKAJIMA Yoshihiro.
|
|
|
|
|
|
real errno was EAGAIN.
When coalescing, check against NULL to avoid seg fault.
|
|
|
|
from the mainloop.
|
|
standard installation doesn't get linked against librt or libpthread.
|
|
the main loop. This is useful for very quickly executed lfs runs
such as those in tests, as an initialization phase cleaner may
prevent file system unmount.
|
|
larger sectors than 512 Bytes.
|
|
|
|
a struct called kernelops, which contains standard system calls
for the normal case and rump system calls for the rump case.
Make it possible to run the lfs cleaner in a library fashion (taking
the quick route with the implementation).
|
|
|
|
|
|
Prevents e.g. from 5.0 cleaner looping forever against -current
lfs driver (fcntl data structure sizes are different).
|
|
* sprinkle const
* avoid tests < 0 on unsigned types
* test fwrite() returns nmemb not <0
|
|
|
|
run through copy-on-write. Call fscow_run() with valid data where possible.
The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.
- Add a flag B_MODIFY to bread(), breada() and breadn(). If set the caller
intends to modify the buffer returned.
- Always run copy-on-write on buffers returned from ffs_balloc().
- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
may clear the buffer and runs copy-on-write. Process possible errors
from getblk() or fscow_run(). Part of PR kern/38664.
Welcome to 4.99.63
Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
|
|
|
|
|
|
be resolved.
|
|
|