The NetBSD Project

CVS log for src/sys/fs/puffs/puffs_node.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / fs / puffs

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 6 11:40:22 2013 UTC (3 months, 2 weeks ago) by yamt
Branch: MAIN
CVS Tags: khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.28: +11 -4 lines
Diff to previous 1.28 (colored)

comments
use sizeof(var) instead of sizeof(type) where possibly confusing

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 5 17:27:38 2012 UTC (7 months, 1 week ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, tls-maxphys-nbase, tls-maxphys-base
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored)

Excise struct componentname from the namecache.

This uglifies the interface, because several operations need to be
passed the namei flags and cache_lookup also needs for the time being
to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit.

The glop should be able to go away eventually but requires structural
cleanup elsewhere first.

This change requires a kernel bump.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jul 23 19:06:10 2012 UTC (10 months, 3 weeks ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.26: +1 -1 lines
Diff to previous 1.26 (colored)

Backout NCHNAMLEN check for cache_enter. That change collided with rmind's
move of this exact check into cache_enter

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 23 12:15:30 2012 UTC (10 months, 3 weeks ago) by manu
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Di not call cache_enter with path components bigger than NCHNAMLEN, as it
panics the kernel.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 22 00:53:20 2012 UTC (10 months, 4 weeks ago) by rmind
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Move some the test for MAKEENTRY into the cache_enter(9).  Make some
variables in vfs_cache.c static, __read_mostly, etc.

No objection on tech-kern@.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 8 15:04:41 2012 UTC (14 months, 1 week ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.23: +5 -2 lines
Diff to previous 1.23 (colored)

Add name and atttribute cache with filesytem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 19 08:14:41 2012 UTC (17 months ago) by manu
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.22: +17 -4 lines
Diff to previous 1.22 (colored)

Fix a race condition where the filesystem lookups a vnode that is
being recycled, producing ENOENT while the file does exist.

Approved by yamt

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 19 01:39:29 2011 UTC (20 months ago) by manu
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.21: +0 -2 lines
Diff to previous 1.21 (colored)

Remove #ifdef DIAGNOSTIC guards around KASSERT, as the macro contains them

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 18 15:39:09 2011 UTC (20 months ago) by manu
Branch: MAIN
Changes since 1.20: +8 -2 lines
Diff to previous 1.20 (colored)

Make sure pagedaemon does not sleep for memory in puffs_vnop_sleep.
Add KASSERT on any sleeping memory allocation to check it cannot happen again.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Aug 29 04:12:45 2011 UTC (21 months, 3 weeks ago) by manu
Branch: MAIN
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

Add a mutex for operations that touch size (setattr, getattr, write, fsync).

This is required to avoid data corruption bugs, where a getattr slices
itself within a setattr operation, and sets the size to the stall value
it got from the filesystem. That value is smaller than the one set by
setattr, and the call to uvm_vnp_setsize() trigged a spurious truncate.
The result is a chunk of zeroed data in the file.

Such a situation can easily happen when the ioflush thread issue a
VOP_FSYNC/puffs_vnop_sync/flushvncache/dosetattrn while andother process
do a sys_stat/VOP_GETATTR/puffs_vnop_getattr.

This mutex on size operation can be removed the day we decide VOP_GETATTR
has to operated on a locked vnode, since the other operations that touch
size already require that.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jun 30 20:09:41 2011 UTC (23 months, 2 weeks ago) by wiz
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

dependant -> dependent

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:54 2011 UTC (2 years ago) by rmind
Branch: MAIN
Changes since 1.17: +7 -6 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Sun Jul 25 10:03:59 2010 UTC (2 years, 10 months ago) by hannken
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.16: +3 -3 lines
Diff to previous 1.16 (colored)

It makes no sense to call vget() with LK_RETRY.

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

Make holding v_interlock mandatory for callers of vget().

Announced some time ago on tech-kern.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Nov 5 19:42:44 2009 UTC (3 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.14: +2 -3 lines
Diff to previous 1.14 (colored)

Kill suspend support.  It was never implemented correctly:
  * it depended on the biglock (in a very cruel way)
  * it was attached to userspace transactions rather than logical
    fs operations

(If someone wants to revisit it some day, most of the stuff can be
reused from cvs history)

Revision 1.14 / (download) - annotate - [select for diffs], Wed Sep 30 18:19:17 2009 UTC (3 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.13: +6 -4 lines
Diff to previous 1.13 (colored)

* fix a race i introduced almost two years ago in rev 1.116:
  operations creating a node cannot be considered outgoing operations,
  since after return from userspace they modify file system state
  by creating a new node.  if we do not protect the file system by
  holding the directory lock, a lookup operation might race us into
  the kernel and create the node earlier.
* remove pnode from hashlish before sending the reclaim faf off to
  userspace.  also, hold pmp_lock while frobbing the list.

Revision 1.13 / (download) - annotate - [select for diffs], Tue May 6 12:33:16 2008 UTC (5 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: netbsd-5, matt-nb5-mips64
Changes since 1.12: +3 -48 lines
Diff to previous 1.12 (colored)

PR kern/37950 Unmounting psshfs immediately panics the machine

puffs_getvnode() was inserting vnodes into mnt_vnodelist without taking
a reference to the mount for each. When vnodes are scrubbed, refs to the
vnodes mount structure are dropped => boom.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:51 2008 UTC (5 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.11: +4 -3 lines
Diff to previous 1.11 (colored)

Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jan 28 21:06:36 2008 UTC (5 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.10: +34 -32 lines
Diff to previous 1.10 (colored)

For code clarity typedef void *puffs_cookie_t.

No functional change.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:54 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.9: +4 -19 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:43 2008 UTC (5 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.8: +6 -7 lines
Diff to previous 1.8 (colored)

Merge vmlocking2 to head.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 17 21:55:29 2007 UTC (5 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.7: +4 -6 lines
Diff to previous 1.7 (colored)

Make puffs_updatenode() take a puffs_node instead of a vnode.  This
way we don't need to worry if a vnode has been reclaimed from under
us.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Nov 16 20:32:17 2007 UTC (5 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

Restructure the messaging interface a bit more: make all interfacing
with the file server happen through puffs_msg_enqueue() and
puffs_msg_wait() instead of having a billion different routines.
Build the existing system upon these two.  Most importantly though,
decouple insertation into the op queue from the actual wait.  This
is useful for a number of reasons coming soon to a cvs repo near you.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 11 19:41:13 2007 UTC (5 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: yamt-lazymbuf, mjf-devfs, matt-armv6, bouyer-xenamd64
Changes since 1.5: +6 -6 lines
Diff to previous 1.5 (colored)

Part 1/n of some pretty extensive changes to how the kernel module
interacts with the userspace file server:

  * since the kernel-user communication is not purely request-response
    anymore (hasn't been since 2006), try to rename some "request" to
    "message".  more similar mangling will take place in the future.

  * completely rework how messages are allocated.  previously most of
    them were borrowed from the stack (originally *all* of them),
    but now always allocate dynamically.  this makes the structure
    of the code much cleaner.  also makes it possible to fix a
    locking order violation.  it enables plenty of future enhancements.

  * start generalizing the transport interface to be independent of puffs

  * move transport interface to read/write instead of ioctl.  the
    old one had legacy design problems, and besides, ioctl's suck.
    implement a very generic version for now; this will be
    worked on later hopefully some day reaching "highly optimized".

  * implement libpuffs support behind existing library request
    interfaces.  this will change eventually (I hate those interfaces)

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:24 2007 UTC (5 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (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.4 / (download) - annotate - [select for diffs], Tue Oct 2 01:17:17 2007 UTC (5 years, 8 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Branch point for: yamt-x86pmap, vmlocking, jmcneill-pm
Changes since 1.3: +8 -3 lines
Diff to previous 1.3 (colored)

If kernel resource allocation fails after the file server has
committed something, issue an abort.  The abort is done through
the regular op channel, e.g. failed mkdir leads to regular rmdir,
inactive and reclaim.  No internal interface is planned currently
for the one file system out of a million which would implement it
to benefit from the one case in a billion where kernel resource
allocation actually does fail and out of that one case in a trillion
where internal vs. external would make a difference.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Oct 1 21:09:08 2007 UTC (5 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.2: +14 -6 lines
Diff to previous 1.2 (colored)

* better error checking: validate error values received from userland
  to be vaild errno values
* include string describing error in PUFFS_ERR
* get rid of union in puffs_req, it's nothing but trouble
* pass pmp to async i/o callbacks

Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 27 23:25:10 2007 UTC (5 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.1: +4 -10 lines
Diff to previous 1.1 (colored)

comments & other minor maintenance

Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 27 23:21:08 2007 UTC (5 years, 8 months ago) by pooka
Branch: MAIN

Split routines handling nodes from puffs_subr to puffs_node.
No functional change.

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>