Commit Graph

2076 Commits

Author SHA1 Message Date
hannken 97834f7ba0 Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
2014-02-07 15:29:20 +00:00
hannken 59e42c388a Move fstrans_start()/fstrans_done() into genfs_insane_rename() to protect
the complete rename operation like we do for all other vnode operations.
2014-02-06 10:57:12 +00:00
bouyer 95b8b45e94 Patch from Edgar Fuß on tech-kern:
set grace time if lowering the limit cause the user/group to now be overquota.
2014-01-29 20:13:04 +00:00
martin 6b1fea1ed7 Bogus gcc 4.8 maybe-used-uninitialized warning 2014-01-28 13:25:53 +00:00
martin 349d7f02c1 Quell a gcc 4.8 maybe-unitialized false positive 2014-01-28 13:12:22 +00:00
martin 65b88c5985 Quell a (bogus) "may be used unintialized" warning from gcc 4.8 2014-01-28 13:02:56 +00:00
skrll 2d1abfdfec More alignment spellos 2014-01-25 10:14:29 +00:00
hannken 04c776e5c8 Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30
2014-01-23 10:13:55 +00:00
hannken bbb42956e4 Move VOP_UNLOCK() after setting type to VNON like all other UFS file systems. 2014-01-21 07:53:38 +00:00
hannken 1139274440 Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29
2014-01-17 10:55:01 +00:00
joerg 599ef1ce3d ib_get is not used in the evbarm/OPENRD kernel, so mark it as such. 2013-12-17 01:17:39 +00:00
wiz d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
christos 9d605174d9 Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@
2013-11-27 17:24:43 +00:00
christos 0b725b63c7 change the mountlist CIRCLEQ into a TAILQ 2013-11-23 13:35:36 +00:00
dholland 0694926f8e fix typo; hi christos 2013-11-22 02:02:35 +00:00
dholland 10ba35ffd7 This is now equivalent to ufs_quota.c -r1.115.
(it isn't quite the same textually in a few places but this doesn't
really matter)
2013-11-16 17:15:30 +00:00
dholland ac80a19802 tidy the QUOTA2 blocks a bit more 2013-11-16 17:04:53 +00:00
mrg b51662c562 move variable use and initialisation inside the #ifdef / block that uses it. 2013-11-16 12:49:29 +00:00
dholland d5928c1bba clarify warning printout 2013-11-12 03:29:22 +00:00
christos 39dfdce6e4 __USE a variable for the non-wapbl case 2013-11-10 18:28:08 +00:00
christos 65df39a7f0 Add 2 XXX: gcc initializations 2013-11-04 19:58:02 +00:00
hannken 65b1f85ab6 Vnode API cleanup pass 1.
- Make these defines and functions private to vfs_vnode.c:

  VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW
  vclean() and vrelel()

- Remove the long time unused lwp argument from vrecycle().

- Remove vtryget(), it is responsible for ugly hacks and doesn't
  look that effective.

Presented on tech-kern.

Welcome to 6.99.25
2013-10-29 09:53:51 +00:00
bad a9d55720cc Pull in fix from FreeBSD ffs_alloc.c r121785:
Consider only cylinder groups with at least 75% of the average free space
per cylinder group and 75% of the average free inodes per cylinder group
as candidates for the creation of a new directory.  Avoids excessive I/O
scanning for a suitable cylinder group on relatively full file systems.

Tested by sborril and me.

Pullup: netbsd-6, netbsd-5


Original commit message:

Tweak the calculation of minbfree in ffs_dirpref() so that only
those cylinder groups that have at least 75% of the average free
space per cylinder group for that file system are considered as
candidates for the creation of a new directory.  The previous formula
for minbfree would set it to zero if the file system was more than
75% full, which allowed cylinder groups with no free space at all
to be chosen as candidates for directory creation, which resulted
in an expensive search for free blocks for each file that was
subsequently created in that directory.

Modify the calculation of minifree in the same way.

Decrease maxcontigdirs as the file system fills to decrease the
likelyhood that a cluster of directories will overflow the available
space in a cylinder group.

