Home | History | Annotate | Download | only in resize_lfs
History log of /src/sbin/resize_lfs/resize_lfs.c
RevisionDateAuthorComments
 1.16  07-Aug-2023  mrg fix potentially uninitialised data being used.

found by GCC 12.
 1.15  22-Aug-2019  brad Use getdiskrawname to find the device name.

Reviewed by Christos
 1.14  02-Aug-2015  dholland branches: 1.14.16; 1.14.18;
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.13  02-Aug-2015  dholland Don't include ufs headers.
 1.12  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.11  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.10  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.9  23-Mar-2014  dholland missed one
 1.8  23-Mar-2014  dholland don't use sprintf
 1.7  19-Jun-2013  christos make this compile again
 1.6  28-Apr-2008  martin branches: 1.6.20; 1.6.26;
Remove clause 3 and 4 from TNF licenses
 1.5  11-Nov-2006  jmmv branches: 1.5.18; 1.5.20;
Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407. No objections in tech-userlevel@.
 1.4  05-Sep-2006  riz Deal with wedges and the new disk geometry structures, instead of using
struct disklabel. (Shrinking a file system still seems to have problems,
though, independent of this change)
 1.3  04-Sep-2006  wiz errx() provides a newline on its own, so remove the one from the error string.
 1.2  02-Jun-2005  lukem Ensure verbose is initialized before using it.
Detected by gcc -Wuninitialized.
 1.1  23-Apr-2005  perseant branches: 1.1.2;
Provide a resize_lfs(8), including kernel and cleaner support. The current
implementation requires the fs to be mounted while resizing. Tested in both
directions, and everything appears to work happily, but ymmv.
 1.1.2.3  14-Jun-2005  tron Pull up revision 1.2 (requested by lukem in ticket #403):
Ensure verbose is initialized before using it.
Detected by gcc -Wuninitialized.
 1.1.2.2  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.1.2.1  23-Apr-2005  tron file resize_lfs.c was added on branch netbsd-3 on 2005-05-07 15:18:05 +0000
 1.5.20.1  18-May-2008  yamt sync with head.
 1.5.18.1  02-Jun-2008  mjf Sync with HEAD.
 1.6.26.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.26.1  23-Jun-2013  tls resync from head
 1.6.20.1  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.14.18.1  02-Sep-2019  martin Pull up following revision(s) (requested by brad in ticket #110):

libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.59
libexec/lfs_cleanerd/lfs_cleanerd.8: revision 1.19
sbin/resize_lfs/resize_lfs.c: revision 1.15
usr.sbin/puffs/rump_lfs/rump_lfs.c: revision 1.19
libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.60
lib/libutil/getdiskrawname.c: revision 1.6
tests/fs/common/fstest_lfs.c: revision 1.7

Use getdiskrawname to find the device name.
Reviewed by Christos

-

Teach getdiskrawname and getdiskcookedname about zvols.
Reviewed by Christos

-

Add support for passing the raw device name separate from the
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

-

The cleaner is compiled into rump_lfs and executed as a thread. Pass
in the raw device using the new -J option. This avoids the use of
getdiskrawname which is not particularly rump safe in this context and
insures that the rump container device is used for cleaning, not the
outer device.
 1.14.16.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed