History log of /src/sbin/fsck_lfs/lfs.c |
Revision | | Date | Author | Comments |
1.76 |
| 12-Oct-2025 |
perseant | Look at the superblock magic number before attempting to read the address of the first alternate out of it. If the magic number doesn't match one of our known numbers, the primary is invalid and we have no way of locating an alternate. Bail out in that case.
Makes fsck_lfs work for LFS64, at least in the minimal sense of being able to report that a newly created LFS64 has no errors.
|
1.75 |
| 03-Apr-2020 |
joerg | branches: 1.75.8; Avoid common symbols for fsck_lfs.
|
1.74 |
| 12-Jun-2018 |
zafer | branches: 1.74.2; Remove duplicate assignments. Fixes PR bin/51512 by Jose Luis Rodriguez Garcia
|
1.73 |
| 10-Jun-2017 |
pgoyette | branches: 1.73.4; Update inode member i_flag --> i_state to keep up with kernel changes
|
1.72 |
| 16-Sep-2016 |
christos | branches: 1.72.6; PR/51478: Jose Luis Rodriguez Garcia: Fix leak mem fsck_lfs/lfs.c
|
1.71 |
| 20-Mar-2016 |
dholland | branches: 1.71.2; Comment out unused logic. PR 50973
|
1.70 |
| 19-Feb-2016 |
riastradh | Need <stdbool.h> for true/false.
|
1.69 |
| 15-Oct-2015 |
dholland | Enable lfs64 in fsck_lfs. (and in everything else that uses this code)
|
1.68 |
| 10-Oct-2015 |
dholland | Track down and fix two missing uses of SEGSUM_FINFOBASE().
|
1.67 |
| 03-Oct-2015 |
dholland | Drop an explicit sign-extension in fsck that shouldn't be needed any more.
|
1.66 |
| 03-Oct-2015 |
dholland | Add lfs_checkword type for reading checksum data out of structures. This is always uint32_t, but having a name for it both makes things clearer and avoids confusion about whether it should be 32 or 64 bit.
Note: deployed in only one place (that was erroneously tagged ondisk32) so far.
|
1.65 |
| 03-Oct-2015 |
dholland | Fix hardwired 32-bit stuff in fsck: - compute the maximum file size using LFS_BLKPTRSIZE() - use the new IINFO in pass 6 instead of uint32_t pointers - use accessors to read and write indirect blocks
|
1.64 |
| 03-Oct-2015 |
dholland | Apply IINFO in the other userland tools.
|
1.63 |
| 01-Sep-2015 |
dholland | Use daddr_t, not ulfs_daddr_t, as the latter's 32 bits wide. Don't use either for on-disk items. Declare external data in header files. Part 3 of 3.
|
1.62 |
| 01-Sep-2015 |
dholland | Use daddr_t, not ulfs_daddr_t, as the latter's 32 bits wide. Don't use either for on-disk items. Part 2 of 3.
|
1.61 |
| 01-Sep-2015 |
dholland | Use daddr_t, not ulfs_daddr_t, as the latter's 32 bits wide. Don't use either for on-disk items. Part 1 of 3.
|
1.60 |
| 01-Sep-2015 |
dholland | The ifile's inode number is constant. (it is always 1)
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)
|
1.59 |
| 01-Sep-2015 |
dholland | Add byteswapping to the dinode accessors.
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.
|
1.58 |
| 01-Sep-2015 |
dholland | Use the lfs dinode accessors in place of the ufs-derived ones. (Mostly.)
The ufs-derived ones are fake structure member macros, which are gross and not very safe. Also, it seems that a lot of places in the lfs code were using the ffsv1 branch of them unconditionally, and this way it's guaranteed all those places have been updated.
Found while doing this: for non-devices, have getattr produce NODEV in the rdev field instead of leaking the address of the first direct block.
|
1.57 |
| 19-Aug-2015 |
dholland | Part two of dinodes; use the same union everywhere. (previously the ufs-derived code had things set up slightly different)
Remove a bunch of associated mess.
|
1.56 |
| 12-Aug-2015 |
dholland | Hack up dinode usage to be 64 vs. 32 as needed. Part 1.
(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.)
|
1.55 |
| 12-Aug-2015 |
dholland | Provide 32-bit and 64-bit versions of FINFO.
This also entailed sorting out part of struct segment, as that contains a pointer into the current FINFO data.
|
1.54 |
| 12-Aug-2015 |
dholland | Make 32-bit and 64-bit versions of SEGSUM. Also fix some of the FINFO handling as it's closely entangled.
|
1.53 |
| 12-Aug-2015 |
dholland | Add IFILE32 and IFILE64 structures for the on-disk ifile entries. Add and use accessors. There are also a bunch of places that cast and I hope I've found them all...
|
1.52 |
| 02-Aug-2015 |
dholland | Add a (draft) 64-bit superblock. Make things build again.
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.
|
1.51 |
| 02-Aug-2015 |
dholland | Use accessor functions for the version field of the lfs superblock. 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.
|
1.50 |
| 02-Aug-2015 |
dholland | Second batch of 64 -> 32 truncations in lfs, along with more minor tidyups and corrections in passing.
|
1.49 |
| 02-Aug-2015 |
dholland | Fix assorted 64 -> 32 truncations in lfs. Also, some minor tidyups and corrections in passing.
|
1.48 |
| 28-Jul-2015 |
dholland | Add a new lfs header file: lfs_accessors.h.
This contains all the accessor functions and macros out of lfs.h. Add an include of lfs_accessors.h after all uses of lfs.h... except for code that wants to define its own struct lfs-alike that the accessors are supposed to play along with. For these, set STRUCT_LFS and include lfs_accessors.h after the necessary structure has been defined, so that lfs_accessors.h can emit functions in terms of it.
|
1.47 |
| 24-Jul-2015 |
dholland | More lfs superblock accessors. (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.
|
1.46 |
| 24-Jul-2015 |
dholland | Switch to accessor functions for elements of the LFS on-disk 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.
|
1.45 |
| 31-May-2015 |
hannken | Use VFS_PROTOS() for lfs. Rename conflicting struct lfs field "lfs_start" to "lfs_s0addr".
No functional change.
|
1.44 |
| 29-Mar-2015 |
chopps | - Fix fallout for recent bread() change (removing cred arg).
|
1.43 |
| 13-Jul-2014 |
dholland | Revert previous; it doesn't work because all the lfs tools promiscuously .PATH in each other's source files, and I haven't the time or patience to deal with it tonight.
|
1.42 |
| 12-Jul-2014 |
dholland | Remove pointless function indirection through panic_func(). It was initialized to one thing, and then set to another right at the top of main and never changed again.
|
1.41 |
| 19-Oct-2013 |
christos | branches: 1.41.2; fix unused variable warnings.
|
1.40 |
| 18-Jun-2013 |
christos | Prefix most of the cpp macros with lfs_ and LFS_ to avoid conflicts with ffs. This was done so that boot blocks that want to compile both FFS and LFS in the same file work.
|
1.39 |
| 08-Jun-2013 |
dholland | Tidy up the LFS userland build hacks. Don't use -I${NETBSDSRCDIR}/sys; don't include files other than the exported LFS headers, which are lfs.h, lfs_inode.h, and (for now) lfs_extern.h.
|
1.38 |
| 06-Jun-2013 |
dholland | Cleanups and hacks to make lfs userland stuff build: - lfs_cksum.c doesn't actually need ulfs_inode.h any more. - neither does lfs_itimes.c. - add hacks to fsck_lfs to make it compile. - add hacks to newfs_lfs to make it compile. - fix warning in ulfs_quota.c when quotas are fully disabled (as I guess is happening with the rumpity version)
XXX: This commit adds -I${NETBSDSRCDIR}/sys to the Makefiles for XXX: fsck_lfs, newfs_lfs, and lfs_cleanerd. This needs to be cleaned XXX: up ASAP; but I consider this less problematic in the short term XXX: than spewing ulfs_*.h into /usr/include.
|
1.37 |
| 06-Jun-2013 |
dholland | ufs -> ulfs for fsck_lfs.
|
1.36 |
| 22-Jan-2013 |
dholland | Stuff UFS_ in front of a few of ufs's symbols to reduce namespace 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.
|
1.35 |
| 12-Jul-2011 |
dholland | branches: 1.35.2; 1.35.8; Don't need to initialize (one of) the elements now in i_crap; nothing in here touches that material.
|
1.34 |
| 21-Jun-2011 |
mrg | avoid code that looks like this: x = x = y; since GCC 4.5 complains about it having sequence point issues.
|
1.33 |
| 21-Feb-2010 |
mlelstv | branches: 1.33.4; dev_bsize wasn't initialized. The actual value doesn't matter since the same value is used to compute byte offsets into the special file but a value of zero causes a division by zero.
|
1.32 |
| 16-Feb-2010 |
mlelstv | Three changes in a single commit.
- drop the notion of frags (LFS fragments) vs fsb (FFS fragments) The code uses a complicated unity function that just makes the code difficult to understand.
- support larger sector sizes. Fix disk address computations to use DEV_BSIZE in the kernel as required by device drivers and to use sector sizes in userland.
- Fix several locking bugs in lfs_bio.c and lfs_subr.c.
|
1.31 |
| 06-Aug-2009 |
pooka | Define syscalls of lfs userspace tools (cleaner, mainly) through 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).
|
1.30 |
| 22-Feb-2009 |
ad | PR kern/26878 FFSv2 + softdep = livelock (no free ram) PR kern/16942 panic with softdep and quotas PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch PR kern/26274 softdep panic: allocdirect_merge: ... PR kern/26374 Long delay before non-root users can write to softdep partitions PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk PR kern/31981 stopping scsi disk can cause panic (softdep) PR kern/32116 kernel panic in softdep (assertion failure) PR kern/32532 softdep_trackbufs deadlock PR kern/37191 softdep: locking against myself PR kern/40474 Kernel panic after remounting raid root with softdep
Retire softdep, pass 2. As discussed and later formally announced on the mailing lists.
|
1.29 |
| 16-May-2008 |
hannken | branches: 1.29.4; Make sure all cached buffers with valid, not yet written data have been 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>
|
1.28 |
| 28-Apr-2008 |
martin | branches: 1.28.2; Remove clause 3 and 4 from TNF licenses
|
1.27 |
| 08-Oct-2007 |
ad | branches: 1.27.8; 1.27.10; Give brelse() a second argument so that it matches the kernel. fsck_lfs now compiles again.
|
1.26 |
| 09-Nov-2006 |
christos | branches: 1.26.8; Fix malloc/realloc/calloc issues: always check and exit, use EEXIT instead of 8.
|
1.25 |
| 01-Sep-2006 |
perseant | Several fixes to improve the reliability of the roll-forward agent. Also, note "properly orphaned" files as distinct from corrupted files.
|
1.24 |
| 18-Jul-2006 |
perseant | Various improvements to fsck_lfs, to wit:
* Add lfs_balloc capability to the lfs library. * Extend the Ifile if we run out of free inodes when creating lost+found. * Don't roll forward if we have allocated a lost+found, to avoid conflicts when adding new files in roll-forward. * Make some messages slightly more verbose (e.g. include inode number, and use pwarn() instead of printf() so the messages include the device name when preening). * Change superblock detection/avoidance to use the offset table in the primary superblock, rather than looking at the contents. * Be more verbose about various operations when passed the -d flag, especially roll-forward. * Be more careful about dirops during roll forward, since the cleaner can sometimes write blocks from dirop vnodes. Detect and avoid this problem. * Always check the free list, even if given -i; if we're going to write it we have to check it first. * Mark inodes dirty when blocks are found during roll forward, so the inodes are written with the new block locations. * Update size of inodes if blocks beyond EOF are found during roll forward. * Fix segment accounting for blocks and inodes found during roll forward. * Report statistics on roll forward: how many new/deleted/moved files and how many updated blocks (or "nothing new"). * Don't care if the device being checked is really a device, if we have been passed the -f flag (to facilitate automated testing). * When writing to the disk, use the current time in the segment headers rathern than time 0. * When passed the -i flag, locate the partial segment containing the Ifile inode and use that to calculate lfs_offset, lfs_curseg, lfs_nextseg. (Again for automated testing.)
|
1.23 |
| 05-Jun-2006 |
christos | fsck_lfs does not us fsutil.c; perhaps it should? revert to perror for now.
|
1.22 |
| 05-Jun-2006 |
christos | s/perror/perr
|
1.21 |
| 17-Apr-2006 |
perseant | Remove the free list ordering/disordering code, since the kernel now keeps the list in order (ordering it on mount).
Regularize error messages: these are now all in ALL CAPS, with all hex numbers (not reported in caps) prefixed by 0x. (The non-fsck-specific messages are an exception to this all-caps rule.)
|
1.20 |
| 17-Mar-2006 |
rumble | Check for allocation failures in malloc, calloc, realloc, asprintf, and vasprintf and try to handle them.
|
1.19 |
| 13-Oct-2005 |
jmc | Put back removed initializer. gcc on sh3 still doesn't get it correct...
|
1.18 |
| 08-Oct-2005 |
chs | avoid the need for a bogus initializer.
|
1.17 |
| 13-Sep-2005 |
christos | rename lfs.h to lfs_user.h so that it does not conflict.
|
1.16 |
| 08-Jun-2005 |
perseant | Use the correct method to create a new inode, when we allocate lost+found.
Correct uninitialized variable issues in pass6.c and dir.c (PR#30411 and PR#30394, respectively).
|
1.15 |
| 07-Jun-2005 |
he | Initialize metalbn in ufs_getlbns to appease -Wuninitialized. Marked with XXXGCC for dreamcast (found while compiling for it).
Reviewed by lukem.
|
1.14 |
| 02-Jun-2005 |
lukem | appease gcc -Wuninitialized
|
1.13 |
| 23-May-2005 |
perseant | Check some error conditions that would otherwise cause fsck_lfs to dump core. Pointed out by Pavel Cahyna in a follow-on to PR #29151.
|
1.12 |
| 23-Apr-2005 |
perseant | Check parts of pass 5 even if only rolling forward. We can't check the true segment holdings against the blocks held by the inodes, but we can still check the cleanerinfo data against the segment table.
|
1.11 |
| 12-Apr-2005 |
martin | When creating an int hash value from pointer, go via intptr_t. Fixes PR 29953.
|
1.10 |
| 11-Apr-2005 |
perseant | Be more efficient with the hash tables for the buffer and vnode caches.
Note that roll-forward can add more inodes to the filesystem; don't overflow the tables but reallocate them.
|
1.9 |
| 25-Mar-2005 |
perseant | "#define lfs_devvp lfs_unlockvp" for readability, since that's what we use it for in fsck_lfs/newfs_lfs.
|
1.8 |
| 26-Feb-2005 |
perseant | branches: 1.8.2; Various minor LFS improvements:
* Extend the lfs library from fsck_lfs(8) so that it can be used with a not-yet-existent LFS. Make newfs_lfs(8) use this library, so it can create LFSs whose Ifile is larger than one segment. * Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8). * Make fsck_lfs(8) respect the "file system is clean" flag. * Don't let fsck_lfs(8) think it has dirty blocks when invoked with the -n flag.
|
1.7 |
| 07-Aug-2003 |
agc | branches: 1.7.4; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
|
1.6 |
| 12-Jul-2003 |
yamt | in lfs_raw_vget(), - don't leave references into free'ed memory region. (fix SIGBUSes) - plug a memory leak.
|
1.5 |
| 12-Jul-2003 |
yamt | - don't assume that malloc'ed memory is zero-filled. - LIST_INIT {dirty,clean} block lists.
|
1.4 |
| 12-Jul-2003 |
yamt | only read superblock (ie. struct dlfs) from disk and initialize rest of struct lfs by hand. (this shouldn't cause a real problem since if superblock is valid, LFS_SBPAD-sizeof(struct dlfs) bytes after it is always zero-filled, though)
PR/22123 (Izumi Tsutsui)
|
1.3 |
| 08-May-2003 |
petrov | Fix format string. (no % in PRIx..).
|
1.2 |
| 02-Apr-2003 |
fvdl | Add support for UFS2. UFS2 is an enhanced FFS, adding support for 64 bit block pointers, extended attribute storage, and a few other things.
This commit does not yet include the code to manipulate the extended storage (for e.g. ACLs), this will be done later.
Originally written by Kirk McKusick and Network Associates Laboratories for FreeBSD.
|
1.1 |
| 28-Mar-2003 |
perseant | Add working writing ability to fsck_lfs, including roll-forward, based on a partial-segment writer ported from the kernel.
|
1.7.4.1 |
| 10-May-2005 |
riz | Pull up the following revisions (requested by perseant in ticket #1281):
1.8 sys/ufs/lfs/TODO 1.75 sys/ufs/lfs/lfs.h (via patch) 1.74 sys/ufs/lfs/lfs_alloc.c (via patch) 1.49, 1.51 sys/ufs/lfs/lfs_balloc.c (1.51 via patch) 1.78 sys/ufs/lfs/lfs_bio.c 1.62 sys/ufs/lfs/lfs_extern.h (via patch) 1.156 sys/ufs/lfs/lfs_segment.c (via patch) 1.48 sys/ufs/lfs/lfs_subr.c 1.101 sys/ufs/lfs/lfs_syscalls.c 1.163 sys/ufs/lfs/lfs_vfsops.c (via patch) 1.134 sys/ufs/lfs/lfs_vnops.c (via patch) 1.61 sys/ufs/ufs/ufs_readwrite.c (via patch)
1.20 libexec/lfs_cleanerd/clean.h (via patch) 1.52 libexec/lfs_cleanerd/cleanerd.c (via patch) 1.41 libexec/lfs_cleanerd/library.c (via patch)
1.4 regress/sys/fs/lfs/newfs_fsck/Makefile 1.2 regress/sys/fs/lfs/newfs_fsck/mkfs_mount 1.2 regress/sys/fs/lfs/newfs_fsck/smallfiles 1.3 sbin/fsck_lfs/bufcache.c 1.3 sbin/fsck_lfs/bufcache.h 1.3 sbin/fsck_lfs/lfs.h 1.8 sbin/fsck_lfs/lfs.c (via patch) 1.8 sbin/fsck_lfs/pass3.c (via patch) 1.18 sbin/fsck_lfs/pass0.c (via patch) 1.18 sbin/fsck_lfs/utilities.c (via patch) 1.7 sbin/fsck_lfs/segwrite.c 1.19 sbin/fsck_lfs/setup.c (via patch) 1.3 sbin/newfs_lfs/Makefile 0 sbin/newfs_lfs/lfs.c (yes, remove it) 1.1 sbin/newfs_lfs/make_lfs.c 1.15 sbin/newfs_lfs/newfs.c (via patch)
Various minor LFS improvements.
Kernel:
* Note when lfs_putpages(9) thinks it is not going to be writing any pages before calling genfs_putpages(9). This prevents a situation in which blocks can be queued for writing without a segment header. * Correct computation of NRESERVE(), though it is still a gross overestimate in most cases. Note that if NRESERVE() is too high, it may be impossible to create files on the filesystem. We catch this case on filesystem mount and refuse to mount r/w. * Allow filesystems to be mounted whose block size is == MAXBSIZE. * Somewhere along the line, ufs_bmaparray(9) started mangling UNWRITTEN entries in indirect blocks again, triggering a failed assertion "daddr <= LFS_MAX_DADDR". Explicitly convert to and from int32_t to correct this. Should fix PR #29045. * Add a high-water mark for the number of dirty pages any given LFS can hold before triggering a flush. This is settable by sysctl, but off (zero) by default. * Be more careful about the MAX_BYTES and MAX_BUFS computations so we shouldn't see "please increase to at least zero" messages. * Note that VBLK and VCHR vnodes can have nonzero values in di_db[0] even though their v_size == 0. Don't panic when we see this. Fixes PR #26680. * Change lfs_bfree to a signed quantity. The manner in which it is processed before being passed to the cleaner means that sometimes it may drop below zero, and the cleaner must be aware of this. * Never report bfree < 0 (or higher than lfs_dsize) through lfs_statfs(9). This prevents df(1) from ever telling us that our full filesystems have 16TB free. * Account space allocated through lfs_balloc(9) that does not have associated buffer headers, so that the pagedaemon doesn't run us out of segments. * Return ENOSPC from lfs_balloc(9) when bfree drops to zero. * Address a deadlock in lfs_bmapv/lfs_markv when the filesystem is being unmounted. Because vfs_busy() is a shared lock, and lfs_bmapv/lfs_markv mark the filesystem vfs_busy(), the cleaner can be holding the lock that umount() is blocking on, then try to vfs_busy() again in getnewvnode().
cleaner:
* Adapt lfs_cleanerd to use the fcntl call to get the Ifile filehandle, so it need not be in the namespace. * Make lfs_cleanerd be more careful when there are very few available segments. * Make lfs_cleanerd less verbose when the filesystem is unmounted.
newfs_lfs, fsck_lfs, and regression:
* Extend the lfs library from fsck_lfs(8) so that it can be used with a not-yet-existent LFS. Make newfs_lfs(8) use this library, so it can create LFSs whose Ifile is larger than one segment. Addresses PR #11110. * Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8). * Make fsck_lfs(8) respect the "file system is clean" flag. * Don't let fsck_lfs(8) think it has dirty blocks when invoked with the -n flag. * Remove the Ifile from the filesystem namespace. The cleaner now uses a fcntl call on the root inode to find the Ifile filehandle. (As a side-effect, addresses PR #29144.)
|
1.8.2.1 |
| 07-May-2005 |
tron | Apply patch (requested by perseant in ticket #242): * fsck_lfs buffer cache fixes, including PR #29151 * Change fsck_lfs phase 0 message to reflect reality * fsck_lfs: check phase 5 (cleanerinfo accounting) even on roll-forward * Keep better track of the free list during roll-forward, avoiding a core dump * Improve hash table use for fsck_lfs buffer and vnode cache * Document fsck_lfs flag -f, and implement -q * Add resize_lfs, including kernel support * Add LFS to mountd's list of exportable filesystem types * Make the LFS lkm work again [christos@] * Add MP locking to the LFS kernel subsystem * Fix pager_map deadlock in lfs_putpages() * Avoid incomplete file extension that looks like "partial truncation" to fsck * Use lfs_malloc for cleaner malloc, since the cleaner often runs in low-memory conditions. * Use splay trees, not hash table, to track page allocation for write. * Fix mkdir panic on full fs * Fix page accounting leak by counting differently. * Use rightly named structure for lfs_getattr [skrll@] * Cosmetic changes for readability.
|
1.26.8.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.27.10.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.27.8.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.28.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.29.4.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.33.4.1 |
| 23-Jun-2011 |
cherry | Catchup with rmind-uvmplock merge.
|
1.35.8.3 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.35.8.2 |
| 23-Jun-2013 |
tls | resync from head
|
1.35.8.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.35.2.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.35.2.1 |
| 23-Jan-2013 |
yamt | sync with head
|
1.41.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.71.2.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|
1.72.6.1 |
| 30-Oct-2017 |
snj | Pull up following revision(s) (requested by maya in ticket #330): sbin/fsck_lfs/inode.c: 1.69 sbin/fsck_lfs/lfs.c: 1.73 sbin/fsck_lfs/pass6.c: 1.50 sbin/fsck_lfs/segwrite.c: 1.46 sys/ufs/lfs/lfs.h: 1.202-1.203 sys/ufs/lfs/lfs_accessors.h: 1.48 sys/ufs/lfs/lfs_alloc.c: 1.136-1.137 sys/ufs/lfs/lfs_balloc.c: 1.94 sys/ufs/lfs/lfs_bio.c: 1.141 sys/ufs/lfs/lfs_extern.h: 1.113 sys/ufs/lfs/lfs_inode.c: 1.156-1.157 sys/ufs/lfs/lfs_inode.h: 1.20, 1.21, 1.23 sys/ufs/lfs/lfs_itimes.c: 1.20 sys/ufs/lfs/lfs_pages.c: 1.13-1.15 sys/ufs/lfs/lfs_rename.c: 1.22 sys/ufs/lfs/lfs_segment.c: 1.270-1.275 sys/ufs/lfs/lfs_subr.c: 1.94-1.97 sys/ufs/lfs/lfs_syscalls.c: 1.175 sys/ufs/lfs/lfs_vfsops.c: 1.360 sys/ufs/lfs/lfs_vnops.c: 1.316-1.321 sys/ufs/lfs/ulfs_inode.c: 1.20 sys/ufs/lfs/ulfs_inode.h: 1.24 sys/ufs/lfs/ulfs_lookup.c: 1.41 sys/ufs/lfs/ulfs_quota2.c: 1.31 sys/ufs/lfs/ulfs_readwrite.c: 1.24 sys/ufs/lfs/ulfs_vnops.c: 1.49-1.50 Update inode member i_flag --> i_state to keep up with kernel changes Move definition of IN_ALLMOD near the flag it's a mask for. Now we can see that it doesn't match all the flags, but changing that will require more careful thought. Correct confusion between i_flag and i_flags These will have to be renamed. Spotted by Riastradh, thanks! Add an XXX about the missing flags so it's not buried in a commit message. now the XXX count for LFS is 260 Rename i_flag to i_state. The similarity to i_flags has previously caused errors. Use continue to denote the no-op loop to match netbsd style newline for extra clarity. It isn't safe to drain dirops with seglock held, it'll deadlock if there are any dirops. drain before grabbing seglock. lfs_dirops == 0 is always true (as we already drained dirops), so omit that part of the comparison. Fixes a lot of LFS deadlocks. PR kern/52301 Many thanks to dholland for help analyzing coredumps Ifdef out KDASSERT which fires on my machine. Deduplicate sanity check that seglock is held on segunlock Revert r1.272 fix to PR kern/52301, the performance hit is making things unusable. change lfs_nextsegsleep and lfs_allclean_wakeup to use condvar XXX had to use lfs_lock in lfs_segwait, removed kernel_lock, is this appropriate? fix buffer overflow/KASSERT when cookies are supplied lfs no longer uses the ffs-style struct direct, use the correct minimum size from dholland XXX more wrong Consistently use {,UN}MARK_VNODE macros rather than function calls. Not much point doing anything after a panic call Ask some question about the code in a XXX comment XXX question our double-flushing of dirops Fix typo in comment
|
1.73.4.1 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.74.2.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.75.8.2 |
| 06-Sep-2025 |
perseant | Separate buffer cache code between fsck_lfs and fsck_exfatfs. This may be reunited later, probably as a library.
|
1.75.8.1 |
| 29-Jun-2024 |
perseant | Implementation of exFAT filesystem, with compilation conditional on MKEXFATFS make variable.
|