Commit Graph

1999 Commits

Author SHA1 Message Date
dholland
ed77f6830b Tuck away a bunch of symbols that don't need to be public. 2013-06-18 08:01:00 +00:00
christos
ee4a2660bc LFS module does not depend on FFS anymore. (NAKAJIMA Yoshihiro) 2013-06-17 15:46:04 +00:00
hannken
d5afd2c727 Add an UFS_SNAPGONE() ufs op replacing the calls
to ffs_snapgone() in ufs_lookup.c.

Ok: David Holland <dholland@netbsd.org>

Welcome to 6.99.22
2013-06-16 13:33:30 +00:00
dholland
063f56aa0d Add a comment about a matched pair of off-by-one tests that make the
maximum size of short symlinks one byte less than one would think it
should be. Caution against changing it; that would break compatibility
with existing disk images. Behavior noticed by qjsgkem on freenode.

If my analysis is wrong, please correct...
2013-06-16 00:13:58 +00:00
hannken
786df86a60 Make DEBUG kernel compile: di_u.inumber -> di_inumber 2013-06-10 09:25:05 +00:00
christos
235c567362 the speed limit is 80 2013-06-09 18:54:05 +00:00
dholland
5a420c1b9a Stick UFS_ in front of these symbols:
DIRBLKSIZ
   DIRECTSIZ
   DIRSIZ
   OLDDIRFMT
   NEWDIRFMT

Part of PR 47909.
2013-06-09 17:57:08 +00:00
dholland
2fd49050f5 Remove lfs-only inumber field (and its supporting union) from struct
ufs1_dinode.
2013-06-09 17:55:46 +00:00
dholland
b27a9f36f3 Move struct lfs_inode_ext to lfs_inode.h; it doesn't need to be public. 2013-06-09 00:13:55 +00:00
dholland
834acd6648 Get rid of this copy of the accessor macro for di_u.inumber; it breaks
the build now.
2013-06-09 00:10:55 +00:00
dholland
36d33dd6ae G/C another unneeded union 2013-06-08 23:12:51 +00:00
dholland
d9177c356e Remove stale union and accessor macros. 2013-06-08 23:04:49 +00:00
dholland
e981abf045 ulfs_dir.h has been emptied; remove it. 2013-06-08 22:23:52 +00:00
dholland
0497d48137 Move a comment to lfs.h that belongs better there. 2013-06-08 22:19:01 +00:00
dholland
8be3e7027b G/C 2013-06-08 22:07:24 +00:00
dholland
9416340bc0 There is no WAPBL in LFS. 2013-06-08 22:05:15 +00:00
dholland
15c1f6b300 mp->mnt_wapbl and mp->mnt_wapbl_replay are always NULL in here. 2013-06-08 21:40:27 +00:00
dholland
d347d0af43 Merge -r1.213 of ufs_vnops.c:
Committed By:   kardel
Date:           Sat Jun  8 05:47:02 UTC 2013

fix clearing of system-flags (schg, sappnd). clearing system flags is
possible again at securelevel < 1.
reviewed by christos@
2013-06-08 20:43:35 +00:00
kardel
862ab1ea2e fix clearing of system-flags (schg, sappnd). clearing system flags is possible again
at securelevel < 1.
reviewed by christos@
2013-06-08 05:47:02 +00:00
dholland
7480682842 As nearly all the content of ulfs_dir.h and ulfs_dinode.h has migrated
to lfs.h, propagate the copyright notices too.
2013-06-08 02:16:30 +00:00
dholland
c13a12500a 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.
2013-06-08 02:16:03 +00:00
dholland
34a172b8ab Move more symbols to lfs.h:
LFS_DIRBLKSIZ
   LFS_DIRECTSIZ
   LFS_DIRSIZ
   LFS_OLDDIRFMT
   LFS_NEWDIRFMT
   LFS_IFTODT
   LFS_DTTOIF
   ULFS{,1,2}_MAXSYMLINKLEN
2013-06-08 02:15:12 +00:00
dholland
25bc01ad43 DIRBLKSIZ -> LFS_DIRBLKSIZ
DIRECTSIZ -> LFS_DIRECTSIZ
DIRSIZ -> LFS_DIRSIZ
OLDDIRFMT -> LFS_OLDDIRFMT
NEWDIRFMT -> LFS_NEWDIRFMT
IFTODT -> LFS_IFTODT
DTTOIF -> LFS_DTTOIF
2013-06-08 02:14:46 +00:00
dholland
1d8094a0f2 Move stuff to lfs.h that's needed by userland:
LFS_DT_*
   ULFS_ROOTINO
   ULFS_WINO
   struct lfs_direct
   struct lfs_dirtemplate
   struct lfs_odirtemplate
   struct ulfs_args

Also fix FFS_MAXNAMLEN -> LFS_MAXNAMLEN in several places.
2013-06-08 02:13:33 +00:00
dholland
4b157546cf struct direct -> struct lfs_direct
struct dirtemplate -> struct lfs_dirtemplate
struct odirtemplate -> struct lfs_odirtemplate
DT_* -> LFS_DT_*
2013-06-08 02:12:56 +00:00
dholland
4260cc072b Now move LFS_IFMT and friends from ulfs_dinode.h to lfs.h. 2013-06-08 02:11:49 +00:00
dholland
b6eb36b1f1 Stick LFS_ in front of IFMT, IFIFO, IFREG, etc. so as not to conflict
with the UFS copies of these symbols. (Which themselves ought to have
UFS_ stuck on.)
2013-06-08 02:11:11 +00:00
dholland
5fce92dbf7 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.
2013-06-08 02:09:35 +00:00
dholland
eb628b88b7 Split the definitions suitable for userland out of ulfs_inode.h into
lfs_inode.h. Since fsck_lfs, newfs_lfs, and lfs_cleanerd want to reuse
the inode structure for their own internal use, and some of them share
parts of the kernel code as well, the best way forward is to provide a
relatively sanitized header that doesn't bring in stray material.

