Commit Graph

32 Commits

Author SHA1 Message Date
hannken
3881f4f3f9 Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.

Welcome to 6.99.24

Discussed on tech-kern@ some time ago.

Reviewed by: David Holland <dholland@netbsd.org>
2013-09-30 18:57:59 +00:00
dholland
e1610ba4cb Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

   lblkno
   lblktosize
   lfragtosize
   numfrags
   blkroundup
   fragroundup
2013-06-23 07:28:36 +00:00
dholland
bc706cd48f blkoff -> chfs_blkoff
blksize -> chfs_blksize
2013-06-19 18:15:35 +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
mbalmer
0b522e92f1 Fix a typo in debug output. 2012-12-01 11:31:01 +00:00
dholland
35ed690545 Excise struct componentname from the namecache.
This uglifies the interface, because several operations need to be
passed the namei flags and cache_lookup also needs for the time being
to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit.

The glop should be able to go away eventually but requires structural
cleanup elsewhere first.

This change requires a kernel bump.
2012-11-05 17:27:37 +00:00
dholland
1617a81dd1 Disentangle the namecache from the internals of namei.
- Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

 - It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

 - Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.
2012-11-05 17:24:09 +00:00
ttoth
bca84b9e1f CHFS comments 2012-10-19 12:44:39 +00:00
ttoth
621ca7dac4 chfs: uappnd flag patch 2012-08-23 11:29:51 +00:00
ttoth
8a77fce611 chfs: fixed truncating 2012-08-22 09:20:13 +00:00
ttoth
36435346bd chfs fixes
1. nodes are obsoleted only once during truncating a file
2. frags don't stay in pool_cache
2012-08-13 13:12:51 +00:00
ttoth
3fae61ee8c chfs bugfix [node was obsoleted twice] 2012-08-10 09:26:58 +00:00
rmind
d65753d972 Move some the test for MAKEENTRY into the cache_enter(9). Make some
variables in vfs_cache.c static, __read_mostly, etc.

No objection on tech-kern@.
2012-07-22 00:53:18 +00:00
rmind
f1d428af19 - Replace some malloc(9) uses with kmem(9).
- G/C M_IPMOPTS, M_IPMADDR and M_BWMETER.
2012-04-30 22:51:27 +00:00
chs
8306a9eddf change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
2012-04-29 22:53:59 +00:00
joerg
e3482212aa Don't depend on implicit enum casts, be explicit. 2012-04-18 13:31:10 +00:00
christos
ec252a38db it is not an error if the kernel needs to clear the setuid/
setgid bit on write/chown/chgrp
2012-04-17 19:15:15 +00:00
ttoth
8be0dba80d prepare for chfs's makefs 2012-04-13 14:50:35 +00:00
ttoth
4024b54911 using chtype on media instead of vtype
debug.c deleted
2012-04-12 15:31:01 +00:00
elad
0c9d8d15c9 Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
2012-03-13 18:40:26 +00:00
christos
9d4f4a850b Make this compile again. From Paul Fleischer. 2012-02-28 02:48:39 +00:00
ahoka
1e8c5f14c3 use enum instead of macros
add some input validation
cleanup
2012-01-16 12:28:47 +00:00
ahoka
fd29905a07 cleanup macros 2012-01-16 12:17:55 +00:00
ahoka
f97a7e495e cleanup, some style and remove leftover code 2011-11-28 12:50:07 +00:00
ahoka
f045c4d360 Don't shadow some stupid function defined globally in random platforms. 2011-11-25 11:15:24 +00:00
ahoka
9092da1c79 disable dbg messages (they break the build on amd64) 2011-11-24 21:38:44 +00:00
agc
4049ece4a9 i missed a file - quick workaround for compilation bugs on amd64 2011-11-24 21:22:39 +00:00
agc
f9d6d5cb7a quick workaround to make this compile, with thanks to Hisashi Fujinaka for the
nudge.
2011-11-24 21:09:37 +00:00
agc
e1820d3101 quick workaround for compilation bug on amd64 2011-11-24 20:50:33 +00:00
ahoka
bb8e86c380 fix build failure on amd64 due to incorrect format string 2011-11-24 19:14:30 +00:00
ahoka
288addd0db Import CHFS, which was formerly known as ChewieFS.
CHFS is a file system for flash devices developed by the
Software Engineering Department at University of Szeged, Hungary.

http://chewiefs.sed.hu/

Thanks for all who made it possible.
2011-11-24 15:51:30 +00:00