Up to [cvs.NetBSD.org] / src / sbin / fsck_lfs
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.36.16.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:18 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.36: +1 -4
lines
Diff to previous 1.36 (colored) next main 1.37 (colored)
Merge changes from current as of 20200406
Revision 1.37 / (download) - annotate - [select for diffs], Fri Apr 3 19:36:33 2020 UTC (3 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
netbsd-10-base,
netbsd-10,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x,
HEAD
Changes since 1.36: +1 -4
lines
Diff to previous 1.36 (colored)
Avoid common symbols for fsck_lfs.
Revision 1.36 / (download) - annotate - [select for diffs], Tue Sep 1 06:15:02 2015 UTC (7 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
phil-wifi-20191119,
phil-wifi-20190609,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-9-base,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
netbsd-8-base,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
is-mlppp-base,
is-mlppp,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.35: +1 -2
lines
Diff to previous 1.35 (colored)
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.
Revision 1.35 / (download) - annotate - [select for diffs], Mon Aug 3 04:16:10 2015 UTC (7 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.34: +3 -3
lines
Diff to previous 1.34 (colored)
Use intmax_t to print daddr_t; from sevan@.
Revision 1.34 / (download) - annotate - [select for diffs], Sun Aug 2 18:14:16 2015 UTC (7 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.33: +3 -3
lines
Diff to previous 1.33 (colored)
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.
Revision 1.33 / (download) - annotate - [select for diffs], Sun Aug 2 18:08:12 2015 UTC (7 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.32: +9 -9
lines
Diff to previous 1.32 (colored)
Fix assorted 64 -> 32 truncations in lfs. Also, some minor tidyups and corrections in passing.
Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 28 05:09:34 2015 UTC (7 years, 10 months ago) by dholland
Branch: MAIN
Changes since 1.31: +2 -1
lines
Diff to previous 1.31 (colored)
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.
Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 24 06:59:32 2015 UTC (7 years, 10 months ago) by dholland
Branch: MAIN
Changes since 1.30: +19 -19
lines
Diff to previous 1.30 (colored)
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.
Revision 1.30 / (download) - annotate - [select for diffs], Fri Jul 24 06:56:41 2015 UTC (7 years, 10 months ago) by dholland
Branch: MAIN
Changes since 1.29: +16 -15
lines
Diff to previous 1.29 (colored)
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.
Revision 1.29 / (download) - annotate - [select for diffs], Sun May 31 15:44:30 2015 UTC (7 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.28: +4 -4
lines
Diff to previous 1.28 (colored)
Use VFS_PROTOS() for lfs. Rename conflicting struct lfs field "lfs_start" to "lfs_s0addr". No functional change.
Revision 1.24.20.1 / (download) - annotate - [select for diffs], Thu May 22 11:37:28 2014 UTC (9 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.24: +16 -18
lines
Diff to previous 1.24 (colored) next main 1.25 (colored)
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")
Revision 1.24.26.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:28:51 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.24: +16 -18
lines
Diff to previous 1.24 (colored) next main 1.25 (colored)
resync from head
Revision 1.28 / (download) - annotate - [select for diffs], Tue Jun 18 18:18:58 2013 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Changes since 1.27: +15 -15
lines
Diff to previous 1.27 (colored)
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.
Revision 1.27 / (download) - annotate - [select for diffs], Sat Jun 8 02:16:03 2013 UTC (9 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.26: +2 -5
lines
Diff to previous 1.26 (colored)
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.
Revision 1.26 / (download) - annotate - [select for diffs], Thu Jun 6 00:54:49 2013 UTC (9 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.25: +3 -2
lines
Diff to previous 1.25 (colored)
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.
Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 6 00:52:50 2013 UTC (9 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.24: +4 -4
lines
Diff to previous 1.24 (colored)
ufs -> ulfs for fsck_lfs.
Revision 1.23.8.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:21:21 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23: +1 -8
lines
Diff to previous 1.23 (colored) next main 1.24 (colored)
Sync with HEAD.
Revision 1.23.10.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:51 2008 UTC (15 years ago) by yamt
Branch: yamt-pf42
Changes since 1.23: +1 -8
lines
Diff to previous 1.23 (colored) next main 1.24 (colored)
sync with head.
Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:08 2008 UTC (15 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pagecache-tag8,
yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-revivesa,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
mjf-devfs2-base,
matt-premerge-20091211,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-premerge-20101231,
matt-mips64-base2,
jym-xensuspend-nbase,
jym-xensuspend-base,
jym-xensuspend,
hpcarm-cleanup-nbase,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2,
agc-symver-base,
agc-symver
Branch point for: yamt-pagecache,
tls-maxphys
Changes since 1.23: +1 -8
lines
Diff to previous 1.23 (colored)
Remove clause 3 and 4 from TNF licenses
Revision 1.22.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:12:35 2007 UTC (15 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.22: +2 -2
lines
Diff to previous 1.22 (colored) next main 1.23 (colored)
sync with HEAD
Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 8 21:39:49 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base,
mjf-devfs-base,
mjf-devfs,
matt-armv6-nbase,
matt-armv6-base,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-base,
cube-autoconf-base,
cube-autoconf
Branch point for: yamt-pf42,
mjf-devfs2
Changes since 1.22: +2 -2
lines
Diff to previous 1.22 (colored)
Give brelse() a second argument so that it matches the kernel. fsck_lfs now compiles again.
Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 16 03:21:34 2006 UTC (16 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4,
matt-mips64-base,
matt-mips64,
hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.21: +3 -3
lines
Diff to previous 1.21 (colored)
comment out/delete impossible code
Revision 1.21 / (download) - annotate - [select for diffs], Fri Sep 1 19:52:48 2006 UTC (16 years, 8 months ago) by perseant
Branch: MAIN
Changes since 1.20: +3 -4
lines
Diff to previous 1.20 (colored)
Several fixes to improve the reliability of the roll-forward agent. Also, note "properly orphaned" files as distinct from corrupted files.
Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 13 22:18:09 2006 UTC (16 years, 9 months ago) by bjh21
Branch: MAIN
Changes since 1.19: +3 -3
lines
Diff to previous 1.19 (colored)
Fix typos in messages: SHOULE -> SHOULD
Revision 1.19 / (download) - annotate - [select for diffs], Tue Jul 18 23:37:13 2006 UTC (16 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base,
abandoned-netbsd-4
Changes since 1.18: +2 -2
lines
Diff to previous 1.18 (colored)
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.)
Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 17 19:05:16 2006 UTC (17 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.17: +19 -18
lines
Diff to previous 1.17 (colored)
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.)
Revision 1.17 / (download) - annotate - [select for diffs], Tue Sep 13 04:14:17 2005 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.16: +2 -2
lines
Diff to previous 1.16 (colored)
rename lfs.h to lfs_user.h so that it does not conflict.
Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sat May 7 11:21:29 2005 UTC (18 years ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0
Changes since 1.14: +11 -6
lines
Diff to previous 1.14 (colored) next main 1.15 (colored)
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.
Revision 1.16 / (download) - annotate - [select for diffs], Sat Apr 23 20:21:03 2005 UTC (18 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.15: +10 -7
lines
Diff to previous 1.15 (colored)
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.
Revision 1.15 / (download) - annotate - [select for diffs], Mon Apr 11 23:19:24 2005 UTC (18 years, 1 month ago) by perseant
Branch: MAIN
Changes since 1.14: +3 -1
lines
Diff to previous 1.14 (colored)
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.
Revision 1.14 / (download) - annotate - [select for diffs], Wed Jan 19 19:41:59 2005 UTC (18 years, 4 months ago) by xtraeme
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.13: +2 -2
lines
Diff to previous 1.13 (colored)
ANSIfy, WARNS=2
Revision 1.13 / (download) - annotate - [select for diffs], Fri May 14 10:41:12 2004 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.12: +3 -5
lines
Diff to previous 1.12 (colored)
pass5: dereference of an uninitialized pointer.
Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 28 08:09:54 2003 UTC (20 years, 2 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2-0,
netbsd-2
Changes since 1.11: +94 -71
lines
Diff to previous 1.11 (colored)
Add working writing ability to fsck_lfs, including roll-forward, based on a partial-segment writer ported from the kernel.
Revision 1.11 / (download) - annotate - [select for diffs], Sun Feb 23 04:32:05 2003 UTC (20 years, 3 months ago) by perseant
Branch: MAIN
Changes since 1.10: +5 -3
lines
Diff to previous 1.10 (colored)
Make the "-O" (start filesystem offset) flag to newfs_lfs work correctly, and update fsck_lfs and dumplfs to deal with it. Note that while the argument to -O is given in disk sectors, it must be a multiple of the fragment size, and although it can be lower than the label or superblock, it can't intersect either.
Revision 1.9.2.1 / (download) - annotate - [select for diffs], Sun Jun 2 15:28:13 2002 UTC (20 years, 11 months ago) by tv
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001
Changes since 1.9: +2 -1
lines
Diff to previous 1.9 (colored) next main 1.10 (colored)
Pull up revision 1.10 (requested by perseant in ticket #131): Re-checksum the superblock whenever it is marked dirty. Tested on alpha.
Revision 1.10 / (download) - annotate - [select for diffs], Thu May 23 04:05:11 2002 UTC (21 years ago) by perseant
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.9: +2 -1
lines
Diff to previous 1.9 (colored)
Re-checksum the superblock whenever it is marked dirty. Tested on alpha.
Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 13 20:30:19 2001 UTC (21 years, 10 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6
Changes since 1.8: +29 -16
lines
Diff to previous 1.8 (colored)
Merge the short-lived perseant-lfsv2 branch into the trunk. Kernels and tools understand both v1 and v2 filesystems; newfs_lfs generates v2 by default. Changes for the v2 layout include: - Segments of non-PO2 size and arbitrary block offset, so these can be matched to convenient physical characteristics of the partition (e.g., stripe or track size and offset). - Address by fragment instead of by disk sector, paving the way for non-512-byte-sector devices. In theory fragments can be as large as you like, though in reality they must be smaller than MAXBSIZE in size. - Use serial number and filesystem identifier to ensure that roll-forward doesn't get old data and think it's new. Roll-forward is enabled for v2 filesystems, though not for v1 filesystems by default. - The inode free list is now a tailq, paving the way for undelete (undelete is not yet implemented, but can be without further non-backwards-compatible changes to disk structures). - Inode atime information is kept in the Ifile, instead of on the inode; that is, the inode is never written *just* because atime was changed. Because of this the inodes remain near the file data on the disk, rather than wandering all over as the disk is read repeatedly. This speeds up repeated reads by a small but noticeable amount. Other changes of note include: - The ifile written by newfs_lfs can now be of arbitrary length, it is no longer restricted to a single indirect block. - Fixed an old bug where ctime was changed every time a vnode was created. I need to look more closely to make sure that the times are only updated during write(2) and friends, not after-the-fact during a segment write, and certainly not by the cleaner.
Revision 1.8.2.2 / (download) - annotate - [select for diffs], Mon Jul 2 17:48:13 2001 UTC (21 years, 11 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.8.2.1: +17 -13
lines
Diff to previous 1.8.2.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)
Change disk addressing unit to be the fragment, instead of the disk sector. All quantities in the superblock, inodes, indirect blocks, etc. refer now to this abstract unit (called "fsb" as it is in FFS) instead of disk sectors; as a consequence segment summary blocks have to be multiples of a fragment in size. In v1 filesystems, compatibility code ensures that 1 fsb == 1 sector, regardless of fragment size. Fragments can now range in size between 512 and 32k; in the event that LFS_LABELPAD (8k) is smaller than the disk address unit size, an extra proto-superblock is kept at 8k from the beginning of the disk, to be used *only* to locate the real superblocks. (Not all of the userland knows about this yet.) Almost all of this was done not by me, but by joff.
Revision 1.8.2.1 / (download) - annotate - [select for diffs], Wed Jun 27 03:49:41 2001 UTC (21 years, 11 months ago) by perseant
Branch: perseant-lfsv2
Changes since 1.8: +22 -13
lines
Diff to previous 1.8 (colored)
Import of what I've been calling "LFSv2", that is, LFS with some features added that require changes to the on-disk data structures. These include: - 64-bit time in everything but inodes - User-specified segment offset, and segment size no longer restricted to PO2. - Serial number on segment summaries in addition to timestamp, and a new volume identifier, to make roll-forward feasible without fear of finding old data and thinking it was new. Although I think this version works at least as well as what's on the trunk, we're not done yet; hence this commit is going in on a branch and not on the trunk. Enhancements that are not here yet include fragment addressing, like FFS does, instead of block addressing.
Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Feb 3 21:45:40 2001 UTC (22 years, 3 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001
Changes since 1.5.2.1: +24 -1
lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)
Pull up revisions 1.7-1.8 (requested by perseant): Report/fix lfs_nclean inconsistencies. Report/fix lfs_dmeta inconsistencies.
Revision 1.8 / (download) - annotate - [select for diffs], Tue Nov 21 06:24:26 2000 UTC (22 years, 6 months ago) by perseant
Branch: MAIN
CVS Tags: perseant-lfsv2-base
Branch point for: perseant-lfsv2
Changes since 1.7: +13 -1
lines
Diff to previous 1.7 (colored)
Check/fix accounting of lfs_dmeta. Patch from Jesse Off <joff@gci-net.com> (PR #11534).
Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 13 00:30:48 2000 UTC (22 years, 6 months ago) by perseant
Branch: MAIN
Changes since 1.6: +12 -1
lines
Diff to previous 1.6 (colored)
Report, and detect and correct inconsistencies in, the number of clean segments. Patches from Jesse Off <joff@gci-net.com> (PR #11470).
Revision 1.5.2.1 / (download) - annotate - [select for diffs], Thu Sep 14 18:53:21 2000 UTC (22 years, 8 months ago) by perseant
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE,
netbsd-1-5-BETA2,
netbsd-1-5-BETA
Changes since 1.5: +39 -1
lines
Diff to previous 1.5 (colored)
Pull up LFS userland changes to correspond with the previous commit's kernel changes (approved by thorpej): [basesrc/libexec/lfs_cleanerd:] cleanerd.c, 1.20--1.22 (MIN_FREE_SEG -> lfs_minfreeseg ; read bfree/avail from CLEANERINFO ; changes to definition of -n and -b) lfs_cleanerd.8, 1.7 (update man page to current behavior) library.c, 1.16 (fix comment) [basesrc/sbin/fsck_lfs:] pass5.c, 1.6 (calculate/fix lfs_avail and lfs_bfree) [basesrc/sbin/newfs_lfs:] config.h, 1.2--1.5 (MINFREE=20, remove FFS cruft ; add DFL_MIN_FREE_SEGS=8 and MINFREE=10 ; set DFL_MIN_FREE_SEGS=10 ; set DFL_MIN_FREE_SEGS=20) extern.h, 1.2 (correct function declaration for make_lfs) newfs.c, 1.4 (add -M flag) lfs.c, 1.13--1.14, 1.16--1.18 (change lfs_bfree initialization ; MIN_FREE_SEG -> lfs_minfreeseg ; only 10 superblocks and print nicely ; correct init calculation of lfs_bfree/lfs_avail to allow fs to fill ; make -N dtrt) [basesrc/sbin/mount_lfs:] mount_lfs.8, 1.7 (document -N, -b flags) mount_lfs.c, 1.10 (default cleanerd to -b -n 4; add -N, -b flags) [basesrc/usr.sbin/dumplfs:] dumplfs.c, 1.15 (print only the SEGUSEs specified with -s)
Revision 1.6 / (download) - annotate - [select for diffs], Sat Sep 9 04:49:56 2000 UTC (22 years, 8 months ago) by perseant
Branch: MAIN
Changes since 1.5: +39 -1
lines
Diff to previous 1.5 (colored)
Various bug-fixes to LFS, to wit: Kernel: * Add runtime quantity lfs_ravail, the number of disk-blocks reserved for writing. Writes to the filesystem first reserve a maximum amount of blocks before their write is allowed to proceed; after the blocks are allocated the reserved total is reduced by a corresponding amount. If the lfs_reserve function cannot immediately reserve the requested number of blocks, the inode is unlocked, and the thread sleeps until the cleaner has made enough space available for the blocks to be reserved. In this way large files can be written to the filesystem (or, smaller files can be written to a nearly-full but thoroughly clean filesystem) and the cleaner can still function properly. * Remove explicit switching on dlfs_minfreeseg from the kernel code; it is now merely a fs-creation parameter used to compute dlfs_avail and dlfs_bfree (and used by fsck_lfs(8) to check their accuracy). Its former role is better assumed by a properly computed dlfs_avail. * Bounds-check inode numbers submitted through lfs_bmapv and lfs_markv. This prevents a panic, but, if the cleaner is feeding the filesystem the wrong data, you are still in a world of hurt. * Cleanup: remove explicit references of DEV_BSIZE in favor of btodb()/dbtob(). lfs_cleanerd: * Make -n mean "send N segments' blocks through a single call to lfs_markv". Previously it had meant "clean N segments though N calls to lfs_markv, before looking again to see if more need to be cleaned". The new behavior gives better packing of direct data on disk with as little metadata as possible, largely alleviating the problem that the cleaner can consume more disk through inefficient use of metadata than it frees by moving dirty data away from clean "holes" to produce entirely clean segments. * Make -b mean "read as many segments as necessary to write N segments of dirty data back to disk", rather than its former meaning of "read as many segments as necessary to free N segments worth of space". The new meaning, combined with the new -n behavior described above, further aids in cleaning storage efficiency as entire segments can be written at once, using as few blocks as possible for segment summaries and inode blocks. * Make the cleaner take note of segments which could not be cleaned due to error, and not attempt to clean them until they are entirely free of dirty blocks. This prevents the case in which a cleanerd running with -n 1 and without -b (formerly the default) would spin trying repeatedly to clean a corrupt segment, while the remaining space filled and deadlocked the filesystem. * Update the lfs_cleanerd manual page to describe all the options, including the changes mentioned here (in particular, the -b and -n flags were previously undocumented). fsck_lfs: * Check, and optionally fix, lfs_avail (to an exact figure) and lfs_bfree (within a margin of error) in pass 5. newfs_lfs: * Reduce the default dlfs_minfreeseg to 1/20 of the total segments. * Add a warning if the sgs disklabel field is 16 (the default for FFS' cpg, but not usually desirable for LFS' sgs: 5--8 is a better range). * Change the calculation of lfs_avail and lfs_bfree, corresponding to the kernel changes mentioned above. mount_lfs: * Add -N and -b options to pass corresponding -n and -b options to lfs_cleanerd. * Default to calling lfs_cleanerd with "-b -n 4". [All of these changes were largely tested in the 1.5 branch, with the idea that they (along with previous un-pulled-up work) could be applied to the branch while it was still in ALPHA2; however my test system has experienced corruption on another filesystem (/dev/console has gone missing :^), and, while I believe this unrelated to the LFS changes, I cannot with good conscience request that the changes be pulled up.]
Revision 1.4.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 16:05:27 2000 UTC (22 years, 11 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.4: +8 -2
lines
Diff to previous 1.4 (colored) next main 1.5 (colored)
Sync w/ netbsd-1-5-base.
Revision 1.5 / (download) - annotate - [select for diffs], Tue May 30 04:33:15 2000 UTC (23 years ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-5-base,
netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.4: +8 -2
lines
Diff to previous 1.4 (colored)
Check for cycles in the inode free list, and for free inodes not on the free list.
Revision 1.4 / (download) - annotate - [select for diffs], Tue May 23 01:48:55 2000 UTC (23 years ago) by perseant
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.3: +45 -11
lines
Diff to previous 1.3 (colored)
Convert to NetBSD source code style
Revision 1.3 / (download) - annotate - [select for diffs], Tue May 16 04:55:59 2000 UTC (23 years ago) by perseant
Branch: MAIN
Changes since 1.2: +37 -318
lines
Diff to previous 1.2 (colored)
fsck_lfs can now write to the filesystem, allowing it to correct most (though still not all) errors in a damaged lfs. Segment byte accounting is corrected in pass 5. "fsck_lfs -p" will do a partial roll-forward, verifying the checkpoint from the newer superblock. fscknames[] is updated so that fsck knows about fsck_lfs.
Revision 1.2 / (download) - annotate - [select for diffs], Sat Jul 3 19:55:03 1999 UTC (23 years, 10 months ago) by kleink
Branch: MAIN
CVS Tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
comdex-fall-1999-base,
comdex-fall-1999
Changes since 1.1: +2 -2
lines
Diff to previous 1.1 (colored)
RCS Id police.
Revision 1.1 / (download) - annotate - [select for diffs], Thu Mar 18 02:02:19 1999 UTC (24 years, 2 months ago) by perseant
Branch: MAIN
CVS Tags: netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001,
netbsd-1-4
Initial checkin of fsck_lfs. This version cannot do any repair (-p flag does nothing, and one of -p or -n is required) but can be useful as a diagnostic tool.