The NetBSD Project

CVS log for src/sbin/resize_lfs/resize_lfs.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / resize_lfs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Aug 7 23:27:07 2023 UTC (16 months ago) by mrg
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
fix potentially uninitialised data being used.

found by GCC 12.

Revision 1.14.16.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:22 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +4 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.14.18.1: download - view: text, markup, annotated - select for diffs
Mon Sep 2 16:16:56 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +4 -2 lines
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.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Aug 22 20:26:07 2019 UTC (5 years, 3 months ago) by brad
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines


Use getdiskrawname to find the device name.

Reviewed by Christos

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:18:09 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, 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-8-base, netbsd-8-3-RELEASE, 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, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, netbsd-9
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -2 lines
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.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:12:18 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -2 lines
Don't include ufs headers.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Jul 28 05:09:34 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
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.11: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:59:32 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -6 lines
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.10: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:56:41 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
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.6.26.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:27 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.6.26.1: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.26.1: +7 -4 lines
Rebase to HEAD as of a few days ago.

Revision 1.6.20.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:37:31 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +10 -7 lines
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.9: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:38:14 2014 UTC (10 years, 8 months ago) by dholland
Branches: 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, 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
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -3 lines
missed one

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Mar 23 05:26:23 2014 UTC (10 years, 8 months ago) by dholland
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -3 lines
don't use sprintf

Revision 1.6.26.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:28:52 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
resync from head

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Jun 19 01:07:55 2013 UTC (11 years, 5 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
make this compile again

Revision 1.5.18.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:21:23 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +1 -8 lines
Sync with HEAD.

Revision 1.5.20.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:30:54 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +1 -8 lines
sync with head.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:23:09 2008 UTC (16 years, 7 months ago) by martin
Branches: 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
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -8 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Nov 11 14:47:28 2006 UTC (18 years, 1 month ago) by jmmv
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, 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, mjf-devfs-base, mjf-devfs, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42, mjf-devfs2
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
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@.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Sep 5 19:46:14 2006 UTC (18 years, 3 months ago) by riz
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +12 -11 lines
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)

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Sep 4 18:34:22 2006 UTC (18 years, 3 months ago) by wiz
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
errx() provides a newline on its own, so remove the one from the error string.

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Tue Jun 14 21:42:30 2005 UTC (19 years, 5 months ago) by tron
Branches: 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
Diff to: previous 1.1.2.2: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.2: +2 -1 lines
Pull up revision 1.2 (requested by lukem in ticket #403):
Ensure verbose is initialized before using it.
Detected by gcc -Wuninitialized.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Jun 2 01:16:06 2005 UTC (19 years, 6 months ago) by lukem
Branches: MAIN
CVS tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -1 lines
Ensure verbose is initialized before using it.
Detected by gcc -Wuninitialized.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sat May 7 15:18:05 2005 UTC (19 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.1.2.1: preferred, colored
Changes since revision 1.1.2.1: +172 -0 lines
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.1.2.1
Sat Apr 23 19:47:51 2005 UTC (19 years, 7 months ago) by tron
Branches: netbsd-3
FILE REMOVED
Changes since revision 1.1: +0 -172 lines
file resize_lfs.c was added on branch netbsd-3 on 2005-05-07 15:18:05 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Apr 23 19:47:51 2005 UTC (19 years, 7 months ago) by perseant
Branches: MAIN
Branch point for: netbsd-3
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.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>