Commit Graph

2066 Commits

Author SHA1 Message Date
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
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