Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/ufs/ufs/inode.h

[BACK] Up to [FreeBSD] / src / sys / ufs / ufs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Feb 6 11:04:36 2012 UTC (3 days, 10 hours ago) by kib
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +0 -1 lines
SVN rev 231075 on 2012-02-06 11:04:36Z by kib

Current implementations of sync(2) and syncer vnode fsync() VOP uses
mnt_noasync counter to temporary remove MNTK_ASYNC mount option, which
is needed to guarantee a synchronous completion of the initiated i/o
before syscall or VOP return.  Global removal of MNTK_ASYNC option is
harmful because not only i/o started from corresponding thread becomes
synchronous, but all i/o is synchronous on the filesystem which is
initiated during sync(2) or syncer activity.

Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local
thread flag to disable async i/o for current thread only. Use the
opportunity to move DOINGASYNC() macro into sys/vnode.h and
consistently use it through places which tested for MNTK_ASYNC.

Some testing demonstrated 60-70% improvements in run time for the
metadata-intensive operations on async-mounted UFS volumes, but still
with great deviation due to other reasons.

Reviewed by:	mckusick
Tested by:	scottl
MFC after:	2 weeks

Revision 1.61.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.61.2.1: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Jul 30 00:43:18 2011 UTC (6 months, 1 week ago) by mckusick
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +5 -3 lines
SVN rev 224503 on 2011-07-30 00:43:18Z by mckusick

Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP
is set so that mount can revert back to using MNT_NOWAIT when doing
getmntinfo.

Approved by: re (kib)

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Jul 24 18:27:09 2011 UTC (6 months, 2 weeks ago) by mckusick
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +1 -1 lines
SVN rev 224294 on 2011-07-24 18:27:09Z by mckusick

Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flag
so that it is visible to userland programs. This change enables
the `mount' command with no arguments to be able to show if a
filesystem is mounted using journaled soft updates as opposed
to just normal soft updates.

Approved by: re (bz)

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Jun 10 22:48:35 2011 UTC (8 months ago) by jeff
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -0 lines
SVN rev 222958 on 2011-06-10 22:48:35Z by jeff

Implement fully asynchronous partial truncation with softupdates journaling
to resolve errors which can cause corruption on recovery with the old
synchronous mechanism.

 - Append partial truncation freework structures to indirdeps while
   truncation is proceeding.  These prevent new block pointers from
   becoming valid until truncation completes and serialize truncations.
 - On completion of a partial truncate journal work waits for zeroed
   pointers to hit indirects.
 - softdep_journal_freeblocks() handles last frag allocation and last
   block zeroing.
 - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it
   is only implemented in one place.
 - Block allocation failure handling moved up one level so it does not
   proceed with buf locks held.  This permits us to do more extensive
   reclaims when filesystem space is exhausted.
 - softdep_sync_metadata() is broken into two parts, the first executes
   once at the start of ffs_syncvnode() and flushes truncations and
   inode dependencies.  The second is called on each locked buf.  This
   eliminates excessive looping and rollbacks.
 - Improve the mechanism in process_worklist_item() that handles
   acquiring vnode locks for handle_workitem_remove() so that it works
   more generally and does not loop excessively over the same worklist
   items on each call.
 - Don't corrupt directories by zeroing the tail in fsck.  This is only
   done for regular files.
 - Push a fsync complete record for files that need it so the checker
   knows a truncation in the journal is no longer valid.

Discussed with:	mckusick, kib (ffs_pages_remove and ffs_truncate parts)
Tested by:	pho

Revision 1.56.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 24 11:01:42 2011 UTC (9 months, 2 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.56.2.1: preferred, colored; branchpoint 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.2.1: +1 -1 lines
SVN rev 220986 on 2011-04-24 11:01:42Z by kib

Merge the part of r207141 that fixes the locking for ufs_rename() (and
r218838 followup).

Adopt the SU calls to the stable/8 SU implementation, with the help from
Kirk.

PR:	kern/156545
Reviewed by:	mckusick
Tested by:	pho

Revision 1.51.2.3.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.51.2.3: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.3: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.56.2.1.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.56.2.2: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Jul 6 07:11:04 2010 UTC (19 months ago) by jeff
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +0 -1 lines
SVN rev 209717 on 2010-07-06 07:11:04Z by jeff

 - Handle the truncation of an inode with an effective link count of 0 in
   the context of the process that reduced the effective count.  Previously
   all truncation as a result of unlink happened in the softdep flush
   thread.  This had the effect of being impossible to rate limit properly
   with the journal code.  Now the process issuing unlinks is suspended
   when the journal files.  This has a side-effect of improving rm
   performance by allowing more concurrent work.
 - Handle two cases in inactive, one for effnlink == 0 and another when
   nlink finally reaches 0.
 - Eliminate the SPACECOUNTED related code since the truncation is no
   longer delayed.

Discussed with:	mckusick

Revision 1.56.2.1.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.56.2.2: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Apr 24 07:05:35 2010 UTC (21 months, 2 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -1 lines
SVN rev 207141 on 2010-04-24 07:05:35Z by jeff

 - Merge soft-updates journaling from projects/suj/head into head.  This
   brings in support for an optional intent log which eliminates the need
   for background fsck on unclean shutdown.

Sponsored by:   iXsystems, Yahoo!, and Juniper.
With help from: McKusick and Peter Holm

Revision 1.51.2.3.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.51.2.3: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.3: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.56.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.56.2.1: preferred, colored; next MAIN 1.56.2.2: preferred, colored
Changes since revision 1.56.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP, RELENG_8_0_BP
Branch point for: RELENG_8_2, RELENG_8_1, RELENG_8_0
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Apr 27 16:46:16 2009 UTC (2 years, 9 months ago) by rmacklem
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +0 -1 lines
SVN rev 191564 on 2009-04-27 16:46:16Z by rmacklem

 	Change the semantics of i_modrev/va_filerev to what is required for
 	the nfsv4 Change attribute. There are 2 changes:
 	1 - The value now changes on metadata changes as well as data
 	    modifications (incremented for IN_CHANGE instead of IN_UPDATE).
 	2 - It is now saved in spare space in the on-disk i-node so that it
 	    survives a crash.
 	Since va_filerev is not passed out into user space, the only current
 	use of va_filerev is in the nfs server, which uses it as the directory
 	cookie verifier. Since this verifier is only passed back to the server
 	by a client verbatim and then the server doesn't check it, changing the
 	semantics should not break anything currently in FreeBSD.

Reviewed by:	bde
Approved by:	kib (mentor)

Revision 1.51.2.3.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.51.2.3: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.3: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.51.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 27 15:57:52 2009 UTC (2 years, 10 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP, RELENG_7_2_BP
Branch point for: RELENG_7_4, RELENG_7_3, RELENG_7_2
Diff to: previous 1.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.2: +8 -0 lines
SVN rev 190470 on 2009-03-27 15:57:52Z by kib

MFC r189737:
The non-modifying EA VOPs are executed with only shared vnode lock taken.
Provide a custom lock around initializing and tearing down EA area,
to prevent both memory leaks and double-free of it. Count the number
of EA area accessors.

Put the new field i_ea_refs to the end of the struct inode to keep
structure layout stable on releng branch for the benefit of lsof.

MFC r190469:
Correct typo.

ABI issue pointed out by:	kensmith
Approved by:	re (kensmith)

Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Mar 12 12:43:56 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -0 lines
SVN rev 189737 on 2009-03-12 12:43:56Z by kib

The non-modifying EA VOPs are executed with only shared vnode lock taken.
Provide a custom lock around initializing and tearing down EA area,
to prevent both memory leaks and double-free of it. Count the number
of EA area accessors.

Lock protocol requires either holding exclusive vnode lock to modify
i_ea_area, or shared vnode lock and owning IN_EA_LOCKED flag in i_flag.

Noted by:	YAMAMOTO, Taku <taku tackymt homeip net>
Tested by:	pho (previous version)
MFC after:	2 weeks

Revision 1.51.2.2: download - view: text, markup, annotated - select for diffs
Tue Jan 20 19:01:59 2009 UTC (3 years ago) by jhb
Branches: RELENG_7
Diff to: previous 1.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +0 -2 lines
SVN rev 187478 on 2009-01-20 19:01:59Z by jhb

MFC: Close several races with using shared vnode locks for pathname lookups
with UFS and enable shared lookups for UFS.
- Change the name cache to fail lookups with EBADF if a directory vnode
  is recycled while it waits for a lock upgrade.
- Rework the locking of the dirhash to use an sx lock and reference count
  on each hash structure.  Using an sx lock instead of a mutex allows the
  lock to be held across disk I/O closing a number of races when using
  shared vnode locks that were previously handled by exclusive vnode
  locks.
- Remove the 'i_ino' and 'i_reclen' fields from the i-node.  i_ino is now
  a local variable in ufs_lookup(), and i_reclen is not needed since
  ufs_dirremove() always has the entire block holding the directory
  entry in memory when it updates the directory.
- 'i_diroff' and 'i_offset' are now local variables in ufs_lookup().
  'i_diroff' is updated after a successful lookup.
- Only set i_offset in the parent directory's i-node during a lookup for
  non-LOOKUP operations.
- Remove the LOOKUP_SHARED option.  One can set vfs.lookup_shared to 1
  in either loader.conf or sysctl.conf instead.  The default setting for
  vfs.lookup_shared is not changed and remains off by default.

Revision 1.51.2.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.51.2.1: preferred, colored; next MAIN 1.51.2.2: preferred, colored
Changes since revision 1.51.2.1: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.49.2.1.6.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.49.2.1: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49.2.1: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Sep 16 19:06:44 2008 UTC (3 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +0 -1 lines
SVN rev 183093 on 2008-09-16 19:06:44Z by jhb

Retire the 'i_reclen' field from the in-memory i-node.  Previously,
during a DELETE lookup operation, lookup would cache the length of the
directory entry to be deleted in 'i_reclen'.  Later, the actual VOP to
remove the directory entry (ufs_remove, ufs_rename, etc.) would call
ufs_dirremove() which extended the length of the previous directory
entry to "remove" the deleted entry.

However, we always read the entire block containing the directory
entry when doing the removal, so we always have the directory entry to
be deleted in-memory when doing the update to the directory block.
Also, we already have to figure out where the directory entry that is
being removed is in the block so that we can pass the component name
to the dirhash code to update the dirhash.  So, instead of passing
'i_reclen' from ufs_lookup() to the ufs_dirremove() routine, just read
the 'd_reclen' field directly out of the entry being removed when
updating the length of the previous entry in the block.

This avoids a cosmetic issue of writing to 'i_reclen' while holding a
shared vnode lock.  It also slightly reduces the amount of side-band
data passed from ufs_lookup() to operations updating a directory via
the directory's i-node.

Reviewed by:	jeff

Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 1 09:46:19 2008 UTC (3 years, 6 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +0 -1 lines
SVN rev 181119 on 2008-08-01 09:46:19Z by kib

MFC r178243:
Move the head of byte-level advisory lock list from the
filesystem-specific vnode data to the struct vnode. Provide the
default implementation for the vop_advlock and vop_advlockasync.
Purge the locks on the vnode reclaim by using the lf_purgelocks().
The default implementation is augmented for the nfs and smbfs.
In the nfs_advlock, push the Giant inside the nfs_dolock.

Before the change, the vop_advlock and vop_advlockasync have taken the
unlocked vnode and dereferenced the fs-private inode data, racing with
with the vnode reclamation due to forced unmount. Now, the vop_getattr
under the shared vnode lock is used to obtain the inode size, and
later, in the lf_advlockasync, after locking the vnode interlock, the
VI_DOOMED flag is checked to prevent an operation on the doomed vnode.

MFC r178247:
Fix compilation with LOCKF_DEBUG.

As was announced on the stable@, the MFC changes the VFS KBI on RELENG_7.

Approved by:	re (kensmith)

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Apr 22 12:34:16 2008 UTC (3 years, 9 months ago) by jeff
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +0 -1 lines
 - Use a local variable for i_ino in ufs_lookup.  It is only used to
   communicate between two parts of this one function.  This was causing
   problems with shared lookups as each would trash the ino value in the
   inode.
 - Remove the unused i_ino field from the inode structure.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Apr 16 11:33:32 2008 UTC (3 years, 9 months ago) by kib
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +0 -1 lines
Move the head of byte-level advisory lock list from the
filesystem-specific vnode data to the struct vnode. Provide the
default implementation for the vop_advlock and vop_advlockasync.
Purge the locks on the vnode reclaim by using the lf_purgelocks().
The default implementation is augmented for the nfs and smbfs.
In the nfs_advlock, push the Giant inside the nfs_dolock.

Before the change, the vop_advlock and vop_advlockasync have taken the
unlocked vnode and dereferenced the fs-private inode data, racing with
with the vnode reclamation due to forced unmount. Now, the vop_getattr
under the shared vnode lock is used to obtain the inode size, and
later, in the lf_advlockasync, after locking the vnode interlock, the
VI_DOOMED flag is checked to prevent an operation on the doomed vnode.

The implementation of the lf_purgelocks() is submitted by dfr.

Reported by:	kris
Tested by:	kris, pho
Discussed with:	jeff, dfr
MFC after:	2 weeks

Revision 1.49.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 7 16:56:11 2006 UTC (5 years, 3 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Branch point for: RELENG_6_4
Diff to: previous 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49: +9 -0 lines
MFC
sys/ufs/ffs/ffs_inode.c rev. 1.107
sys/ufs/ffs/ffs_snapshot.c rev. 1.131
sys/ufs/ffs/ffs_vnops.c rev. 1.161
sys/ufs/ufs/inode.h rev. 1.51
sys/ufs/ufs/ufs_vnops.c rev. 1.280

Do not translate the IN_ACCESS inode flag into the IN_MODIFIED while filesystem
is suspending/suspended. Doing so may result in deadlock. Instead, set the
(new) IN_LAZYACCESS flag, that becomes IN_MODIFIED when suspend is lifted.

Change the locking protocol in order to set the IN_ACCESS and timestamps
without upgrading shared vnode lock to exclusive (see comments in the
inode.h). Before that, inode was modified while holding only shared
lock.

Tested on RELENG_6 by:	Peter Holm
Approved by:	re (kensmith)

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Oct 10 09:20:54 2006 UTC (5 years, 4 months ago) by kib
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +9 -0 lines
Do not translate the IN_ACCESS inode flag into the IN_MODIFIED while filesystem
is suspending/suspended. Doing so may result in deadlock. Instead, set the
(new) IN_LAZYACCESS flag, that becomes IN_MODIFIED when suspend is lifted.

Change the locking protocol in order to set the IN_ACCESS and timestamps
without upgrading shared vnode lock to exclusive (see comments in the
inode.h). Before that, inode was modified while holding only shared
lock.

Tested by:	Peter Holm
Reviewed by:	tegge, bde
Approved by:	pjd (mentor)
MFC after:	3 weeks

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Sep 26 04:15:59 2006 UTC (5 years, 4 months ago) by tegge
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -1 lines
Add mnt_noasync counter to better handle interleaved calls to nmount(),
sync() and sync_fsync() without losing MNT_ASYNC.  Add MNTK_ASYNC flag
which is set only when MNT_ASYNC is set and mnt_noasync is zero, and
check that flag instead of MNT_ASYNC before initiating async io.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Mar 14 10:21:16 2005 UTC (6 years, 10 months ago) by phk
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +0 -2 lines
Use vfs_hash instead of home-rolled.

Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:27:01 2005 UTC (7 years ago) by imp
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +1 -1 lines
MFC: /*- and related license changes

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Jan 7 02:29:26 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +1 -1 lines
/* -> /*- for license, minor formatting changes

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Oct 29 10:15:56 2004 UTC (7 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -0 lines
Move UFS from DEVFS backing to GEOM backing.

This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.

Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
	syv# mount -p
	/dev/md0        /var    ufs rw  2 2
	/dev/ad0        /mnt    ufs ro  1 1
	/dev/ad0        /mnt2   ufs ro  1 1
	/dev/ad0        /mnt3   ufs ro  1 1

Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.

Details:

	Add a geom consumer and a bufobj pointer to ufsmount.

	Eliminate the vnode argument from softdep_disk_prewrite().
	Pick the vnode out of bp->b_vp for now.  Eventually we
	should find it through bp->b_bufobj->b_private.

	In the mountcode, use g_vfs_open() once we have used
	VOP_ACCESS() to check permissions.

	When upgrading and downgrading between r/o and r/w do the
	right thing with GEOM access counts.  Remove all the
	workarounds for not being able to do this with VOP_OPEN().

	If we are the root mount, drop the exclusive access count
	until we upgrade to r/w.  This allows fsck of the root
	filesystem and the MNT_RELOAD to work correctly.

	Set bo_private to the GEOM consumer on the device bufobj.

	Change the ffs_ops->strategy function to call g_vfs_strategy()

	In ufs_strategy() directly call the strategy on the disk
	bufobj.  Same in rawread.

	In ffs_fsync() we will no longer see VCHR device nodes, so
	remove code which synced the filesystem mounted on it, in
	case we came there.  I'm not sure this code made sense in
	the first place since we would have taken the specfs route
	on such a vnode.

	Redo the highly bogus readblock() function in the snapshot
	code to something slightly less bogus: Constructing an uio
	and using physio was really quite a detour.  Instead just
	fill in a bio and ship it down.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Jul 28 06:41:27 2004 UTC (7 years, 6 months ago) by kan
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +6 -0 lines
Avoid using casts as lvalues. Introduce DIP_SET macro which sets proper
inode field based on UFS version. Use DIP ro read values and DIP_SET
to modify them throughout FFS code base.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Apr 7 03:47:20 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +0 -4 lines
Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and irc message from Robert
Watson saying that clause 3 can be removed from those files with an
NAI copyright that also have only a University of California
copyrights.

Approved by: core, rwatson

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Aug 15 20:03:19 2003 UTC (8 years, 5 months ago) by phk
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +1 -1 lines
Eliminate the i_devvp field from the incore UFS inodes, we can
get the same value from ip->i_ump->um_devvp.

This saves a pointer in the memory copies of inodes, which can
easily run into several hundred kilobytes.

The extra indirection is unmeasurable in benchmarks.

Approved by:	mckusick

Revision 1.41.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 17 22:36:33 2002 UTC (9 years, 1 month ago) by mckusick
Branches: RELENG_5_0
CVS tags: RELENG_5_0_0_RELEASE
Diff to: previous 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41: +6 -3 lines
Only the most recent snapshot contains the complete list of blocks
that were copied in all of the earlier snapshots, thus its precomputed
list must be used in the copyonwrite test. Using incomplete lists may
lead to deadlock. Also do not include the blocks used for the indirect
pointers in the indirect pointers as this may lead to inconsistent
snapshots.

Reviewed by:    Ian Dowse <iedowse@maths.tcd.ie>
Sponsored by:   DARPA & NAI Labs.
Approved by:    re
MFC from:	src/sys/sys/conf.h 1.151
MFC from:	src/sys/ufs/ufs/inode.h 1.42 & 1.43
MFC from:	src/sys/ufs/ffs/ffs_snapshot.c 1.54 & 1.55

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Dec 15 19:25:59 2002 UTC (9 years, 1 month ago) by mckusick
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +6 -1 lines
Update to previous change (1.54) to use an approperly wide inode field
so as to work correctly on 64-bit platforms.

Reported-by:	Jake Burkholder <jake@locore.ca>
Sponsored by:   DARPA & NAI Labs.
Approved by:	Ian Dowse <iedowse@maths.tcd.ie>

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Dec 14 01:36:59 2002 UTC (9 years, 1 month ago) by mckusick
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +0 -2 lines
Only the most recent snapshot contains the complete list of blocks
that were copied in all of the earlier snapshots, thus its precomputed
list must be used in the copyonwrite test. Using incomplete lists may
lead to deadlock. Also do not include the blocks used for the indirect
pointers in the indirect pointers as this may lead to inconsistent
snapshots.

Sponsored by:   DARPA & NAI Labs.
Approved by:	re

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Oct 9 07:28:35 2002 UTC (9 years, 4 months ago) by mckusick
Branches: MAIN
CVS tags: RELENG_5_0_BP
Branch point for: RELENG_5_0
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -1 lines
When creating a snapshot, create a list of initially allocated blocks.
Whenever doing a copy-on-write check, first look in the list of
initially allocated blocks to see if it is there. If so, no further
check is needed. If not, fall through and do the full check. This
change eliminates one of two known deadlocks caused by snapshots.
Handling the second deadlock will be the subject of another check-in.
This change also reduces the cost of the copy-on-write check by
speeding up the verification of frequently checked blocks.

Sponsored by:	DARPA & NAI Labs.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Sep 27 20:03:05 2002 UTC (9 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +1 -1 lines
Make it a tad easier to deal with struct inode in userland programs which
fondle /dev/kmem by using "struct cdev *" instead of "dev_t".

Requsted by:	jake

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Sep 5 20:59:42 2002 UTC (9 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +8 -0 lines
Implement the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.

Use extattr_check_cred() to check access to EAs.

This is still a WIP.

Sponsored by:   DARPA & NAI Labs.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Jun 21 06:18:04 2002 UTC (9 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +39 -29 lines
This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat May 18 18:51:14 2002 UTC (9 years, 8 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -8 lines
Remove um_i_effnlink_valid, i_spare[] and the ufsmount_u and inode_u
unions, since these were only necessary when ext2fs used ufs code.

Reviewed by:	mckusick

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 29 12:52:52 2001 UTC (10 years, 4 months ago) by iedowse
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1: +2 -2 lines
MFC: Bring sizeof(struct inode) back to 256 bytes by reducing the
size of i_spare[] and making ext2fs use a spare dinode field instead.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Sep 24 18:29:20 2001 UTC (10 years, 4 months ago) by iedowse
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
The addition of i_dirhash to struct inode pushed RELENG_4's
sizeof(struct inode) into a new malloc bucket on the i386. This
didn't happen in -current due to the removal of i_lock, but it does
no harm to apply the workaround to -current first.

Reduce the size of the i_spare[] array in struct inode from 4 to
3 entries, and change ext2fs to use i_din.di_spare[1] so that it
does not need i_spare[3].

Reviewed by:	bde
MFC after:	3 days

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 1 19:33:39 2001 UTC (10 years, 6 months ago) by iedowse
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -1 lines
MFC: Directory hashing for better performance on large directories.
This is turned off by default; to enable it, add "options UFS_DIRHASH"
to the kernel config file.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Jul 10 21:21:29 2001 UTC (10 years, 7 months ago) by iedowse
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -1 lines
Bring in dirhash, a simple hash-based lookup optimisation for large
directories. When enabled via "options UFS_DIRHASH", in-core hash
arrays are maintained for large directories. These allow all
directory operations to take place quickly instead of requiring
long linear searches. For now anyway, dirhash is not enabled by
default.

The in-core hash arrays have a memory requirement that is approximately
half the size of the size of the on-disk directory file. A number
of new sysctl variables allow control over which directories get
hashed and over the maximum amount of memory that dirhash will use:

  vfs.ufs.dirhash_minsize
    The minimum on-disk directory size for which hashing should be
    used. The default is 2560 (2.5k).

  vfs.ufs.dirhash_maxmem
    The system-wide maximum total memory to be used by dirhash data
    structures. The default is 2097152 (2MB).

The current amount of memory being used by dirhash is visible
through the read-only sysctl variable vfs.ufs.dirhash_maxmem.
Finally, some extra sanity checks that are enabled by default, but
which may have an impact on performance, can be disabled by setting
vfs.ufs.dirhash_docheck to 0.

Discussed on: -fs, -hackers

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue May 8 07:42:20 2001 UTC (10 years, 9 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -5 lines
When running with soft updates, track the number of blocks and files
that are committed to being freed and reflect these blocks in the
counts returned by statfs (and thus also by the `df' command). This
change allows programs such as those that do news expiration to
know when to stop if they are trying to create a certain percentage
of free space. Note that this change does not solve the much harder
problem of making this to-be-freed space available to applications
that want it (thus on a nearly full filesystem, you may still
encounter out-of-space conditions even though the free space will
show up eventually). Hopefully this harder problem will be the
subject of a future enhancement.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Mar 7 07:09:55 2001 UTC (10 years, 11 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Fixes to track snapshot copy-on-write checking in the specinfo
structure rather than assuming that the device vnode would reside
in the FFS filesystem (which is obviously a broken assumption with
the device filesystem).

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Sep 25 15:24:04 2000 UTC (11 years, 4 months ago) by bp
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -2 lines
Add a lock structure to vnode structure. Previously it was either allocated
separately (nfs, cd9660 etc) or keept as a first element of structure
referenced by v_data pointer(ffs). Such organization leads to known problems
with stacked filesystems.

From this point vop_no*lock*() functions maintain only interlock lock.
vop_std*lock*() functions maintain built-in v_lock structure using lockmgr().
vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared
lock on vnode.

If filesystem wishes to export lockmgr compatible lock, it can put an address
of this lock to v_vnlock field. This indicates that the upper filesystem
can take advantage of it and use single lock structure for entire (or part)
of stack of vnodes. This field shouldn't be examined or modified by VFS code
except for initialization purposes.

Reviewed in general by:	mckusick

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Jul 11 22:07:55 2000 UTC (11 years, 7 months ago) by mckusick
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -1 lines
Add snapshots to the fast filesystem. Most of the changes support
the gating of system calls that cause modifications to the underlying
filesystem. The gating can be enabled by any filesystem that needs
to consistently suspend operations by adding the vop_stdgetwritemount
to their set of vnops. Once gating is enabled, the function
vfs_write_suspend stops all new write operations to a filesystem,
allows any filesystem modifying system calls already in progress
to complete, then sync's the filesystem to disk and returns. The
function vfs_write_resume allows the suspended write operations to
begin again. Gating is not added by default for all filesystems as
for SMP systems it adds two extra locks to such critical kernel
paths as the write system call. Thus, gating should only be added
as needed.

Details on the use and current status of snapshots in FFS can be
found in /sys/ufs/ffs/README.snapshot so for brevity and timelyness
is not included here. Unless and until you create a snapshot file,
these changes should have no effect on your system (famous last words).

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri May 26 02:07:07 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue May 23 20:39:22 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Dec 29 04:55:05 1999 UTC (12 years, 1 month ago) by peter
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -3 lines
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers.  "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:38:50 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_1_0
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.9.2.1: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:24:00 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_2_2
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:33:18 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:52:28 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -1 lines
$Id$ -> $FreeBSD$

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jul 13 18:20:11 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 lines
Create the macro DOINGASYNC to check whether the MNT_ASYNC flag has
been set for a mount point. Insert missing checks to ensure that all
write operations are done asynchronously when the MNT_ASYNC option
has been requested.

Submitted by:	Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Mar 6 05:21:09 1999 UTC (12 years, 11 months ago) by bde
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, PRE_NEWBUS, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -1 lines
Don't depend on <ufs/ufs/quota.h> or another (old) prerequisite including
<sys/queue.h>.  This fixes my recent breakage of biosboot by unpolluting
<ufs/ufs/quota.h> in the !KERNEL case.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Oct 13 15:45:43 1998 UTC (13 years, 4 months ago) by bde
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE, RELENG_3_0_0_RELEASE
Branch point for: RELENG_3
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
Fixed bloatage of `struct inode'.  We used 5 "spare" fields for ext2fs,
but when i_effnlink was added to support soft updates, there was only
room for 4 spares.  The number of spares was not reduced, so the inode
size became 260 (on i386's), or 512 after rounding up by malloc().
Use one spare field in `struct dinode' instead of the 5th spare field
in the inode and reduced to 4 spares in the inode so that the size is
256 again.

Changed the types of the spares in the inode from int to u_int32_t
so that the inode size has more chance of being <= 256 under other
arches, and downdated ext2fs to match (it was broken to use ints
before rev.1.1).

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Jul 3 22:17:01 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
CVS tags: PRE_NOBDEV
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -1 lines
Sync timestamp changes for inodes of special files to disk as late
as possible (when the inode is reclaimed).  Temporarily only do
this if option UFS_LAZYMOD configured and softupdates aren't enabled.
UFS_LAZYMOD is intentionally left out of /sys/conf/options.

This is mainly to avoid almost useless disk i/o on battery powered
machines.  It's silly to write to disk (on the next sync or when the
inode becomes inactive) just because someone hit a key or something
wrote to the screen or /dev/null.

