Commit Graph

808 Commits

Author SHA1 Message Date
dholland
3b7bdca759 Fix build both with and without options LFS_EI. 2013-07-29 16:40:46 +00:00
dholland
c482f134e6 Revert previous; it is wrong. 2013-07-29 16:39:37 +00:00
pgoyette
3776d454bb Remove more unused variables to unbreak the build. 2013-07-28 04:49:03 +00:00
pgoyette
637c4ef150 Remove unused variable to fix the build. 2013-07-28 04:24:44 +00:00
dholland
ba91b8b1fa Merge the extattr VOPs from ffs.
As these do nothing besides dispatch to ulfs_extattr.c it wasn't
exactly hard.

This might just make extended attributes work on lfs...
2013-07-28 01:27:02 +00:00
dholland
1c11495e64 Merge in some of the stuff for supporting the extended attributes code. 2013-07-28 01:26:13 +00:00
dholland
26f16a77a6 Add more of the bits for supporting quotas. 2013-07-28 01:25:05 +00:00
dholland
8848af09e1 Bring in a copy of ffs_quota2_mount() for reference.
Add stuff to struct lfs that it needs to initialize.
Clear these fields in mount as there's no on-disk support for quota2;
but this increases the chances of being able to add it (or something
like it) in the future.
2013-07-28 01:22:55 +00:00
dholland
d3cfc0d3d4 Migrate the miscellaneous ulfs-level info from struct ulfsmount to
struct lfs.

Put them inside #ifdef _KERNEL there. They are not the only such
members, gross as that is. Unfortunately, moving struct lfs to
lfs_kernel.h does not work.
2013-07-28 01:10:49 +00:00
dholland
5bc8cc2b1c Add lfs_kernel.h for declarations that don't need to be exposed to userland.
lfs currently has the following headers:
   lfs.h - on-disk structures and stuff needed for userlevel tools
   lfs_inode.h - additional restricted materials for userlevel tools
                 that operate the fs (newfs_lfs, fsck_lfs, lfs_cleanerd)
   lfs_kernel.h - stuff needed only in the kernel

and the following legacy headers that are expected to be mopped up and
folded into one of the above:
   lfs_extern.h - function prototypes
   ulfs_bswap.h - endian-independent support
   ulfs_dinode.h - now contains very little
   ulfs_dirhash.h - dirhash support
   ulfs_extattr.h - extattr support
   ulfs_extern.h - more function prototypes
   ulfs_inode.h - assorted kernel-only declarations
   ulfs_quota.h - quota support
   ulfs_quota1.h - more quota support
   ulfs_quota2.h - more quota support
   ulfs_quotacommon.h - more quota support
   ulfsmount.h - legacy copy of ufsmount material
2013-07-28 01:05:52 +00:00
dholland
62ec15fbc5 Remove the now-pointless ulfs ops macros. 2013-07-28 00:37:07 +00:00
dholland
933722845b Remove ulfsspec_close and ulfsfifo_close as they're not used. 2013-07-28 00:31:54 +00:00
dholland
88d53bfd92 Get rid of the ulfs_ops table as we only have one fs in here now. 2013-07-28 00:29:18 +00:00
dholland
a0792c8328 Improve comments in struct ulfsmount.
Also rearrange it to group related items together.
2013-07-28 00:28:33 +00:00
dholland
5e4138d300 Prune unused stuff from struct ulfsmount. 2013-07-28 00:28:05 +00:00
dholland
b7e188bc2a Merge logic from ulfs_close(), ulfs_getattr(), and ulfs_strategy()
into the preexisting lfs_*() versions of these functions, and delete
the unused ulfs copies.
2013-07-21 00:01:22 +00:00
dholland
f15a6faedc Remove ulfs_mknod, which is not used. 2013-07-20 22:16:02 +00:00
dholland
f59e924a8b Merge ulfs_mknod into lfs_mknod, which was missing some bits. 2013-07-20 22:14:49 +00:00
dholland
2aee89e8d5 G/C unused pieces. 2013-07-20 20:01:24 +00:00
dholland
0e93cfc3cb Collect the pieces of lfs rename into lfs_rename.c, and sprinkle static. 2013-07-20 19:59:31 +00:00
matt
ee9af514b0 Remove duplicate define of LFS_MAXNAMLEN 2013-06-28 16:14:06 +00:00
dholland
9f0b5be4ef typo in comment 2013-06-23 02:07:04 +00:00
dholland
f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +00:00
christos
855bb66ef7 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.
2013-06-18 18:18:57 +00:00
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
786df86a60 Make DEBUG kernel compile: di_u.inumber -> di_inumber 2013-06-10 09:25:05 +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
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
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
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