Commit Graph

1930 Commits

Author SHA1 Message Date
dholland 6f1deef47f Move INITQFNAMES to the right header file. 2012-08-26 02:32:14 +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
dholland 25f0cf9440 Restore accidentally lost initialization of quotatypes[].
Fixes (null) in the kernel message triggered when you go over quota, and
maybe other things. Reported by Matthew Mondor.
2012-07-29 08:32:27 +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
matt 7d217c32d0 Convert a KDASSERT to a KDASSERTMSG 2012-07-09 11:20:22 +00:00
riastradh 482b8291f9 Use two separate comments for stub where IN_RENAME was. 2012-06-04 22:01:07 +00:00
riastradh b8c3b27f99 Kill the IN_RENAME in-core inode flag in ufs and ext2fs.
Now that rename works we need not to wave this sort of voodoo at it.

ok dholland
2012-06-04 20:13:47 +00:00
riastradh 93765c12f0 Fix typo in comment: bp->b_bcount, not bp->b_count. 2012-06-04 19:58:57 +00:00
riastradh 2881e7e069 Fix ext2fs's scary cross-block directory message too.
(See rev. 1.3 of sys/ufs/ufs/ufs_rename.c for the analysis.)
2012-06-04 19:45:59 +00:00
riastradh 487d92ffe0 Kill scary message about cross-block directories and fix its cause.
Add a bunch of kasserts to check more stringently that ufs_direnter
did not compact across directory blocks.  Don't bother fetching
subsequent I/O blocks from the directory: ufs_lookup guarantees that
it's not necessary, and the kasserts check this to be sure.

The message fired when we were looking at the start of an I/O block,
not when we crossed from the end of one to the start of another.  I
believe it fired only when tulr->ulr_offset was a multiple of the I/O
block size (fs_bsize), which can happen if ufs_lookup either finds an
entry or finds free space at the start of an I/O block.

If ufs_lookup found an entry, none of this ulr recalculation logic
should kick in -- if tvp != NULL, then tulr->ulr_count is garbage, so
it's not merely unnecessary but wrong (although I suspect harmless in
the end) to read it in ufs_rename_overlap_p in consideration of
whether to recalculate fulr.

Discussed with chuq and dholland.

ok dholland
2012-06-04 19:37:36 +00:00
riastradh 3ce4df2ac9 Tidy up some typos and vestiges in comments after the ulr changes. 2012-06-04 16:46:45 +00:00
riastradh d9d99dd6dc Swap byte order of ext2fs_direct fields in ext2fs_rename_recalculate_fulr.
Symptom found and fix tested by martin.

ok martin
2012-05-10 19:08:34 +00:00
riastradh dae16d94fa Disable scary but probably harmless printf.
Still need to find why this harmless-but-shouldn't-happen case is
happening, but in the mean time, we can stop scaring people with it.
2012-05-10 07:57:02 +00:00
riastradh aeadee1d6d Adapt ffs, lfs, and ext2fs to use genfs_rename.
ok dholland, rmind
2012-05-09 00:21:17 +00:00
yamt 9b10dd1106 comments and cosmetics. no functional changes. 2012-05-05 04:08:53 +00:00
manu 7f8940a8ce Return ENODATA when no attribute is found, like Linux does. After
all we decided to adopt the Linux API, therefore there is rationale
to stick to it.

No standard tells us what to do, and our extended attribute API has not
been used in a release, therefore we do not break anything, and we get
more easily compatible with programs using the Linux extended attribute
API.

Note that FreeBSD and MacOS X return ENOATTR. FreeBSD has its own API
and MacOS X has a Linux-like API. How did the world get so complicated?
2012-05-01 07:48:25 +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
drochner de54f242ed everywhere else it is assumed that the filesystem block size fits into
a 32-bit "int" -- do the cast to quell a compiler warning in a more
sensible way
2012-04-23 17:19:00 +00:00
christos fe0d6a4e66 one more cast 2012-04-20 02:07:43 +00:00
christos 99b2fa090d Fix signed/unsigned issues. 2012-04-19 17:25:38 +00:00
ttoth c1270f067c chfs/debug.c deleted from files.ufs 2012-04-19 15:55:40 +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
tron fe27549953 Assert that we can a valid inode when looking up a file handle. 2012-04-04 19:52:48 +00:00
wiz eb52893a29 Fix wrong variable in snprintf. From Henning Petersen in PR 46259,
ok manu@
2012-03-26 11:03:43 +00:00
hannken 88f39ca44e Fix last commit that broke lookup for dot with op DELETE.
Reviewed by: David Holland <dholland@netbsd.org>
2012-03-16 08:39:54 +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
joerg f3103aad9c Make sure that __BEGIN_DECLS and __END_DECLS are paired. 2012-02-23 22:33:33 +00:00
matt 2d7141bca8 Eliminate a common in a header file (add a missing extern) and
declare it in the approriate C file.
2012-02-18 06:13:23 +00:00
perseant ed08fe6512 Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
2012-02-16 02:47:54 +00:00
dholland 602a9ede7c Fix another problem with quota cursor iteration. ok riz 2012-02-13 06:23:41 +00:00
dholland 7609b9bc56 Migrate one last leftover bit (used only by the kernel now) to
sys/ufs/ufs and remove the old quota headers and no-longer-used shared
code. Ok by releng.
2012-02-05 14:19:02 +00:00
matt ded3ab848b Make this compile on vax (uninitialized use warning). 2012-02-02 03:00:48 +00:00
dholland d2d6fa0ae1 Improve the names of some members of struct quotactl_args. These are
effectively function parameter names, but since they need to be
described with the same names in the man page the choices do matter.
Some.
2012-02-01 05:43:53 +00:00
dholland 59b296daa7 Change the syscall API for quotas over to the new non-proplib one.
- struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
2012-02-01 05:34:38 +00:00
dholland 29b925e01b Add QUOTACTL_IDTYPESTAT and QUOTACTL_OBJTYPESTAT for retrieving info
about idtypes and objtypes. This avoids compiling in the names of
the id and object types.

I overlooked this last week because the proplib syscall interface has
no way to convey this information.

Renumber the operation codes again (since we still can) to insert
the new operations into the list in a semantically sensible place.

Requires kernel version bump.
2012-02-01 05:16:56 +00:00
dholland 793f08e02d Fix problems in cursor iteration that came to light when iterating one
value at a time, instead of in bulk. Yeah, repquota should do bulk get,
but it doesn't yet.
2012-02-01 05:10:44 +00:00
para f4d4e8ed76 sprinkel some #ifdef QUOTA2 to avoid unused variables 2012-01-29 11:59:14 +00:00
tsutsui b7938d8f67 Fix errors in !defined(QUOTA) && !defined(QUOTA2) case. 2012-01-29 08:49:01 +00:00
dholland fa44ae5a8b Clean up quota2 cursoring, as promised earlier. 2012-01-29 07:21:00 +00:00
dholland 91b591da43 quota2_check_limit() is used in only one place, so don't stuff it in a
header file.
2012-01-29 07:20:27 +00:00
dholland a9f1a86676 Remove #if 0'd proplib-related code. 2012-01-29 07:18:17 +00:00
dholland b5bdca69dd Remove now-unused declarations from quota2.h. 2012-01-29 07:17:41 +00:00