DragonFly BSD

CVS log for src/sys/vfs/ntfs/ntfs_subr.c

[BACK] Up to [DragonFly] / src / sys / vfs / ntfs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Jan 5 14:02:41 2008 UTC (6 years, 10 months ago) by swildner
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12, DragonFly_Preview
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +4 -6 lines
For kmalloc(), MALLOC() and contigmalloc(), use M_ZERO instead of
explicitly bzero()ing.

Reviewed-by: sephe

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Aug 21 17:26:48 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +2 -2 lines
getpages/putpages fixup part 1 - Add support for UIO_NOCOPY VOP_WRITEs to
filesystems which use the buffer cache and assert that UIO_NOCOPY is not
being used for filesystems which do not.

For filesystems using the buffer cache all we have to do is force a
read-before-write to fill in any missing pieces of the buffer.

UIO_NOCOPY writes are used for buffer-cache-backed filesystems which do
not implement their own vop_putpages code.  At the moment this is only
the msdosfs.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Dec 23 00:41:30 2006 UTC (7 years, 11 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8, DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +31 -31 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun May 21 20:23:28 2006 UTC (8 years, 6 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +8 -8 lines
Implement a much faster spinlock.

* Spinlocks can't conflict with FAST interrupts without deadlocking anyway,
  so instead of using a critical section simply do not allow an interrupt
  thread to preempt the current thread if it is holding a spinlock.  This
  cuts spinlock overhead in half.

* Implement shared spinlocks in addition to exclusive spinlocks.  Shared
  spinlocks would be used, e.g. for file descriptor table lookups.

* Cache a shared spinlock by using the spinlock's lock field as a bitfield,
  one for each cpu (bit 31 for exclusive locks).  A shared spinlock sets
  its cpu's shared bit and does not bother clearing it on unlock.

  This means that multiple, parallel shared spinlock accessors do NOT incur
  a cache conflict on the spinlock.  ALL parallel shared accessors operate
  at full speed (~10ns vs ~40-100ns in overhead).  90% of the 10ns in
  overhead is due to a necessary MFENCE to interlock against exclusive
  spinlocks on the mutex.  However, this MFENCE only has to play with
  pending cpu-local memory writes so it will always run at near full speed.

* Exclusive spinlocks in the face of previously cached shared spinlocks
  are now slightly more expensive because they have to clear the cached
  shared spinlock bits by checking the globaldata structure for each
  conflicting cpu to see if it is still holding a shared spinlock.  However,
  only the initial (unavoidable) atomic swap involves potential cache
  conflicts.  The shared bit checks involve only memory reads and the
  situation should be self-correcting from a performance standpoint since
  the shared bits then get cleared.

* Add sysctl's for basic spinlock performance testing.  Setting
  debug.spin_lock_test issues a test.  Tests #2 and #3 loop
  debug.spin_test_count times.  p.s. these tests will stall the whole
   machine.

	1       Test the indefinite wait code
	2       Time the best-case exclusive lock overhead
	3       Time the best-case shared lock overhead

* TODO: A shared->exclusive spinlock upgrade inline with positive feedback,
  and an exclusive->shared spinlock downgrade inline.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Apr 23 03:08:04 2006 UTC (8 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +8 -8 lines
Remove the now unused interlock argument to the lockmgr() procedure.
This argument has been abused over the years by kernel programmers
attempting to optimize certain locking and data modification sequences,
resulting in a virtually unreadable code in some cases.  The interlock
also made porting between BSDs difficult as each BSD implemented their
interlock differently.  DragonFly has slowly removed use of the interlock
argument and we can now finally be rid of it entirely.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Apr 23 02:43:19 2006 UTC (8 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +2 -1 lines
Remove remaining uses of the lockmgr LK_INTERLOCK flag.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Apr 13 19:25:09 2006 UTC (8 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +6 -1 lines
NTFS sometimes splits the initialization of a new vnode into two parts.
Make sure VMIO is enabled for regular files so BUF/BIO ops work in the
second part as VREG might not be set in the first part.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Mar 24 18:35:34 2006 UTC (8 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +5 -4 lines
Major BUF/BIO work commit.  Make I/O BIO-centric and specify the disk or
file location with a 64 bit offset instead of a 32 bit block number.

* All I/O is now BIO-centric instead of BUF-centric.

* File/Disk addresses universally use a 64 bit bio_offset now.  bio_blkno
  no longer exists.

* Stackable BIO's hold disk offset translations.  Translations are no longer
  overloaded onto a single structure (BUF or BIO).

* bio_offset == NOOFFSET is now universally used to indicate that a
  translation has not been made.  The old (blkno == lblkno) junk has all
  been removed.

* There is no longer a distinction between logical I/O and physical I/O.

* All driver BUFQs have been converted to BIOQs.

* BMAP, FREEBLKS, getblk, bread, breadn, bwrite, inmem, cluster_*,
  and findblk all now take and/or return 64 bit byte offsets instead
  of block numbers.  Note that BMAP now returns a byte range for the before
  and after variables.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Mar 2 19:08:00 2006 UTC (8 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +2 -2 lines
Pass LK_PCATCH instead of trying to store tsleep flags in the lock
structure, so multiple entities competing for the same lock do not
use unexpected flags when sleeping.

Only NFS really uses PCATCH with lockmgr locks.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Jan 22 04:31:22 2006 UTC (8 years, 10 months ago) by swildner
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +0 -4 lines
Remove unused variables.

Submitted-by: Alexey Slynko <slynko@tronet.ru>

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Nov 24 02:16:17 2005 UTC (9 years ago) by y0netan1
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +2 -0 lines
Fix LINT kernel; spin_lock function definitions have been split into
<sys/spinlock2.h>, so one has to explicitly #include it to use these
functions now.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Nov 19 17:19:50 2005 UTC (9 years ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +16 -10 lines
Convert the lockmgr interlock from a token to a spinlock.  This fixes a
problem on SMP boxes where the MP lock would unexpectedly lose atomicy for
a short period of time due to token acquisition.

Add a tsleep_interlock() call which takes advantage of tsleep()'s cpu
locality of reference to provide a helper function which allows us to
atomically spin_unlock() and tsleep() in an MP safe manner with only
a critical section.  Basically all it does is set a cpumask bit for the
ident hash index to cause other cpu's issuing a wakeup to notify our cpu.
Any actual wakeup occuring during the race period after the spin_unlock
but before the tsleep() call will be delayed by the critical section
until after the tsleep has queued the thread.

Cleanup some unused junk in vm_map.h.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Aug 2 13:03:55 2005 UTC (9 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +27 -25 lines
Make nlink_t 32bit and ino_t 64bit. Implement the old syscall numbers
for *stat by wrapping the new syscalls and truncation of the values.
Add a hack for boot2 to keep ino_t 32bit, otherwise we would have to
link the 64bit math code in and that would most likely overflow boot2.
Bump libc major to annotate changed ABI and work around a problem with
strip during installworld. strip is dynamically linked and doesn't play
well with the new libc otherwise.

Support for 64bit inode numbers is still incomplete, because the dirent
limited to 32bit. The checks for nlink_t have to be redone too.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Jul 2 15:26:26 2004 UTC (10 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2, DragonFly_1_0_REL, DragonFly_1_0A_REL
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +1 -1 lines
Remove cast as lvalue

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Apr 24 04:32:04 2004 UTC (10 years, 7 months ago) by drhodus
Branches: MAIN
CVS tags: DragonFly_1_0_RC1
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +2 -2 lines
Remove the VREF() macro and uses of it.
Remove uses of 0x20 before ^I inside vnode.h

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Apr 20 19:59:30 2004 UTC (10 years, 7 months ago) by cpressey
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +60 -169 lines
Style(9) cleanup to src/sys/vfs, stage 11/21: ntfs.

- Convert K&R-style function definitions to ANSI style.

Submitted-by: Andre Nathan <andre@digirati.com.br>
Additional-reformatting-by: cpressey

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Mar 1 06:33:22 2004 UTC (10 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +14 -9 lines
Newtoken commit.  Change the token implementation as follows:  (1) Obtaining
a token no longer enters a critical section.  (2) tokens can be held through
schedular switches and blocking conditions and are effectively released and
reacquired on resume.  Thus tokens serialize access only while the thread
is actually running.  Serialization is not broken by preemptive interrupts.
That is, interrupt threads which preempt do no release the preempted thread's
tokens.  (3) Unlike spl's, tokens will interlock w/ interrupt threads on
the same or on a different cpu.

The vnode interlock code has been rewritten and the API has changed.  The
mountlist vnode scanning code has been consolidated and all known races have
been fixed.  The vnode interlock is now a pool token.

The code that frees unreferenced vnodes whos last VM page has been freed has
been moved out of the low level vm_page_free() code and moved to the
periodic filesystem sycer code in vfs_msycn().

The SMP startup code and the IPI code has been cleaned up considerably.
Certain early token interactions on AP cpus have been moved to the BSP.

The LWKT rwlock API has been cleaned up and turned on.

Major testing by: David Rhodus

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Feb 5 21:03:37 2004 UTC (10 years, 9 months ago) by rob
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +3 -3 lines
__FreeBSD__ -> __DragonFly__

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Dec 29 18:04:50 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +4 -5 lines
Primarily add a missing lwkt_reltoken() in ntfs_ntput(), plus a little
cleanup.  Remove a few gettoken/reltoken pairs (depend on the MP lock more).
NTFS, as a non-critical filesystem, will eventually be serialized anyway.

From-panics-reported-by: Adam K Kirchhoff <adamk@voicenet.com>

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Aug 20 09:56:33 2003 UTC (11 years, 3 months ago) by rob
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +4 -4 lines
__P()!=wanted, remove old style prototypes from the vfs subtree

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:17:42 2003 UTC (11 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +7 -7 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Jul 19 21:14:46 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +3 -3 lines
Remove the priority part of the priority|flags argument to tsleep().  Only
flags are passed now.  The priority was a user scheduler thingy that is not
used by the LWKT subsystem.  For process statistics assume sleeps without
P_SINTR set to be disk-waits, and sleeps with it set to be normal sleeps.

This commit should not contain any operational changes.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jul 6 21:23:53 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +8 -8 lines
MP Implementation 1/2: Get the APIC code working again, sweetly integrate the
MP lock into the LWKT scheduler, replace the old simplelock code with
tokens or spin locks as appropriate.  In particular, the vnode interlock
(and most other interlocks) are now tokens.  Also clean up a few curproc/cred
sequences that are no longer needed.

The APs are left in degenerate state with non IPI interrupts disabled as
additional LWKT work must be done before we can really make use of them,
and FAST interrupts are not managed by the MP lock yet.  The main thing
for this stage was to get the system working with an APIC again.

buildworld tested on UP and 2xCPU/MP (Dell 2550)

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jun 26 05:55:18 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +4 -5 lines
proc->thread stage 5:  BUF/VFS clearance!  Remove the ucred argument from
vop_close, vop_getattr, vop_fsync, and vop_createvobject.  These VOPs can
be called from multiple contexts so the cred is fairly useless, and UFS
ignorse it anyway.  For filesystems (like NFS) that sometimes need a cred
we use proc0.p_ucred for now.

This removal also removed the need for a 'proc' reference in the related
VFS procedures, which greatly helps our proc->thread conversion.

bp->b_wcred and bp->b_rcred have also been removed, and for the same reason.
It makes no sense to have a particular cred when multiple users can
access a file.  This may create issues with certain types of NFS mounts
but if it does we will solve them in a way that doesn't pollute the
struct buf.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jun 25 03:56:07 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +4 -4 lines
proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
pointers instead of process pointers as arguments, similar to what FreeBSD-5
did.  Note however that ultimately both APIs are going to be message-passing
which means the current thread context will not be useable for creds and
descriptor access.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:54 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:41 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.7.2.4

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