The NetBSD Project

CVS log for src/sbin/fsck_lfs/segwrite.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.48.8.1: download - view: text, markup, annotated - select for diffs
Sat Jun 29 19:43:25 2024 UTC (6 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
Implementation of exFAT filesystem, with compilation conditional on MKEXFATFS
make variable.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu May 14 08:34:17 2020 UTC (4 years, 8 months ago) by msaitoh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, netbsd-10-base, netbsd-10-1-RELEASE, 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, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Branch point for: perseant-exfatfs
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2 lines
Remove extra semicolon.

Revision 1.46.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:07:18 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +2 -8 lines
Merge changes from current as of 20200406

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Apr 3 19:36:33 2020 UTC (4 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -8 lines
Avoid common symbols for fsck_lfs.

Revision 1.45.8.1: download - view: text, markup, annotated - select for diffs
Mon Oct 30 09:29:04 2017 UTC (7 years, 2 months ago) by snj
Branches: netbsd-8
CVS tags: 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, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +2 -2 lines
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

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Jun 10 08:13:15 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: MAIN
CVS tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, 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-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, netbsd-9, is-mlppp-base, is-mlppp
Branch point for: phil-wifi
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
Update inode member i_flag --> i_state to keep up with kernel changes

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Oct 3 08:28:15 2015 UTC (9 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, netbsd-8-base, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +7 -6 lines
Use IINFO in lfs_writeinode().
(both the kernel and the userland copies)

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:15:02 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +10 -10 lines
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.43: download - view: text, markup, annotated - select for diffs
Tue Sep 1 06:08:37 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +17 -13 lines
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.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Aug 19 20:33:29 2015 UTC (9 years, 4 months ago) by dholland
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +4 -13 lines
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.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:28:00 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +24 -11 lines
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.)

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:27:01 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +53 -29 lines
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.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:26:27 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +36 -24 lines
Make 32-bit and 64-bit versions of SEGSUM.
Also fix some of the FINFO handling as it's closely entangled.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:25:52 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -5 lines
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...

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Aug 12 18:25:03 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -4 lines
Make 32-bit and 64-bit versions of CLEANERINFO.

XXX: while this is written to disk, it seems like much of it would
XXX: be better set up as a commpage shared with the cleaner.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:18:09 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +6 -4 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.35: download - view: text, markup, annotated - select for diffs
Sun Aug 2 18:14:16 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -6 lines
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.34: download - view: text, markup, annotated - select for diffs
Tue Jul 28 05:09:34 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +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.33: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:59:32 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +16 -16 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.32: download - view: text, markup, annotated - select for diffs
Fri Jul 24 06:56:41 2015 UTC (9 years, 5 months ago) by dholland
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +58 -56 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.31: download - view: text, markup, annotated - select for diffs
Wed Jun 17 00:18:35 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
add missing ;

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Jun 16 23:18:55 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +10 -10 lines
fix error messages containing \n

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun May 31 15:44:30 2015 UTC (9 years, 7 months ago) by hannken
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -4 lines
Use VFS_PROTOS() for lfs.
Rename conflicting struct lfs field "lfs_start" to "lfs_s0addr".

No functional change.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Mar 29 19:35:58 2015 UTC (9 years, 9 months ago) by chopps
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
- Fix fallout for recent bread() change (removing cred arg).

Revision 1.20.12.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:25 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.20.12.2: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.12.2: +2 -2 lines
Rebase to HEAD as of a few days ago.

Revision 1.20.6.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:37:28 2014 UTC (10 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.20.6.1: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.6.1: +76 -77 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.27: download - view: text, markup, annotated - select for diffs
Sat Oct 19 01:09:58 2013 UTC (11 years, 2 months ago) by christos
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, riastradh-drm2-base3, 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.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
fix unused variable warnings.

Revision 1.20.12.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:28:51 2013 UTC (11 years, 6 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.20.12.1: preferred, colored; branchpoint 1.20: preferred, colored
Changes since revision 1.20.12.1: +74 -75 lines
resync from head

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jun 18 18:18:58 2013 UTC (11 years, 7 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +49 -49 lines
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.25: download - view: text, markup, annotated - select for diffs
Sat Jun 8 02:16:03 2013 UTC (11 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -4 lines
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.24: download - view: text, markup, annotated - select for diffs
Sat Jun 8 02:09:35 2013 UTC (11 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
Move the dinode (on-disk inode) structures to lfs.h, since they are
and will be obviously required by userland tools that need to read
the on-disk structures.

Also, DINODE{1,2}_SIZE -> LFS_DINODE{1,2}_SIZE.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:54:49 2013 UTC (11 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +5 -4 lines
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.22: download - view: text, markup, annotated - select for diffs
Thu Jun 6 00:52:50 2013 UTC (11 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +32 -32 lines
ufs -> ulfs for fsck_lfs.

Revision 1.20.12.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:28:07 2013 UTC (11 years, 10 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -7 lines
resync with head

Revision 1.20.6.1: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:05:30 2013 UTC (11 years, 11 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -7 lines
sync with head

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Jan 22 09:39:12 2013 UTC (11 years, 11 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -7 lines
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.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Feb 16 23:20:30 2010 UTC (14 years, 11 months ago) by mlelstv
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, tls-maxphys
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +12 -11 lines
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.

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:29:57 2008 UTC (16 years, 6 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +2 -2 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.17.8.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:21:21 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +2 -9 lines
Sync with HEAD.

Revision 1.17.10.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:30:51 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +2 -9 lines
sync with head.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri May 16 09:21:59 2008 UTC (16 years, 8 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, 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-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-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
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>

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:23:08 2008 UTC (16 years, 8 months ago) by martin
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -8 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.15.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:12:36 2007 UTC (17 years, 2 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +10 -10 lines
sync with HEAD

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Oct 10 20:42:20 2007 UTC (17 years, 3 months ago) by ad
Branches: 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
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +4 -4 lines
Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Oct 8 21:39:50 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +7 -7 lines
Give brelse() a second argument so that it matches the kernel.
fsck_lfs now compiles again.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Nov 9 19:36:36 2006 UTC (18 years, 2 months ago) by christos
Branches: 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
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -8 lines
Fix malloc/realloc/calloc issues: always check and exit, use EEXIT instead
of 8.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Sep 1 19:52:48 2006 UTC (18 years, 4 months ago) by perseant
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1 lines
Several fixes to improve the reliability of the roll-forward agent.
Also, note "properly orphaned" files as distinct from corrupted files.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Jul 18 23:37:13 2006 UTC (18 years, 6 months ago) by perseant
Branches: MAIN
CVS tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +10 -2 lines
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.12: download - view: text, markup, annotated - select for diffs
Tue May 23 22:35:20 2006 UTC (18 years, 7 months ago) by jnemeth
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
Coverity CID 3447: Add extraneous checks to shut up Coverity.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Mar 17 15:53:46 2006 UTC (18 years, 10 months ago) by rumble
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -1 lines
Check for allocation failures in malloc, calloc, realloc, asprintf, and
vasprintf and try to handle them.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Sep 13 04:14:17 2005 UTC (19 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
rename lfs.h to lfs_user.h so that it does not conflict.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Tue May 10 05:08:57 2005 UTC (19 years, 8 months ago) by riz
Branches: netbsd-2
CVS tags: 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
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +4 -3 lines
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.)

Revision 1.7.2.1: download - view: text, markup, annotated - select for diffs
Sat May 7 11:21:29 2005 UTC (19 years, 8 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.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +7 -11 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.9: download - view: text, markup, annotated - select for diffs
Fri Apr 1 23:45:59 2005 UTC (19 years, 9 months ago) by he
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -5 lines
Move the definition of simple_lock() and simple_unlock() to a common
header, since more of the LFS macros now use these functions.  Since
we're outside of the kernel, these are defined to be empty.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Mar 25 20:16:37 2005 UTC (19 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +7 -7 lines
"#define lfs_devvp lfs_unlockvp" for readability, since that's what we
use it for in fsck_lfs/newfs_lfs.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Feb 26 05:45:54 2005 UTC (19 years, 10 months ago) by perseant
Branches: MAIN
CVS tags: netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -3 lines
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.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Dec 24 01:39:27 2003 UTC (21 years ago) by heas
Branches: MAIN
CVS tags: netbsd-2-base, 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
Branch point for: netbsd-2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -1 lines
Check result of malloc().
reviewed by Martin.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Aug 7 10:04:23 2003 UTC (21 years, 5 months ago) by agc
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -6 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Jul 12 11:41:15 2003 UTC (21 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -10 lines
don't use uninitialized variables.
PR/22123 (Izumi Tsutsui)

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Apr 2 10:39:28 2003 UTC (21 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +19 -19 lines
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.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Mar 31 19:57:00 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -3 lines
Check inode free list tail pointer as well as head pointer, and write both
into the CLEANERINFO block of the Ifile as well as into the superblock.
Make preen update both superblocks.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Mar 28 08:09:54 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Add working writing ability to fsck_lfs, including roll-forward, based on
a partial-segment writer ported from the kernel.

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>