Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/ufs/lfs



Module Name:    src
Committed By:   perseant
Date:           Mon Oct 20 04:20:37 UTC 2025

Modified Files:
        src/sys/ufs/lfs: lfs.h lfs_accessors.h lfs_balloc.c lfs_bio.c
            lfs_extern.h lfs_inode.h lfs_kernel.h lfs_rfw.c lfs_segment.c
            lfs_subr.c lfs_syscalls.c lfs_vfsops.c lfs_vnops.c

Log Message:
* Generalize the partial-segment parser introduced for roll-forward,
  using it to facilitate an in-kernel segment rewriter (cleaner), and a
  mechanism to check whether a segment is in fact empty (only used
  with DEBUG).

* Add these new fcntl calls:
  - LFCNFILESTATS: For each inode given, report its number of direct
    blocks, how many gaps (discontinuities) there are between direct
    blocks, and how large the total gap distance is.  This will be
    useful for a coalescing agent.
  - LFCNREWRITEFILE: For each inode given, rewrite its direct blocks,
    effectively coalescing it into as compact a form as possible.
  - LFCNSCRAMBLE: As above, except that it only rewrites every other
    block.  This causes the file to have many gaps that can be
    measured with LFCNFILESTATS and addressed with LFCNREWRITEFILE,
    for testing purposes.
  - LFCNREWRITESEGS: Rewrite any live data in the given segments.
    This is intended to simplify the cleaner API and facilitate an
    in-kernel cleaner.
  - LFCNCLEANERINFO: Get the most current CLEANERINFO data from the
    kernel.
  - LFCNSEGUSE: Retrieve segment usage data from the kernel.

* Vnodes marked IN_CLEANING now take a reference.  Add a new "cleaner
  lock", which must be taken by the cleaner before the segment lock,
  and before marking nodes IN_CLEANING.  This allows us to flush
  vnodes, if necessary, before the cleaning segment is written, and
  never to flush vnodes being cleaned.  When the cleaner lock is
  released, the vnodes are cleared of IN_CLEANING and the reference
  dropped.

* Track a potential infinite loop in lfs_gatherblock.

* Pull "needs to flush" and "needs to wait for flush" into functions
  instead of inlining their definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/sys/ufs/lfs/lfs.h
cvs rdiff -u -r1.52 -r1.53 src/sys/ufs/lfs/lfs_accessors.h
cvs rdiff -u -r1.96 -r1.97 src/sys/ufs/lfs/lfs_balloc.c
cvs rdiff -u -r1.150 -r1.151 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -u -r1.122 -r1.123 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -u -r1.26 -r1.27 src/sys/ufs/lfs/lfs_inode.h
cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/lfs/lfs_kernel.h
cvs rdiff -u -r1.39 -r1.40 src/sys/ufs/lfs/lfs_rfw.c
cvs rdiff -u -r1.293 -r1.294 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.104 -r1.105 src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -u -r1.176 -r1.177 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -u -r1.389 -r1.390 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.344 -r1.345 src/sys/ufs/lfs/lfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index