The NetBSD Project

CVS log for src/sys/ufs/ext2fs/ext2fs_vfsops.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / ufs / ext2fs

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.169 / (download) - annotate - [select for diffs], Mon Apr 8 21:12:33 2013 UTC (2 months, 1 week ago) by skrll
Branch: MAIN
CVS Tags: khorben-n900, HEAD
Changes since 1.168: +2 -4 lines
Diff to previous 1.168 (colored)

Remove some set but unused variables

Revision 1.168 / (download) - annotate - [select for diffs], Thu Dec 20 08:03:44 2012 UTC (5 months, 4 weeks ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base8, tls-maxphys-nbase, tls-maxphys-base, agc-symver-base, agc-symver
Changes since 1.167: +4 -7 lines
Diff to previous 1.167 (colored)

Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)

Revision 1.167 / (download) - annotate - [select for diffs], Wed Nov 21 23:11:23 2012 UTC (6 months, 3 weeks ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.166: +4 -3 lines
Diff to previous 1.166 (colored)

Write support for the Ext4 Read-only Compatible Feature "huge_file".

Primarily, this feature extends the inode block count field to 48 bits.
Additionally, this feature allows this field to be represented in file
system block size units rather than DEV_BSIZE units.

Revision 1.166 / (download) - annotate - [select for diffs], Sat Sep 1 17:01:24 2012 UTC (9 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.165: +11 -8 lines
Diff to previous 1.165 (colored)

really print the incompatible bits.

Revision 1.165 / (download) - annotate - [select for diffs], Sat Sep 1 15:46:11 2012 UTC (9 months, 2 weeks ago) by chs
Branch: MAIN
Changes since 1.164: +14 -10 lines
Diff to previous 1.164 (colored)

when failing a mount due to unsupported features,
print which features are involved.

Revision 1.164 / (download) - annotate - [select for diffs], Mon Apr 30 22:51:28 2012 UTC (13 months, 2 weeks ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.163: +12 -14 lines
Diff to previous 1.163 (colored)

- Replace some malloc(9) uses with kmem(9).
- G/C M_IPMOPTS, M_IPMADDR and M_BWMETER.

Revision 1.163 / (download) - annotate - [select for diffs], Tue Mar 13 18:41:04 2012 UTC (15 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8
Changes since 1.162: +5 -3 lines
Diff to previous 1.162 (colored)

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.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Nov 14 18:35:14 2011 UTC (19 months ago) by hannken
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.161: +4 -2 lines
Diff to previous 1.161 (colored)

VOP_OPEN() needs a locked vnode.  All these copy-and-pasted xxxfs_mount()
implementations need more review.

Revision 1.161 / (download) - annotate - [select for diffs], Fri Oct 7 09:35:06 2011 UTC (20 months, 1 week ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.160: +4 -6 lines
Diff to previous 1.160 (colored)

As vnalloc() always allocates with PR_WAITOK there is no longer the need
to test its result for NULL.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:00 2011 UTC (2 years ago) by rmind
Branch: MAIN
Changes since 1.159: +7 -6 lines
Diff to previous 1.159 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Jul 27 05:15:56 2010 UTC (2 years, 10 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

Make DEBUG_EXT2 work with 64-bit size_t.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Jul 21 17:52:13 2010 UTC (2 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.157: +4 -4 lines
Diff to previous 1.157 (colored)

Make holding v_interlock mandatory for callers of vget().

Announced some time ago on tech-kern.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:18 2010 UTC (2 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.156: +7 -7 lines
Diff to previous 1.156 (colored)

Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.156 / (download) - annotate - [select for diffs], Thu Feb 11 19:50:34 2010 UTC (3 years, 4 months ago) by mlelstv
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.155: +2 -14 lines
Diff to previous 1.155 (colored)

There is no code left that uses disk size data, so don't query it.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Jan 31 10:37:57 2010 UTC (3 years, 4 months ago) by mlelstv
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.154: +4 -6 lines
Diff to previous 1.154 (colored)

Fix block shift to work with different device block sizes.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Jan 31 10:36:20 2010 UTC (3 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.153: +18 -16 lines
Diff to previous 1.153 (colored)

Replace individual queries for partition information with
new helper function.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:11 2010 UTC (3 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change

Revision 1.152 / (download) - annotate - [select for diffs], Wed Oct 21 17:37:21 2009 UTC (3 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.151: +3 -4 lines
Diff to previous 1.151 (colored)

update i_uid and i_gid after chown

Revision 1.151 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:17 2009 UTC (3 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.150: +2 -7 lines
Diff to previous 1.150 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.150 / (download) - annotate - [select for diffs], Sun Sep 13 05:17:36 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.149: +2 -4 lines
Diff to previous 1.149 (colored)

Move declaration of ufs_hashlock into <ufs/ufs_extern.h> from each c source.

Revision 1.149 / (download) - annotate - [select for diffs], Sat Sep 12 02:50:38 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.148: +14 -13 lines
Diff to previous 1.148 (colored)

Reduce diffs a bit between ext2fs_reload() and ffs_reload().

Revision 1.148 / (download) - annotate - [select for diffs], Sat Sep 12 02:32:14 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.147: +3 -2 lines
Diff to previous 1.147 (colored)

Add a missed brelse(9) call after bread(9) in ext2fs_reload().

This may close PR kern/28712 (ext2fs hang on mount after fsck).

Revision 1.147 / (download) - annotate - [select for diffs], Sat Sep 12 02:25:39 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

Pull a fix from ffs_vfsops.c rev 1.248:
> Fix bug introduced in revision 1.174(*) where a NULL fspec with an MNT_UPDATE
> command would always return EINVAL. This broke fsck on root, where fsck'ing
> a dirty root would always return an error causing rc to resort in a reboot.
(*) This is "Apply the NFS exports list rototill patch" change
    in ext2fs_vfsops.c rev 1.91.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Sep 12 01:43:52 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.145: +11 -4 lines
Diff to previous 1.145 (colored)

Pull a fix for mount function from ffs_vfsops.c rev1.186:
> Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
> instead of just vnode pointers.  Fixes erroneous "does not match mounted
> device" errors from mount(8) in the presence of MFS /dev, init.root, &c.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Sep 11 15:59:07 2009 UTC (3 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.144: +12 -10 lines
Diff to previous 1.144 (colored)

Fix botch around argument check in ext2fs_mount(). Taken from ffs_vfsops.c.

Fixes LOCKDEBUG panic which is the same one mentioned in PR kern/41078
on trying to mount_ext2fs against a raw device, while that panic
seems to have another route cause around module_autoload() in
sys/miscfs/specfs/spec_vnops.c:spec_open().

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jun 29 05:08:18 2009 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.143: +5 -6 lines
Diff to previous 1.143 (colored)

Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Apr 25 18:53:45 2009 UTC (4 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.142: +14 -13 lines
Diff to previous 1.142 (colored)

Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Mar 1 15:59:57 2009 UTC (4 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.141: +13 -11 lines
Diff to previous 1.141 (colored)

PR/40936: Frederik Sausmikat: ext2fs: add support for inodes > 128 bytes

Revision 1.141 / (download) - annotate - [select for diffs], Mon Dec 8 11:34:30 2008 UTC (4 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base
Branch point for: jym-xensuspend
Changes since 1.140: +2 -3 lines
Diff to previous 1.140 (colored)

Remove no longer valid comment (which probably didn't even say what
it wanted to say in the first place).

Revision 1.140 / (download) - annotate - [select for diffs], Sun Nov 23 10:09:25 2008 UTC (4 years, 6 months ago) by mrg
Branch: MAIN
CVS Tags: ad-audiomp2-base, ad-audiomp2
Changes since 1.139: +18 -2 lines
Diff to previous 1.139 (colored)

add support for 32 bit uid/gid fields in ext2, but only do so for
when the revision is > REV0.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Nov 13 11:10:41 2008 UTC (4 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

These depend on ffs.

Revision 1.138 / (download) - annotate - [select for diffs], Thu Nov 13 11:09:45 2008 UTC (4 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.137: +3 -2 lines
Diff to previous 1.137 (colored)

Remove #ifdef LFS from the ufs code.

Revision 1.137 / (download) - annotate - [select for diffs], Sat Jun 28 01:34:05 2008 UTC (4 years, 11 months ago) by rumble
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.136: +34 -26 lines
Diff to previous 1.136 (colored)

Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.

Revision 1.136 / (download) - annotate - [select for diffs], Fri May 16 09:22:00 2008 UTC (5 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl
Changes since 1.135: +8 -8 lines
Diff to previous 1.135 (colored)

Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.135 / (download) - annotate - [select for diffs], Sat May 10 02:26:10 2008 UTC (5 years, 1 month ago) by rumble
Branch: MAIN
CVS Tags: yamt-nfs-mp-base2
Changes since 1.134: +19 -3 lines
Diff to previous 1.134 (colored)

Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

As a consequence, most of the file systems can now be loaded as new style
modules.

Quick sanity check by ad@.

Revision 1.134 / (download) - annotate - [select for diffs], Tue May 6 18:43:45 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.133: +3 -4 lines
Diff to previous 1.133 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:17 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.132: +6 -5 lines
Diff to previous 1.132 (colored)

PR kern/38135 vfs_busy/vfs_trybusy confusion

The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Apr 29 18:18:09 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.131: +3 -2 lines
Diff to previous 1.131 (colored)

PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Feb 5 15:21:19 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Do genfs_node_init() earlier. PR kern/36162.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:03 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.129: +4 -5 lines
Diff to previous 1.129 (colored)

PR kern/37706 (forced unmount of file systems is unsafe):

- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jan 28 14:31:20 2008 UTC (5 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.128: +5 -2 lines
Diff to previous 1.128 (colored)

Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:56 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.127: +2 -15 lines
Diff to previous 1.127 (colored)

specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Jan 3 01:26:31 2008 UTC (5 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.126: +6 -6 lines
Diff to previous 1.126 (colored)

valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok

Revision 1.126 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:08 2008 UTC (5 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.125: +55 -37 lines
Diff to previous 1.125 (colored)

Merge vmlocking2 to head.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:53 2007 UTC (5 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored)

Remove cn_lwp from struct componentname.  curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Dec 1 16:57:26 2007 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
CVS Tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.123: +8 -8 lines
Diff to previous 1.123 (colored)

Use e2fs_first_dblock in superblock to read/write group descriptor blocks.

Revision 1.123 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:27 2007 UTC (5 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.122: +26 -25 lines
Diff to previous 1.122 (colored)

Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.122 / (download) - annotate - [select for diffs], Mon Nov 26 15:46:48 2007 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.121: +49 -43 lines
Diff to previous 1.121 (colored)

Misc cosmetics.

Revision 1.121 / (download) - annotate - [select for diffs], Mon Nov 26 15:41:03 2007 UTC (5 years, 6 months ago) by tsutsui
Branch: MAIN
Changes since 1.120: +8 -4 lines
Diff to previous 1.120 (colored)

Account e2fs_reserved_ngdb blocks accordingly in ext2fs_statvfs().

Revision 1.120 / (download) - annotate - [select for diffs], Wed Oct 17 17:34:25 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.119: +5 -5 lines
Diff to previous 1.119 (colored)

Sync with ffs: fix ufs_ihashlock / ufs_hash_lock deadlock.
From Sverre Froyen.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:33 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, vmlocking-base
Changes since 1.118: +6 -6 lines
Diff to previous 1.118 (colored)

Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Oct 8 18:01:28 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.117: +12 -12 lines
Diff to previous 1.117 (colored)

Merge ffs locking & brelse changes from the vmlocking branch.

Revision 1.117 / (download) - annotate - [select for diffs], Tue Jul 31 21:14:20 2007 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.116: +8 -7 lines
Diff to previous 1.116 (colored)

* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.116 / (download) - annotate - [select for diffs], Thu Jul 26 22:59:58 2007 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored)

Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Jul 20 16:46:44 2007 UTC (5 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

In sync, skip over vnodes based on if they are clean rather than
if they have pages.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Jul 17 11:19:35 2007 UTC (5 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jul 12 19:35:36 2007 UTC (5 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.112: +17 -14 lines
Diff to previous 1.112 (colored)

Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Jun 30 09:37:53 2007 UTC (5 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.111: +6 -10 lines
Diff to previous 1.111 (colored)

Using POOL_INIT here makes no sense, since file systems always have
an init method.  So get rid of it and #ifdef _LKM and just always
init in the init method.  Give malloc types the same treatment.
Makes file systems nicer to work with in linksetless environments
and fixes a few LKM discrepancies.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Jun 5 12:31:33 2007 UTC (6 years ago) by yamt
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:37 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.109: +6 -6 lines
Diff to previous 1.109 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:43 2007 UTC (6 years, 3 months ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.108: +6 -6 lines
Diff to previous 1.108 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Feb 15 15:40:53 2007 UTC (6 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.107: +12 -11 lines
Diff to previous 1.107 (colored)

Replace some uses of lockmgr() / simplelocks.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:12 2007 UTC (6 years, 5 months ago) by hannken
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Changes since 1.106: +3 -2 lines
Diff to previous 1.106 (colored)

New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).

Revision 1.106 / (download) - annotate - [select for diffs], Thu Jan 4 16:55:29 2007 UTC (6 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:51 2006 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

__unused removal on arguments; approved by core.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Oct 25 22:01:55 2006 UTC (6 years, 7 months ago) by reinoud
Branch: MAIN
Changes since 1.103: +16 -6 lines
Diff to previous 1.103 (colored)

Revisit mnt_vnodelist TAILQ patch. Remove all suspicious TAILQ_FOREACH()
loops where vnodes can get removed or added during the loops. This could
lead to panic's on unmount since nodes are skipped or otherwise
TAILQ_NEXT(0xdeadbeef, ...) was dereferenced.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Oct 20 18:58:12 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.102: +6 -8 lines
Diff to previous 1.102 (colored)

Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.

Revision 1.102 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:51 2006 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.101: +4 -4 lines
Diff to previous 1.101 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.101 / (download) - annotate - [select for diffs], Wed Aug 30 01:26:47 2006 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.100: +4 -2 lines
Diff to previous 1.100 (colored)

fix incomplete initializer.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:14 2006 UTC (6 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.99: +5 -5 lines
Diff to previous 1.99 (colored)

Use the LWP cached credentials where sane.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Jul 13 12:00:26 2006 UTC (6 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.98: +24 -14 lines
Diff to previous 1.98 (colored)

Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).

Revision 1.98 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:18 2006 UTC (7 years ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.97: +6 -6 lines
Diff to previous 1.97 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.97 / (download) - annotate - [select for diffs], Sun May 14 21:32:21 2006 UTC (7 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.96: +9 -8 lines
Diff to previous 1.96 (colored)

integrate kauth.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Mar 18 12:48:38 2006 UTC (7 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, elad-kernelauth-base
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored)

bread() will always return a valid bp. So remplace the (always true) if (bp)
with a KASSERT.
Should fix Coverity ID 2444.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Feb 21 04:32:39 2006 UTC (7 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

Use device_class() instead of accessing dv_class directly.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:25 2005 UTC (7 years, 6 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.93: +33 -31 lines
Diff to previous 1.93 (colored)

merge ktrace-lwp.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Nov 2 12:39:00 2005 UTC (7 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.92: +4 -3 lines
Diff to previous 1.92 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.92 / (download) - annotate - [select for diffs], Tue Sep 27 06:48:55 2005 UTC (7 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.91: +7 -4 lines
Diff to previous 1.91 (colored)

introduce "ufs_ops" and use it for ITIMES.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:33 2005 UTC (7 years, 8 months ago) by jmmv
Branch: MAIN
Changes since 1.90: +4 -11 lines
Diff to previous 1.90 (colored)

Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Sep 12 20:23:03 2005 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored)

- access the ffs and ext2fs itimes functions through a pointer, so that
  if the filesystem is not compiled in the kernel still links. Probably
  a better solution is to use weak symbols.
- move the filesystem-specific itime macros to the filesystem header files.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Aug 30 22:01:12 2005 UTC (7 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.88: +22 -59 lines
Diff to previous 1.88 (colored)

* Remove __P()
* Use ANSI function declarations on ext2fs and mfs

Revision 1.88 / (download) - annotate - [select for diffs], Tue Aug 23 08:05:13 2005 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.87: +4 -3 lines
Diff to previous 1.87 (colored)

Don't overload MAXNAMLEN, use a separate constant for each filesystem type.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Jul 23 12:18:41 2005 UTC (7 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.86: +3 -2 lines
Diff to previous 1.86 (colored)

update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Jun 28 09:30:38 2005 UTC (7 years, 11 months ago) by yamt
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.85: +6 -6 lines
Diff to previous 1.85 (colored)

- constify genfs_ops.
- use member designators.

Revision 1.85 / (download) - annotate - [select for diffs], Sun May 29 21:25:24 2005 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.84: +7 -7 lines
Diff to previous 1.84 (colored)

- sprinkle const
- avoid shadow variables.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Mar 29 02:41:06 2005 UTC (8 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored)

- Define a VFS_ATTACH() macro that places a reference to a vfsops structure
  into the "vfsops" link set.
- Use VFS_ATTACH() where vfsops are declared for individual file systems.
- In vfsinit(), traverse the "vfsops" link set, rather than vfs_list_initial[].

Revision 1.83 / (download) - annotate - [select for diffs], Sat Feb 26 22:32:20 2005 UTC (8 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.82: +8 -8 lines
Diff to previous 1.82 (colored)

nuke trailing whitespace

Revision 1.82 / (download) - annotate - [select for diffs], Wed Feb 9 23:02:10 2005 UTC (8 years, 4 months ago) by ws
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.81: +5 -4 lines
Diff to previous 1.81 (colored)

Add support for large files (>2GB).
Like Linux, automagically convert old filesystem to use this,
if they are already at revision 1.
For revision 0, just punt (unlike Linux; makes me a bit too nervous.)

There should be an option to fsck_ext2fs to upgrade revision 0 to revision 1.

Reviewd by Manuel (bouyer@).

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 11 00:19:36 2005 UTC (8 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km, kent-audio2
Changes since 1.80: +14 -18 lines
Diff to previous 1.80 (colored)

Rearrange some code slightly to avoid uninitialized variable warnings.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Jan 9 09:27:17 2005 UTC (8 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Changes since 1.79: +127 -85 lines
Diff to previous 1.79 (colored)

Whoops -- move the location of the VOP_OPEN()/VOP_CLOSE(), et al, from
foo_mountfs() to foo_mount(), to match the new mountroot API.
Also, for ext2fs and lfs, copy some restructuring from ffs to allow changing
file system parameters without specifying the device name.
(ntfs could use some more work.)

Revision 1.79 / (download) - annotate - [select for diffs], Sun Jan 9 03:11:48 2005 UTC (8 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.78: +2 -9 lines
Diff to previous 1.78 (colored)

Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

Mentioned on tech-kern some time ago, IIRC.  I've been running this for a
long time.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Jan 2 16:08:30 2005 UTC (8 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +3 -2 lines
Diff to previous 1.77 (colored)

Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Nov 11 01:32:12 2004 UTC (8 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Put the correct fragment size in struct statvfs. From Kevin Lahey.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Sep 21 03:10:35 2004 UTC (8 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.75: +4 -2 lines
Diff to previous 1.75 (colored)

Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Aug 15 07:19:56 2004 UTC (8 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.74: +6 -3 lines
Diff to previous 1.74 (colored)

Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Aug 14 01:08:02 2004 UTC (8 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.73: +10 -6 lines
Diff to previous 1.73 (colored)

Add a new flag, IN_MODIFY.  This is like IN_UPDATE|IN_CHANGE, but unlike
setting those flags, it does not cause the inode to be written in the periodic
sync.  This is used for writes to special files (devices and named pipes) and
FIFOs.

Do not preemptively sync updates to access times and modification times.  They
are now updated in the inode only opportunistically, or when the file or device
is closed.  (Really, it should be delayed beyond close, but this is enough to
help substantially with device nodes.)

And the most amusing part:
Trickle sync was broken on both FFS and ext2fs, in different ways.  In FFS, the
periodic call to VFS_SYNC(MNT_LAZY) was still causing all file data to be
synced.  In ext2fs, it was causing the metadata to *not* be synced.  We now
only call VOP_UPDATE() on the node if we're doing MNT_LAZY.  I've confirmed
that we do in fact trickle correctly now.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jul 5 07:28:45 2004 UTC (8 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().

Revision 1.72 / (download) - annotate - [select for diffs], Tue May 25 14:54:58 2004 UTC (9 years ago) by hannken
Branch: MAIN
Changes since 1.71: +3 -2 lines
Diff to previous 1.71 (colored)

Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.71 / (download) - annotate - [select for diffs], Tue May 25 04:44:44 2004 UTC (9 years ago) by atatat
Branch: MAIN
Changes since 1.70: +4 -3 lines
Diff to previous 1.70 (colored)

Sysctl descriptions under vfs subtree

Revision 1.70 / (download) - annotate - [select for diffs], Thu May 20 05:39:34 2004 UTC (9 years, 1 month ago) by atatat
Branch: MAIN
Changes since 1.69: +11 -2 lines
Diff to previous 1.69 (colored)

Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.

Revision 1.69 / (download) - annotate - [select for diffs], Sun May 2 06:59:20 2004 UTC (9 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Fix typo in error message, reported by Piotr Meyer in PR 25418.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:43 2004 UTC (9 years, 1 month ago) by simonb
Branch: MAIN
Changes since 1.67: +9 -12 lines
Diff to previous 1.67 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Apr 21 01:05:44 2004 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.66: +21 -18 lines
Diff to previous 1.66 (colored)

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:55 2004 UTC (9 years, 2 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.65: +6 -4 lines
Diff to previous 1.65 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Mar 22 19:23:08 2004 UTC (9 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.64: +12 -13 lines
Diff to previous 1.64 (colored)

Fix disclaimer in my copyright. Pointed out by Thomas Klausner.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:25 2003 UTC (9 years, 6 months ago) by atatat
Branch: MAIN
Changes since 1.63: +19 -13 lines
Diff to previous 1.63 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Oct 14 14:02:56 2003 UTC (9 years, 8 months ago) by dbj
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD

Revision 1.62 / (download) - annotate - [select for diffs], Sun Oct 5 17:48:49 2003 UTC (9 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.61: +5 -7 lines
Diff to previous 1.61 (colored)

Remove references to University of California from my copyright notices.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:27 2003 UTC (9 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.60: +33 -3 lines
Diff to previous 1.60 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:33 2003 UTC (9 years, 11 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.59: +42 -44 lines
Diff to previous 1.59 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:39 2003 UTC (9 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +9 -11 lines
Diff to previous 1.58 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:24 2003 UTC (9 years, 11 months ago) by darrenr
Branch: MAIN
Changes since 1.57: +53 -49 lines
Diff to previous 1.57 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.57 / (download) - annotate - [select for diffs], Wed Apr 16 21:44:26 2003 UTC (10 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.56: +8 -14 lines
Diff to previous 1.56 (colored)

PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Apr 5 14:01:56 2003 UTC (10 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.55: +3 -2 lines
Diff to previous 1.55 (colored)

Actually get an ext2fs_dinode structure from the pool before using it.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Apr 2 10:39:35 2003 UTC (10 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.54: +9 -4 lines
Diff to previous 1.54 (colored)

Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Mar 21 23:11:28 2003 UTC (10 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.53: +7 -7 lines
Diff to previous 1.53 (colored)

Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jan 24 21:55:20 2003 UTC (10 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Sep 21 18:14:49 2002 UTC (10 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.51: +11 -2 lines
Diff to previous 1.51 (colored)

MNT_GETARGS support

Revision 1.51 / (download) - annotate - [select for diffs], Fri Sep 6 13:24:10 2002 UTC (10 years, 9 months ago) by gehenna
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jul 30 07:40:15 2002 UTC (10 years, 10 months ago) by soren
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored)

Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:45 2002 UTC (11 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.48: +3 -4 lines
Diff to previous 1.48 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Nov 8 02:39:08 2001 UTC (11 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, ifpoll-base, ifpoll
Changes since 1.47: +4 -1 lines
Diff to previous 1.47 (colored)

add RCSID

Revision 1.47 / (download) - annotate - [select for diffs], Tue Nov 6 07:09:39 2001 UTC (11 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Use the sector size from the partition info, not a hard-coded value.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Nov 6 07:08:09 2001 UTC (11 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (colored)

Remove a variable that is set but never used.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:41 2001 UTC (11 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.44: +18 -5 lines
Diff to previous 1.44 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 15 16:13:04 2001 UTC (11 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.43: +8 -1 lines
Diff to previous 1.43 (colored)

add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.

Revision 1.43 / (download) - annotate - [select for diffs], Wed May 30 11:57:19 2001 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: thorpej-devvp-base, perseant-lfsv2-base, perseant-lfsv2
Branch point for: thorpej-devvp, kqueue
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

use _KERNEL_OPT

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jan 22 12:17:42 2001 UTC (12 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored)

make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.41 / (download) - annotate - [select for diffs], Sun Dec 10 19:36:32 2000 UTC (12 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.40: +4 -3 lines
Diff to previous 1.40 (colored)

in *_sync(), don't skip vnodes which have (potentially dirty) pages.

Revision 1.40 / (download) - annotate - [select for diffs], Mon Nov 27 08:39:53 2000 UTC (12 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.39: +6 -1 lines
Diff to previous 1.39 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Sep 19 22:03:05 2000 UTC (12 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Adapt for VOP_FSYNC parameter change.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 22 14:49:17 2000 UTC (12 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.37: +9 -3 lines
Diff to previous 1.37 (colored)

ext2fs_reload(), ext2fs_mountfs(): do devvp locking same way as ffs
this has not shown any good or bad effect, but might help narrow
some problems people seen with ext2fs reload (hi Soren!)

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jun 30 20:45:38 2000 UTC (12 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.36: +12 -6 lines
Diff to previous 1.36 (colored)

Rearrange code around getnewvnode as was already done for ffs, to avoid
locking against oneself because getnewvnode recycles a softdep-using vnode.

Revision 1.36 / (download) - annotate - [select for diffs], Mon May 29 18:34:36 2000 UTC (13 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.35: +15 -11 lines
Diff to previous 1.35 (colored)

Pull in IN_ACCESSED changes and some MNT_LAZY `bug fixes' from FFS.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 30 12:41:11 2000 UTC (13 years, 2 months ago) by augustss
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.34: +25 -25 lines
Diff to previous 1.34 (colored)

Remove register declarations.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Mar 16 18:08:32 2000 UTC (13 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.33: +8 -1 lines
Diff to previous 1.33 (colored)

Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jan 31 11:34:55 2000 UTC (13 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.32: +7 -6 lines
Diff to previous 1.32 (colored)

Check that we can handle the inode size before mounting the fs, and correct
a return value.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jan 28 16:00:23 2000 UTC (13 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.31: +15 -7 lines
Diff to previous 1.31 (colored)

Correct (minor) bogons in filetype option support, and add support
for sparse_super option

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jan 26 16:21:34 2000 UTC (13 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.30: +57 -38 lines
Diff to previous 1.30 (colored)

First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:13 1999 UTC (13 years, 7 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.29: +7 -6 lines
Diff to previous 1.29 (colored)

Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O

Revision 1.29 / (download) - annotate - [select for diffs], Wed Oct 20 14:32:11 1999 UTC (13 years, 8 months ago) by enami
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Check if the type of device node isn't VBAD before touching v_specinfo.  If
the device vnode is revoked, the field is NULL and touching it causes null
pointer derefercence.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Oct 16 23:53:28 1999 UTC (13 years, 8 months ago) by wrstuden
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.27: +5 -2 lines
Diff to previous 1.27 (colored)

In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jul 17 01:08:29 1999 UTC (13 years, 11 months ago) by wrstuden
Branch: MAIN
CVS Tags: chs-ubc2-base
Branch point for: wrstuden-devbsize
Changes since 1.26: +5 -2 lines
Diff to previous 1.26 (colored)

Adjust mountroot routines to vrele rootvp in case of mount error. Closes
PR 7977 by Neil Carson, <neil@brini.com>.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jul 8 01:06:04 1999 UTC (13 years, 11 months ago) by wrstuden
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)

Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 1 13:18:49 1999 UTC (14 years ago) by bouyer
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

memset ump->um_e2fs to 0 after malloc, it is bigger than SBSIZE and thus some
parts were left uninitialised. The symptom was that a read-only mount tried
to rewrite back the superblock.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Feb 26 23:44:49 1999 UTC (14 years, 3 months ago) by wrstuden
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.23: +20 -56 lines
Diff to previous 1.23 (colored)

Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Feb 10 13:14:09 1999 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.22: +21 -13 lines
Diff to previous 1.22 (colored)

Make sure a buffer optained from bread() is always bresle()'d in case of
error. Closes PR kern/1448 from Wolfgang Solfrank.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 2 10:44:53 1998 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.21: +2 -3 lines
Diff to previous 1.21 (colored)

- intentation
- sync LK_* flags with ffs/ufs

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 1 14:37:44 1998 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

In ext2fs_sync(), don't flush the vnode if vput() returned an error. Fixes
PR kern/6495.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 23 00:33:24 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.19: +12 -9 lines
Diff to previous 1.19 (colored)

For consistency w/ FFS/LFS, define EXT2_DINODE_SIZE, and use it instead
of pointer arithmetic and/or sizeof(struct ext2fs_dinode).

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 29 10:24:58 1998 UTC (14 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.18: +2 -7 lines
Diff to previous 1.18 (colored)

#include opt_uvm.h only if _KENREL and !_LKM
Make ext2fs_init() call ufs_init(). it was doing the init by itself,
testing for extern done != 0. This bug was hidden by the fact that
ext2fs_init() is called before ffs_init().

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 13 15:14:40 1998 UTC (14 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

Fix copyright '\t' -> ' '

Revision 1.17 / (download) - annotate - [select for diffs], Tue Sep 1 03:20:46 1998 UTC (14 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.16: +12 -3 lines
Diff to previous 1.16 (colored)

Use the pool allocator and "nointr" pool page allocator for ext2fs inodes.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Aug 9 20:15:39 1998 UTC (14 years, 10 months ago) by perry
Branch: MAIN
Changes since 1.15: +10 -10 lines
Diff to previous 1.15 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 5 08:49:48 1998 UTC (14 years, 11 months ago) by jonathan
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.14: +5 -1 lines
Diff to previous 1.14 (colored)

* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 24 20:58:47 1998 UTC (14 years, 11 months ago) by sommerfe
Branch: MAIN
Changes since 1.13: +2 -8 lines
Diff to previous 1.13 (colored)

Always include fifos; "not an option any more".

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jun 22 22:01:08 1998 UTC (15 years ago) by sommerfe
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

defopt for options FIFO

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 5 19:53:02 1998 UTC (15 years ago) by kleink
Branch: MAIN
Changes since 1.11: +5 -3 lines
Diff to previous 1.11 (colored)

Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Mar 18 15:57:26 1998 UTC (15 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Add support for reading/writing FFS in non-native byte order, conditioned
to "options FFS_EI". The superblock and inodes (without blk addr) are
byteswapped at disk read/write time, other metadatas are byteswapped
when used (as they are acceeded directly in the buffer cache).
This required the addition of a "um_flags" field to struct ufsmount.
ffs_bswap.c contains superblock and inode byteswap routines also used
by userland utilities.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 2 16:13:42 1998 UTC (15 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.9: +16 -15 lines
Diff to previous 1.9 (colored)

Close kern/5077: When DIAGNOSTIC is defined, don't complain about
bad magic numbers at a mount attempt. A message is still printed when the
magic number is OK, but the version number or the block size is bad.
Patch from Soren S. Jorvang, but different from the one in the PR.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 1 02:23:46 1998 UTC (15 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.8: +101 -71 lines
Diff to previous 1.8 (colored)

Merge with Lite2 + local changes

Revision 1.8 / (download) - annotate - [select for diffs], Wed Feb 18 17:02:20 1998 UTC (15 years, 4 months ago) by drochner
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

add missing vfsops element

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 18 07:05:49 1998 UTC (15 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +16 -1 lines
Diff to previous 1.6 (colored)

Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().

Revision 1.6 / (download) - annotate - [select for diffs], Mon Oct 27 14:43:41 1997 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

When allocating an inode with dtime set, also bzero e2di_blocks[].

Revision 1.5 / (download) - annotate - [select for diffs], Thu Oct 23 11:41:20 1997 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.4: +7 -2 lines
Diff to previous 1.4 (colored)

Uses ext2fs_vinit not ufs_vinit.
In ext2fs, an inode is deleted either when mode == 0 or dtime != 0. If
  dtime != 0, reset others fields before using the inode, or we could end
  up with the wrong v_op in ext2fs_vinit.
While I'm there, kill a unused variable in ext2fs_readwrite

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 9 15:42:53 1997 UTC (15 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-3-base, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.3: +24 -23 lines
Diff to previous 1.3 (colored)

Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 17 16:56:44 1997 UTC (15 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.2: +10 -3 lines
Diff to previous 1.2 (colored)

Add a lock locking around inode hashing.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 12 17:14:56 1997 UTC (16 years ago) by mrg
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

remove swap configuration.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jun 11 09:34:07 1997 UTC (16 years ago) by bouyer
Branch: MAIN

The ext2fs layer, based on the ffs/ufs one. Uses a few functions from
sys/ufs/ufs/

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>