Reviewed by:	mckusick
Tested by:	kmarx@vicor.com
MFC after:	2 weeks
2013-10-28 21:32:52 +00:00
martin 015d1a5e21 Mark a diagnostic-only variable 2013-10-25 20:05:39 +00:00
martin a34a934cf7 Mark a diagnostic-only variable 2013-10-25 16:34:20 +00:00
martin 6a2419fedf Turn a few __unused into __diagused 2013-10-25 11:35:55 +00:00
christos a6ac3a3be5 remove unused 2013-10-20 17:18:38 +00:00
htodd 05bca19fed Definining needswap where needed. 2013-10-20 00:29:10 +00:00
christos 3b10767488 always declare needswap 2013-10-20 00:20:53 +00:00
christos f0a3fd2aff always declare needswap 2013-10-20 00:00:51 +00:00
mrg 34287b30e3 convert ufs_rw{16,32,64}() into real inline functions in all cases,
so that they consume their second arguments properly.
2013-10-19 20:12:18 +00:00
martin 2af58edbe2 Mark a potentially unused variable 2013-10-19 19:29:59 +00:00
martin e13fb3704a Mark unused (in the !FFS_EI case) variables as such. 2013-10-19 19:28:13 +00:00
martin 4618c726c3 Eliminate a variable only used in diagnostic kernels 2013-10-19 19:20:50 +00:00
martin b59cd17e74 Mark a potentially unused (ifndef FFS_EI) variable 2013-10-19 16:30:57 +00:00
christos 230e69d821 move code inside ifdef 2013-10-18 19:55:37 +00:00
christos b626e2d9e6 fix unused variable warnings 2013-10-18 19:45:40 +00:00
christos 7f0942b36f use __USE() in the right place, instead of (void)var. 2013-10-18 15:15:22 +00:00
christos cae86aa949 - remove unused variables
- add debug ifdefs for debugging variables
- __USE() where appropriate.
2013-10-17 21:01:08 +00:00
dholland 31c7ba91f6 Remove stray KERNEL_UNLOCK_ONE() in error path of lfs_markv().
From Wolfgang Stukenbrock in PR 44370.

This error path is only reachable if lfs_markv is handed an out of
range inode number, so it's unlikely that it gets tickled very often.

It isn't clear to me that we need the kernel lock in here at all, as
the path to lfs_markv that's actually used at this point (via fcntl)
doesn't take it. But, one thing at a time.
2013-10-07 05:19:23 +00:00
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
hannken 18e8787ae5 Function ffs_reload() works on a read-only mount, so remove the call
to ffs_snapshot_mount() as it would panic later with "already on list"
when remounting read-write.

Should fix PR kern/48211 (Unclean shutdown with active snapshot causes
panic during reboot)
2013-09-16 12:36:54 +00:00
martin 7df3c226a1 Remove unused variables 2013-09-15 15:32:18 +00:00
martin d78264e0ce Remove unused variable 2013-09-15 15:07:06 +00:00
joerg b3d66acd27 Kill unused function ib_assign. 2013-09-13 20:15:33 +00:00
martin 097ec72497 #ifdef a variable just like their use 2013-09-12 20:00:15 +00:00
dholland 7763dff664 Add the FS_SUJ flag for journaled softupdates from FreeBSD.
This conflicts with our flag for FS_INDEXDIRS. Apparently FreeBSD
changed that arbitrarily on their end when implementing journaled
softupdates, so follow their lead.

Unfortunately, the new value they use for FS_INDEXDIRS conflicts with
our flag FS_DOQUOTA2 for 64-bit quotas. Since the only thing in our
tree that knows about FS_INDEXDIRS is dumpfs (for printing it), leave
FS_INDEXDIRS commented out.

Also add FS_NFS4ACLS from FreeBSD, commented out because it conflicts
with our FS_DOWAPBL, and FS_TRIM.

(We could honor FS_TRIM as we have code for doing that; however I'm
not sure why FreeBSD chose to make it an on-disk flag instead of e.g.
a mount option and it seems problematic to me. In any case, not in
this commit.)

Also see a post I just made in tech-kern about the flag conflicts.
2013-09-03 02:24:01 +00:00
dholland 199aad004d Kill off uo_unmark_vnode/UFS_UNMARK_VNODE as it's now a leftover. 2013-08-11 04:36:17 +00:00
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