Shuffle a few other definitions around so that lfs_inode.h depends
only on lfs.h.

Install lfs_inode.h into /usr/include.
2013-06-08 02:04:31 +00:00
dholland
7b05da3fb4 typo in comment 2013-06-07 23:37:53 +00:00
dholland
70b3273082 Remove references to Apple UFS. 2013-06-06 01:25:25 +00:00
dholland
2984f8f97d Update the line-count standings. 2013-06-06 01:01:42 +00:00
dholland
a4fc39c06d 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.
2013-06-06 00:54:49 +00:00
dholland
700b04ebe1 Fix some exposed symbols:
LOSTFOUNDINO -> LFS_LOSTFOUNDINO
   struct ufid -> struct ulfs_ufid
2013-06-06 00:52:14 +00:00
dholland
f5b4660876 Cleanups to reduce symbol and header exposure:
- move struct ufid from ulfs_inode.h to lfs.h
   - lfs.h needs sys/mount.h and sys/pool.h
   - ulfs_quota2_subr.c needs lfs_inode.h
   - remove ulfs_inode.h from lfs.h in favor of ulfs_dinode.h
   - move ULFS_NDADDR, ULFS_NIADDR, ULFS_NXADDR from ulfs_dinode.h to lfs.h
   - remove ulfs_dinode.h from lfs.h
   - add lfs.h to ulfs_dinode.h
2013-06-06 00:51:50 +00:00
dholland
eac0bd5b42 Remove stray references to ext2fs, chfs, ffs, and mfs. 2013-06-06 00:51:25 +00:00
dholland
bf9cc163da Apparently we also need to cut and paste ffs_snapgone() in order to be
able to link the ufs code.

Instead of actually cutting and pasting it (as it depends on ffs-only
things) implement it as panic. Probably we'll be able to demonstrate
later that it's unreachable.

XXX: Someone should add snapgone to struct ufs_ops in ufs/ufsmount.h,
XXX: and fix ufs/ufs_lookup.c to not hardwire ffs.
2013-06-06 00:50:51 +00:00
dholland
7c08dd6617 Add lfs_ or ulfs_ in front of extern symbols lacking them, mostly
quota-related (and particularly quota2-related) stuff.
2013-06-06 00:49:28 +00:00
dholland
49bebcb46c Split lfs from ufs step 4:
Massedit all ufs symbols to be "ulfs" instead, to make sure there are
no conflicts with ufs. Confirmed with grep.

(This required changing a few comments that maybe should have been
left alone to say "ulfs", but we'll survive that.)
2013-06-06 00:48:04 +00:00
dholland
f5bd8756c9 Split lfs from ufs step 3: rearrange config stuff.
Add new options:
   LFS_EI
   LFS_DIRHASH
   LFS_EXTATTR
   LFS_EXTATTR_AUTOSTART
   LFS_QUOTA
   LFS_QUOTA2

and update code referring to the corresponding FFS and UFS config
symbols to use the LFS versions. Disable the one extant reference
to APPLE_UFS in the ulfs files. Use opt_lfs.h only, not opt_ffs.h.
2013-06-06 00:46:40 +00:00
dholland
1515889590 Split lfs from ufs, part 2:
Change all <ufs/ufs/foo.h> includes to <ufs/lfs/ulfs_foo.h>.
2013-06-06 00:44:40 +00:00
dholland
478ec7f647 Split lfs from ufs, part 1: cut and paste 15000 lines of ufs as "ulfs".
These are verbatim copies except that I've preserved the ufs rcsids
for reference. Also,
   ufs/quota.h -> ulfs_quotacommon.h
   ufs/ufs_quota.h -> ulfs_quota.h

Splitting lfs from ufs was ok'd by core some years ago. This is not
from my original tree, which became unmergeable after the several sets
of quota changes; I've done the work over again over the last couple
days.
2013-06-06 00:40:55 +00:00
hannken
ee78d91829 When invalidating short buffers on the snapshots clean list use bbusy()
to mark the buffer busy.  There exists a small window where a buffer is
done but not released and therefore still busy.
2013-05-07 09:40:54 +00:00
skrll
94a59cc1db Remove some set but unused variables 2013-04-08 21:12:33 +00:00
plunky
5ec364d4d9 C99 section 6.7.2.3 (Tags) Note 3 states that:
A type specifier of the form

	enum identifier

  without an enumerator list shall only appear after the type it
  specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)
2013-03-18 19:35:35 +00:00
dholland
dcd34a91c5 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.
2013-01-22 09:39:11 +00:00
hannken
312d89f0de Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)
2012-12-20 08:03:41 +00:00
manu
591c7f2eaa Remove always-true condition and note that the current code is suboptimal. 2012-12-08 13:42:36 +00:00
mbalmer
0b522e92f1 Fix a typo in debug output. 2012-12-01 11:31:01 +00:00
drochner
9d483431fd allow to enable ffs "discard" by update mounts, make the flag visible
to userland
2012-11-26 16:22:21 +00:00