PR:		5577
Previous version reviewed by:	phk

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Mar 26 20:53:58 1998 UTC (13 years, 10 months ago) by phk
Branches: MAIN
CVS tags: PRE_DEVFS_SLICE, POST_DEVFS_SLICE
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +1 -24 lines
Add two new functions, get{micro|nano}time.

They are atomic, but return in essence what is in the "time" variable.
gettime() is now a macro front for getmicrotime().

Various patches to use the two new functions instead of the various
hacks used in their absence.

Some puntuation and grammer patches from Bruce.

A couple of XXX comments.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Mar 8 09:59:21 1998 UTC (13 years, 11 months ago) by julian
Branches: MAIN
CVS tags: POST_SOFTUPDATE
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +10 -1 lines
Reviewed by:	dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Jan 30 11:34:02 1998 UTC (14 years ago) by phk
Branches: MAIN
CVS tags: PRE_SOFTUPDATE
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -3 lines
Retire LFS.

If you want to play with it, you can find the final version of the
code in the repository the tag LFS_RETIREMENT.

If somebody makes LFS work again, adding it back is certainly
desireable, but as it is now nobody seems to care much about it,
and it has suffered considerable bitrot since its somewhat haphazard
integration.

R.I.P

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Dec 5 13:43:47 1997 UTC (14 years, 2 months ago) by jkh
Branches: MAIN
CVS tags: LFS_RETIREMENT
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -1 lines
Needs to include <sys/lock.h> if we're using struct lock.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Oct 17 12:36:19 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
Make a set of VOP standard lock, unlock & islocked VOP operators, which
depend on the lock being located at vp->v_data.  Saves 3x3 identical
vop procs, more as the other filesystems becomes lock aware.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Oct 14 18:46:45 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -1 lines
I think my previous change may have opened a race conditio.
This patch does the same thing, with no change in semantics.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jul 13 15:40:31 1997 UTC (14 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
Fixed comment about i_spare.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu May 22 07:30:55 1997 UTC (14 years, 8 months ago) by phk
Branches: MAIN
CVS tags: WOLLMAN_MBUF, BP_WOLLMAN_MBUF
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Shrink struct inode by 20 bytes, so that malloc wastes less space.

Pointed out by:	bde

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Apr 1 08:02:00 1997 UTC (14 years, 10 months ago) by bde
Branches: MAIN
CVS tags: pre_smp_merge, post_smp_merge
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +6 -2 lines
Removed nested include of <ufs/ufs/dir.h>.  Use the pre-Lite2 hack of
defining doff_t both here and in <ufs/ufs/dir.h> so that this file
is independent of <ufs/ufs/dir.h>.  It still has old prerequisites
<sys/param.h> and <ufs/ufs/quota.h>, and a new Lite2 prerequisite of
<sys/lock.h>, sigh.

This might fix lsof, which was broken by namespace pollution giving
conflicting definitions of DIRBLKSIZ.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Mar 3 16:25:46 1997 UTC (14 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -3 lines
Removed unused flag IN_RECURSE and unused struct member i_lockcount.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:47:42 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$.  We are not
ready for it yet.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Feb 10 02:21:37 1997 UTC (15 years ago) by dyson
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +45 -55 lines
This is the kernel Lite/2 commit.  There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:57:01 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Sep 19 18:21:30 1996 UTC (15 years, 4 months ago) by nate
Branches: MAIN
CVS tags: RELENG_2_2_BP, RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Branch point for: RELENG_2_2
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4 lines
        In sys/time.h, struct timespec is defined as:

        /*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Mar 11 19:47:08 1996 UTC (15 years, 11 months ago) by peter
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +43 -53 lines
Import 4.4BSD-Lite2 onto the vendor branch, note that in the kernel, all
files are off the vendor branch, so this should not change anything.

A "U" marker generally means that the file was not changed in between
the 4.4Lite and Lite-2 releases, and does not need a merge.  "C" generally
means that there was a change.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Jan 30 23:02:15 1996 UTC (16 years ago) by mpp
Branches: MAIN
CVS tags: wollman_polling
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Nov 5 23:35:56 1995 UTC (16 years, 3 months ago) by dyson
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -1 lines
Changes to existing files for ext2fs support.  The UFS mods need rework
in the future as they are a bit crufty -- but at least the stuff is in the
tree now.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue May 30 08:15:30 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE, RELENG_2_1_0_RELEASE, RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Remove trailing whitespace.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Apr 24 05:13:11 1995 UTC (16 years, 9 months ago) by dyson
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -2 lines
Changes to get rid of ufslk2 hangs when doing read/write to/from
mmap regions that are in the same file as the read/write.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Dec 27 13:59:14 1994 UTC (17 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +15 -7 lines
Use the same current time throughout ITIMES().  I want all current
timestamps for an atomic operation such as rename() on a local file
system to be identical.

Uniformize yet another idempotency ifdef.  The comment nesting was
bogus.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Aug 21 07:16:15 1994 UTC (17 years, 5 months ago) by paul
Branches: MAIN
CVS tags: RELEASE_2_0, OLAH_TTCP, BETA_2_0, ALPHA_2_0
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +6 -1 lines
Made idempotent
Reviewed by:
Submitted by:

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Aug 2 07:54:49 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -0 lines
Added $Id$

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue May 24 10:09:39 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, REL_before_johndavid_2_0_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Kernel Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 24 10:09:38 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options