The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Feb 9 22:08:37 2024 UTC (12 months ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +3 -3 lines
fix spelling mistakes, mainly in comments and log messages.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Wed Feb 23 21:54:41 2022 UTC (2 years, 11 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +4 -4 lines
fix various typos in comments, mainly immediatly/immediately/,
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Sun Dec 5 03:07:16 2021 UTC (3 years, 2 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +3 -3 lines
s/invlid/invalid/ in comment.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Wed Oct 20 03:08:17 2021 UTC (3 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +6 -3 lines
Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.

Revision 1.217.6.1: download - view: text, markup, annotated - select for diffs
Sun Aug 1 22:42:37 2021 UTC (3 years, 6 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.217: preferred, colored; next MAIN 1.218: preferred, colored
Changes since revision 1.217: +21 -72 lines
Sync with HEAD.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Sat Jul 24 21:31:38 2021 UTC (3 years, 6 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +3 -3 lines
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Mon Jul 19 01:30:24 2021 UTC (3 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +12 -16 lines
Abolish all the silly indirection macros for initializing vnode ops tables.

These are things of the form #define foofs_op genfs_op, or #define
foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides
obfuscation, and have gotten cutpasted all over everywhere.

Part 2; cvs randomly didn't commit these changes before, and then hid
them from me until I touched the files to force it to rethink. Dunno
what happened.

There's probably more of these, going to have to scan the tree the
hard way.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Jul 18 23:56:13 2021 UTC (3 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +4 -56 lines
Use macros for the canned parts of device and fifo vnode op tables.

Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain
the portion of the vnode ops table declaration that is
(conservatively) the same in every fs. Use these in every fs that
supports devices and/or fifos with separate ops tables.

Note that ptyfs works differently (it has one type of vnode with
open-coded dispatch to the specfs code, which I haven't changed in
this commit) and rump/librump/rumpvfs/rumpfs.c has an indirect dynamic
dispatch that already does more or less the same thing, which I also
haven't changed.

Also note that this anticipates a few bits in the next changeset here
and there, and adds missing but unreachable calls in some cases (e.g.
most fses weren't defining whiteout on devices and fifos, but it isn't
reachable there), and it changes parsepath on devices and fifos to
genfs_badop from genfs_parsepath (but it's not reachable there
either).

It appears that devices in kernfs were missing kqfilter, so it's
possible that if you try to use kqueue on /kern/rootdev that it'll
explode.

And finally note that the ops declaration tables aren't
order-dependent. (Other than vop_default_desc has to come first.)
Otherwise this wouldn't work.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Tue Jun 29 22:39:20 2021 UTC (3 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +6 -5 lines
Now remove cn_consume from struct componentname.

This change requires a kernel bump.

Note though that I'm not going to version the VOP_LOOKUP args
structure (or any other args structure) as code that doesn't touch
cn_consume doesn't need attention and code that does will fail on it
without further intervention.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Tue Jun 29 22:34:07 2021 UTC (3 years, 7 months ago) by dholland
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +6 -2 lines
- Add a new vnode op: VOP_PARSEPATH.
 - Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
 - Add a parsepath entry to every vnode ops table.

VOP_PARSEPATH takes a directory vnode to be searched and a complete
following path and chooses how much of that path to consume. To begin
with, all parsepath calls are genfs_parsepath, which locates the first
'/' as always.

Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Sat May 16 18:31:49 2020 UTC (4 years, 8 months ago) by christos
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +10 -6 lines
Add ACL support for FFS. From FreeBSD.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri May 15 19:28:10 2020 UTC (4 years, 9 months ago) by maxv
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +6 -6 lines
hardclock_ticks -> getticks()

Revision 1.214.4.1: download - view: text, markup, annotated - select for diffs
Sat Apr 25 11:24:05 2020 UTC (4 years, 9 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214: +5 -5 lines
Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.215: download - view: text, markup, annotated - select for diffs
Thu Apr 23 21:47:07 2020 UTC (4 years, 9 months ago) by ad
Branches: MAIN
CVS tags: bouyer-xenpvh-base2
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +5 -5 lines
PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)

- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed
  somewhere.  Use it to decide whether to do direct-mapped copy, rather than
  poking around directly in the vnode in ubc_uiomove(), which is ugly and
  doesn't work for tmpfs.  It would be nicer to contain all this in UVM but
  the filesystem provides the needed locking here (VV_MAPPED) and to
  reinvent that would suck more.

- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS().  Pass in UBC_ISMAPPED where
  appropriate.

Revision 1.211.10.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:50 2020 UTC (4 years, 10 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.211.10.1: preferred, colored; branchpoint 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211.10.1: +13 -13 lines
Merge changes from current as of 20200406

Revision 1.213.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:01 2020 UTC (4 years, 11 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.213: preferred, colored; next MAIN 1.214: preferred, colored
Changes since revision 1.213: +13 -13 lines
Sync with head.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Sun Feb 23 15:46:40 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +13 -13 lines
UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.211.10.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:01 2019 UTC (5 years, 8 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +14 -2 lines
Sync with HEAD

Revision 1.211.8.1: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:49 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211: +14 -2 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.211.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 14:47:38 2018 UTC (6 years, 3 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.211: preferred, colored; next MAIN 1.212: preferred, colored
Changes since revision 1.211: +11 -2 lines
Pull up following revision(s) (requested by manu in ticket #1082):

	sys/fs/puffs/puffs_vnops.c: revision 1.213

Fix use after RECLAIM in PUFFS filesystems

From hannken@

When puffs_cookie2vnode() misses an entry and vrele() it operations
puffs_vnop_reclaim() and puffs_vnop_fsync() get called with a VNON
vnode.

Do not notify the server in this case as the cookie is stale.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Tue Nov 6 02:39:49 2018 UTC (6 years, 3 months ago) by manu
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +9 -0 lines
Fix use after RECLAIM in PUFFS filesystems

From hannken@

When puffs_cookie2vnode() misses an entry and vrele() it operations
puffs_vnop_reclaim() and puffs_vnop_fsync() get called with a VNON
vnode.

Do not notify the server in this case as the cookie is stale.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Mon Nov 5 02:28:32 2018 UTC (6 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +5 -2 lines
Add missing mutex pn->pn_sizemtx lock in puffs_vnop_open()

puffs_vnop_open() calls flushvncache(), which calls dosetattr()
if pn->pn_stat has PNODE_METACACHE_MASK. In that case, the lock
on pn->pn_sizemtx is mandatory and asserted.

Revision 1.174.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:43 2017 UTC (7 years, 2 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.174.2.2: preferred, colored; branchpoint 1.174: preferred, colored; next MAIN 1.175: preferred, colored
Changes since revision 1.174.2.2: +258 -71 lines
update from HEAD

Revision 1.198.2.5: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:06 2017 UTC (7 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.198.2.4: preferred, colored; branchpoint 1.198: preferred, colored; next MAIN 1.199: preferred, colored
Changes since revision 1.198.2.4: +16 -36 lines
Sync with HEAD

Revision 1.211: download - view: text, markup, annotated - select for diffs
Fri May 26 14:21:01 2017 UTC (7 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +5 -3 lines
Make VOP_RECLAIM do the last unlock of the vnode.

VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.

We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.

Revision 1.210: download - view: text, markup, annotated - select for diffs
Wed Apr 26 03:02:48 2017 UTC (7 years, 9 months ago) by riastradh
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +9 -6 lines
Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.

No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html

Revision 1.204.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:25 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.204.2.1: preferred, colored; branchpoint 1.204: preferred, colored; next MAIN 1.205: preferred, colored
Changes since revision 1.204.2.1: +6 -31 lines
Sync with HEAD

Revision 1.205.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:01 2017 UTC (7 years, 9 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.205: preferred, colored; next MAIN 1.206: preferred, colored
Changes since revision 1.205: +6 -31 lines
Sync with HEAD

Revision 1.209: download - view: text, markup, annotated - select for diffs
Tue Apr 11 14:24:59 2017 UTC (7 years, 10 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-localcount-20170426, bouyer-socketcan-base1
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -5 lines
Make VOP_INACTIVE preserve vnode lock on return.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!

Revision 1.208: download - view: text, markup, annotated - select for diffs
Sat Apr 8 08:49:44 2017 UTC (7 years, 10 months ago) by hannken
Branches: MAIN
CVS tags: jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +3 -2 lines
Update mtime when updating file size.

PR kern/51762 (mtime not updated by open(O_TRUNC))

Revision 1.207: download - view: text, markup, annotated - select for diffs
Thu Apr 6 00:02:19 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +4 -28 lines
use ubc_zerorange

Revision 1.206: download - view: text, markup, annotated - select for diffs
Tue Apr 4 21:07:50 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +3 -3 lines
use MAX_PAGE_SIZE.

Revision 1.198.2.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:01 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.198.2.3: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.3: +5 -4 lines
Sync with HEAD

Revision 1.204.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:22 2016 UTC (8 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +4 -3 lines
Sync with HEAD

Revision 1.205: download - view: text, markup, annotated - select for diffs
Thu Jul 21 18:21:27 2016 UTC (8 years, 6 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +4 -3 lines
replace variable stack declaration with a large enough one and KASSERT.

Revision 1.198.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:19 2016 UTC (8 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.198.2.2: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.2: +3 -3 lines
Sync with HEAD

Revision 1.204: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:55:42 2016 UTC (8 years, 7 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +4 -4 lines
KNF. Remove extra spaces. No functional change.

Revision 1.198.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:21 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.198.2.1: preferred, colored; branchpoint 1.198: preferred, colored
Changes since revision 1.198.2.1: +46 -51 lines
Sync with HEAD

Revision 1.203: download - view: text, markup, annotated - select for diffs
Mon Apr 20 23:03:08 2015 UTC (9 years, 9 months ago) by riastradh
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +3 -8 lines
Make VOP_LINK return directory still locked and referenced.

Ride 7.99.10 bump.

Revision 1.198.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:19 2015 UTC (9 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +50 -18 lines
Sync with HEAD

Revision 1.163.2.12: download - view: text, markup, annotated - select for diffs
Fri Feb 27 20:21:02 2015 UTC (9 years, 11 months ago) by martin
Branches: netbsd-6
Diff to: previous 1.163.2.11: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.2.11: +41 -17 lines
Pull up following revision(s) (requested by manu in ticket #1260):
	lib/libpuffs/puffs.3: revision 1,55,1.60
	sys/fs/puffs/puffs_msgif.h: revision 1.84
	lib/libperfuse/ops.c: revision 1.83
	sys/fs/puffs/puffs_sys.h: revision 1.89
	sys/fs/puffs/puffs_vfsops.c: revision 1.116
	lib/libperfuse/perfuse.c: revision 1.36
	sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202

Use more markup. New sentence, new line. Bump date for previous.

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE
FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Update file size after write without metadata flush
If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.

Revision 1.182.2.13: download - view: text, markup, annotated - select for diffs
Fri Feb 27 19:39:56 2015 UTC (9 years, 11 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.182.2.12: preferred, colored; branchpoint 1.182: preferred, colored; next MAIN 1.183: preferred, colored
Changes since revision 1.182.2.12: +41 -17 lines
Pull up following revision(s) (requested by manu in ticket #555):
	lib/libpuffs/puffs.3: revision 1.60
	sys/fs/puffs/puffs_msgif.h: revision 1.84
	lib/libperfuse/ops.c: revision 1.83
	sys/fs/puffs/puffs_sys.h: revision 1.89
	sys/fs/puffs/puffs_vfsops.c: revision 1.116
	lib/libperfuse/perfuse.c: revision 1.36
	sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE

FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Update file size after write without metadata flush
If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Wed Feb 25 23:14:59 2015 UTC (9 years, 11 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +4 -4 lines
make this compile again.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Wed Feb 25 14:08:45 2015 UTC (9 years, 11 months ago) by manu
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +19 -2 lines
Update file size after write without metadata flush

If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sun Feb 15 20:21:29 2015 UTC (10 years ago) by manu
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +24 -17 lines
Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE

FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.

Revision 1.182.2.12: download - view: text, markup, annotated - select for diffs
Sat Jan 17 11:49:09 2015 UTC (10 years ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.11: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.11: +11 -3 lines
Pull up following revision(s) (requested by manu in ticket #423):
	sys/fs/puffs/puffs_vnops.c: revision 1.199
Make sure reads on empty files reach PUFFS filesystems
Sending a read through the page cache will get the operation
short-circuited. This is a problem with some filesystems that
expect to receive the read operation in order to update atime.
We fix that by bypassing the page cache when reading a file
wich a size known to be zero.

Revision 1.163.2.11: download - view: text, markup, annotated - select for diffs
Fri Jan 16 19:44:53 2015 UTC (10 years ago) by martin
Branches: netbsd-6
Diff to: previous 1.163.2.10: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.10: +11 -3 lines
Pull up following revision(s) (requested by manu in ticket #1236):
	sys/fs/puffs/puffs_vnops.c: revision 1.199
Make sure reads on empty files reach PUFFS filesystems
Sending a read through the page cache will get the operation
short-circuited. This is a problem with some filesystems that
expect to receive the read operation in order to update atime.
We fix that by bypassing the page cache when reading a file
wich a size known to be zero.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Tue Jan 13 16:39:51 2015 UTC (10 years, 1 month ago) by manu
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +11 -3 lines
Make sure reads on empty files reach PUFFS filesystems

Sending a read through the page cache will get the operation
short-circuited. This is a problem with some filesystems that
expect to receive the read operation in order to update atime.

We fix that by bypassing the page cache when reading a file
wich a size known to be zero.

Revision 1.163.2.10: download - view: text, markup, annotated - select for diffs
Sun Nov 9 11:05:15 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.9: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.9: +38 -10 lines
Pull up following revision(s) (requested by manu in ticket #1187):
	sys/fs/puffs/puffs_vnops.c: revision 1.198
PUFFS direct I/O cache fix
There are a few situations where we must take care of the cache if
direct
I/O was enabled:
- if we do direct I/O for write but not for read, then any write must
  invalidate the cache so that a reader gets the written data and not
  the not-updated cache.
- if we used a vnode without direct I/O and it is enabled for writing,
  we must flush the cache before compeling the open operation, so that
  the cachec write are not lost.
And at inactive time, we wipe direct I/O flags so that a new open
without
direct I/O does not inherit direct I/O.

Revision 1.182.2.11: download - view: text, markup, annotated - select for diffs
Sun Nov 9 10:09:32 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-7
Diff to: previous 1.182.2.10: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.10: +14 -2 lines
Pull up following revision(s) (requested by manu in ticket #194):
	sys/fs/puffs/puffs_vnops.c: revision 1.197
	sys/fs/puffs/puffs_node.c: revision 1.35
Fix PUFFS node use-after-reclaim
When puffs_cookie2vnode() misses an entry, vcache_get()
creates a new node (puffs_vfsop_loadvnode being called to
initialize the PUFFS part), then it discovers it is VNON,
and tries to vrele() it. vrele() calls VOP_INACTIVE(),
which led us in puffs_vnop_inactive() where we sent a
request to the filesystem for a node that already had been
reclaimed.
The fix is to check for VNON nodes in puffs_vnop_inactive()
and to return without doing anyting. This is suboptimal, but
a better workaround would probably need to modify vcache API,
with an impact on other filesystems. Let us keep it simple.

Revision 1.182.2.10: download - view: text, markup, annotated - select for diffs
Sun Nov 9 10:07:31 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-7
Diff to: previous 1.182.2.9: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.9: +38 -10 lines
Pull up following revision(s) (requested by manu in ticket #193):
	sys/fs/puffs/puffs_vnops.c: revision 1.198
PUFFS direct I/O cache fix
There are a few situations where we must take care of the cache if
direct
I/O was enabled:
- if we do direct I/O for write but not for read, then any write must
  invalidate the cache so that a reader gets the written data and not
  the not-updated cache.
- if we used a vnode without direct I/O and it is enabled for writing,
  we must flush the cache before compeling the open operation, so that
  the cachec write are not lost.
And at inactive time, we wipe direct I/O flags so that a new open
without
direct I/O does not inherit direct I/O.

Revision 1.163.2.9: download - view: text, markup, annotated - select for diffs
Sun Nov 9 07:50:12 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.8: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.8: +2 -9 lines
Pull up following revision(s) (requested by manu in ticket #1184):
	sys/fs/puffs/puffs_vnops.c: revision 1.195
According to pooka@'s comment, a long time ago, VOP_STRATEGY could not
fail without taking down the kernel. It seems this is not the case
anymore,
hence we can stop dropping errors in puffs_vnop_strategy()
Approved by pooka@

Revision 1.163.2.8: download - view: text, markup, annotated - select for diffs
Sun Nov 9 06:28:03 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.7: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.7: +51 -2 lines
Pull up following revision(s) (requested by manu in ticket #1166):
	sys/fs/puffs/puffs_vnops.c: revision 1.188-1.194
- If we truncate the file, make sure we zero-fill the end of the last
  page, otherwise if the file is later truncated to a larger size
  (creating a hole), that area will not return zeroes as it should.
- Use PRIx64 for printing offsets
- Improve zero-fill of last page after shrink fix:
  1) do it only if the file is open for writing, otherwise we send write
  requests to the FS on a file that has never been open.
  2) do it inside existing if (vap->va_size != VNOVAL) block
- Retore LP64 fix that was removed by mistake
- Make this build again without debugging enabled; DPRINTF() can end up
  as empty, and in an if conditional, you then need braces if that's the
  only potential body.
- As is evidenced by several of our 32-bit MIPS ports, it's wrong to
  print vsize_t with PRIx64 -- instead use our own PRIxVSIZE macro.
- Do the previous correctly...

Revision 1.182.2.9: download - view: text, markup, annotated - select for diffs
Wed Nov 5 18:16:17 2014 UTC (10 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.182.2.8: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.8: +2 -9 lines
Pull up following revision(s) (requested by manu in ticket #182):
	sys/fs/puffs/puffs_vnops.c: revision 1.195
According to pooka@'s comment, a long time ago, VOP_STRATEGY could not
fail without taking down the kernel. It seems this is not the case
anymore,
hence we can stop dropping errors in puffs_vnop_strategy()
Approved by pooka@

Revision 1.182.2.8: download - view: text, markup, annotated - select for diffs
Wed Nov 5 18:11:31 2014 UTC (10 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.182.2.7: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.7: +80 -4 lines
Pull up following revision(s) (requested by manu in ticket #181):
	lib/libperfuse/fuse.h: revision 1.6
	lib/libperfuse/ops.c: revision 1.78
	lib/libperfuse/perfuse.c: revision 1.35
	lib/libperfuse/perfuse_priv.h: revision 1.36
	lib/libpuffs/dispatcher.c: revision 1.48
	lib/libpuffs/opdump.c: revision 1.37
	lib/libpuffs/puffs.c: revision 1.118
	lib/libpuffs/puffs.h: revision 1.126
	lib/libpuffs/puffs_ops.3: revisions 1.40-1.41
	sys/fs/puffs/puffs_msgif.h: revision 1.82-1.83
	sys/fs/puffs/puffs_msgif.h: revision 1.82
	sys/fs/puffs/puffs_vnops.c: revision 1.196
Add PUFFS support for fallocate and fdiscard operations
--
libpuffs support for fallocate and fdiscard operations
--
Add PUFFS_HAVE_FALLOCATE in puffs_msgif.h so that filesystem can decide
at build time wether fallocate is usable
--
FUSE fallocate support
There seems to be no fdiscard FUSE operation at the moment, hence that
one is left unused.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Tue Nov 4 09:14:42 2014 UTC (10 years, 3 months ago) by manu
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +38 -10 lines
PUFFS direct I/O cache fix

There are a few situations where we must take care of the cache if direct
I/O was enabled:
- if we do direct I/O for write but not for read, then any write must
  invalidate the cache so that a reader gets the written data and not
  the not-updated cache.
- if we used a vnode without direct I/O and it is enabled for writing,
  we must flush the cache before compeling the open operation, so that
  the cachec write are not lost.

And at inactive time, we wipe direct I/O flags so that a new open without
direct I/O does not inherit direct I/O.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Tue Nov 4 09:10:37 2014 UTC (10 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +14 -2 lines
Fix PUFFS node use-after-reclaim

When puffs_cookie2vnode() misses an entry, vcache_get()
creates a new node (puffs_vfsop_loadvnode being called to
initialize the PUFFS part), then it discovers it is VNON,
and tries to vrele() it. vrele() calls VOP_INACTIVE(),
which led us in puffs_vnop_inactive() where we sent a
request to the filesystem for a node that already had been
reclaimed.

The fix is to check for VNON nodes in puffs_vnop_inactive()
and to return without doing anyting. This is suboptimal, but
a better workaround would probably need to modify vcache API,
with an impact on other filesystems. Let us keep it simple.

Revision 1.163.2.7: download - view: text, markup, annotated - select for diffs
Mon Nov 3 19:51:36 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.6: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.6: +18 -10 lines
Pull up following revision(s) (requested by manu in ticket #1152):
	sys/fs/puffs/puffs_vnops.c: revision 1.186
PUFFS fixes for size update ater write plus read/write sanity checks
- Always update kernel metadata cache for size when writing
  This fixes situation where size update after appending to a file lagged
- Make read/write nilpotent when called with null size, as FFS does
- Return EFBIG instead of EINVAL for negative offsets, as FFS does

Revision 1.163.2.6: download - view: text, markup, annotated - select for diffs
Mon Nov 3 19:42:33 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.5: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.5: +16 -3 lines
Pull up following revision(s) (requested by manu in ticket #1149):
	sys/fs/puffs/puffs_node.c: revision 1.33
	sys/fs/puffs/puffs_vnops.c: revision 1.185
When changing a directory content, update the ctime/mtime in kernel
cache,
otherwise the updated ctime/mtime appears after the cached entry expire.

Revision 1.163.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 3 19:18:09 2014 UTC (10 years, 3 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.163.2.4: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.4: +16 -4 lines
Pull up following revision(s) (requested by manu in ticket #1140):
	lib/libperfuse/ops.c				1.63-1.69
	lib/libperfuse/perfuse.c			1.32-1.33
	lib/libperfuse/perfuse_priv.h			1.32-1.34
	lib/libperfuse/subr.c				1.20
	lib/libpuffs/creds.c				1.16
	lib/libpuffs/dispatcher.c			1.47
	lib/libpuffs/puffs.h				1.125
	lib/libpuffs/puffs_ops.3			1.37-1.38
	lib/libpuffs/requests.c				1.24
	sys/fs/puffs/puffs_msgif.h			1.81
	sys/fs/puffs/puffs_sys.h			1.85
	sys/fs/puffs/puffs_vnops.c			1.183
	usr.sbin/perfused/msg.c				1.22
Bring libpuffs, libperfuse and perfused on par with -current:
- implement  FUSE direct I/O
- remove useless code and warnings
- fix missing GETATTR bugs
- fix exended attribute get and list operations

Revision 1.196: download - view: text, markup, annotated - select for diffs
Fri Oct 31 13:52:41 2014 UTC (10 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +80 -4 lines
Add PUFFS support for fallocate and fdiscard operations

Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Oct 31 13:51:33 2014 UTC (10 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +2 -9 lines
According to pooka@'s comment, a long time ago, VOP_STRATEGY could not
fail without taking down the kernel. It seems this is not the case anymore,
hence we can stop dropping errors in puffs_vnop_strategy()

Approved by pooka@

Revision 1.182.2.7: download - view: text, markup, annotated - select for diffs
Tue Oct 14 08:16:03 2014 UTC (10 years, 4 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.6: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.6: +6 -5 lines
Pull up revisions 1.192-1.194: fix debug printf formatting and make
it compile without debugging enabled.

Revision 1.182.2.6: download - view: text, markup, annotated - select for diffs
Mon Oct 13 18:57:46 2014 UTC (10 years, 4 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.5: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.5: +50 -2 lines
Pull up following revision(s) (requested by manu in ticket #136):
	sys/fs/puffs/puffs_vnops.c: revision 1.189-1.191
If we truncate a file open for writing, make sure we zero-fill the end
of the last page, otherwise if the file is later truncated to a larger
size (creating a hole), that area will not return zeroes as it should.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Tue Oct 7 12:58:09 2014 UTC (10 years, 4 months ago) by he
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +1 -1 lines
Do the previous correctly...

Revision 1.193: download - view: text, markup, annotated - select for diffs
Tue Oct 7 11:37:06 2014 UTC (10 years, 4 months ago) by he
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +4 -4 lines
As is evidenced by several of our 32-bit MIPS ports, it's wrong to
print vsize_t with PRIx64 -- instead use our own PRIxVSIZE macro.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Mon Oct 6 14:26:44 2014 UTC (10 years, 4 months ago) by he
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +4 -3 lines
Make this build again without debugging enabled; DPRINTF() can end up
as empty, and in an if conditional, you then need braces if that's the
only potential body.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Mon Oct 6 09:05:55 2014 UTC (10 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +4 -3 lines
Retore LP64 fix that was removed by mistake

Revision 1.190: download - view: text, markup, annotated - select for diffs
Mon Oct 6 04:41:59 2014 UTC (10 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +18 -14 lines
Improve zero-fill of last page after shrink fix:
1) do it only if the file is open for writing, otherwise we send write
requests to the FS on a file that has never been open.
2) do it inside existing if (vap->va_size != VNOVAL) block

Revision 1.189: download - view: text, markup, annotated - select for diffs
Sun Oct 5 09:28:24 2014 UTC (10 years, 4 months ago) by justin
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -3 lines
Use PRIx64 for printing offsets

Revision 1.188: download - view: text, markup, annotated - select for diffs
Sun Oct 5 07:53:22 2014 UTC (10 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +45 -2 lines
If we truncate the file, make sure we zero-fill the end of the last
page, otherwise if the file is later truncated to a larger size
(creating a hole), that area will not return zeroes as it should.

Revision 1.182.2.5: download - view: text, markup, annotated - select for diffs
Tue Sep 30 18:14:22 2014 UTC (10 years, 4 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.4: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.4: +3 -3 lines
Pull up following revision(s) (requested by hannken in ticket #67):
	sys/fs/puffs/puffs_node.c: revision 1.34
	sys/fs/puffs/puffs_vnops.c: revision 1.187
Fix the puffs_sop_thread -> puffs_cookie2vnode path:
- pass the cookie by reference
- add missing mutex_exit()
- update assertion for VNON typed vnodes

Revision 1.187: download - view: text, markup, annotated - select for diffs
Tue Sep 30 10:15:03 2014 UTC (10 years, 4 months ago) by hannken
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -3 lines
Fix the puffs_sop_thread -> puffs_cookie2vnode path:
- pass the cookie by reference
- add missing mutex_exit()
- update assertion for VNON typed vnodes

Revision 1.182.2.4: download - view: text, markup, annotated - select for diffs
Thu Sep 11 14:00:54 2014 UTC (10 years, 5 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.3: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.3: +18 -10 lines
Pull up following revision(s) (requested by manu in ticket #93):
	sys/fs/puffs/puffs_vnops.c: revision 1.186
PUFFS fixes for size update ater write plus read/write sanity checks
- Always update kernel metadata cache for size when writing
  This fixes situation where size update after appending to a file lagged
- Make read/write nilpotent when called with null size, as FFS does
- Return EFBIG instead of EINVAL for negative offsets, as FFS does

Revision 1.186: download - view: text, markup, annotated - select for diffs
Thu Sep 11 07:59:14 2014 UTC (10 years, 5 months ago) by manu
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +18 -10 lines
PUFFS fixes for size update ater write plus read/write sanity checks

- Always update kernel metadata cache for size when writing
  This fixes situation where size update after appending to a file lagged
- Make read/write nilpotent when called with null size, as FFS does
- Return EFBIG instead of EINVAL for negative offsets, as FFS does

Revision 1.182.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 10 08:42:28 2014 UTC (10 years, 5 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.2: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.2: +16 -3 lines
Pull up following revision(s) (requested by manu in ticket #79):
	sys/fs/puffs/puffs_node.c: revision 1.33
	sys/fs/puffs/puffs_vnops.c: revision 1.185
When changing a directory content, update the ctime/mtime in kernel
cache, otherwise the updated ctime/mtime appears after the cached
entry expire.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Fri Sep 5 15:39:18 2014 UTC (10 years, 5 months ago) by manu
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +16 -3 lines
When changing a directory content, update the ctime/mtime in kernel cache,
otherwise the updated ctime/mtime appears after the cached entry expire.

Revision 1.182.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 29 11:55:34 2014 UTC (10 years, 5 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.182.2.1: preferred, colored; branchpoint 1.182: preferred, colored
Changes since revision 1.182.2.1: +2 -14 lines
Pull up following revision(s) (requested by hannken in ticket #67):
	sys/fs/puffs/puffs_sys.h: revision 1.86
	sys/fs/puffs/puffs_vfsops.c: revision 1.114
	sys/fs/puffs/puffs_msgif.c: revision 1.95
	sys/fs/puffs/puffs_node.c: revision 1.32
	sys/fs/puffs/puffs_vnops.c: revision 1.184
Change puffs from hashlist to vcache.
- field "pa_nhashbuckets" of struct "puffs_kargs" becomes a no-op.
and should be removed on the next protocol version bump.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Thu Aug 28 08:29:50 2014 UTC (10 years, 5 months ago) by hannken
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +2 -14 lines
Change puffs from hashlist to vcache.
- field "pa_nhashbuckets" of struct "puffs_kargs" becomes a no-op.
  and should be removed on the next protocol version bump.

Revision 1.182.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 26 23:15:12 2014 UTC (10 years, 5 months ago) by riz
Branches: netbsd-7
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +16 -4 lines
Pull up following revision(s) (requested by manu in ticket #52):
	sys/fs/puffs/puffs_msgif.h: revision 1.81
	sys/fs/puffs/puffs_sys.h: revision 1.85
	sys/fs/puffs/puffs_vnops.c: revision 1.183
Add a oflags input field to open requests so that the filesystem can pass
back information about the file. Implement PUFFS_OPEN_IO_DIRECT, which
will force direct IO (bypassing page cache) for the file.

Revision 1.174.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:27 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.174.2.1: preferred, colored; branchpoint 1.174: preferred, colored
Changes since revision 1.174.2.1: +34 -37 lines
Rebase to HEAD as of a few days ago.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Sat Aug 16 16:19:41 2014 UTC (10 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +16 -4 lines
Add a oflags input field to open requests so that the filesystem can pass
back information about the file. Implement PUFFS_OPEN_IO_DIRECT, which
will force direct IO (bypassing page cache) for the file.

Revision 1.181.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:55:54 2014 UTC (10 years, 6 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.181: preferred, colored; next MAIN 1.182: preferred, colored
Changes since revision 1.181: +8 -2 lines
Rebase.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:20:52 2014 UTC (10 years, 6 months ago) by dholland
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +8 -2 lines
Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I can
find.

The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.

The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.

The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.

Revision 1.161.2.5: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:01 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.161.2.4: preferred, colored; branchpoint 1.161: preferred, colored; next MAIN 1.162: preferred, colored
Changes since revision 1.161.2.4: +28 -37 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.176.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:06 2014 UTC (10 years, 8 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.176: preferred, colored; next MAIN 1.177: preferred, colored
Changes since revision 1.176: +28 -37 lines
sync with head

Revision 1.181: download - view: text, markup, annotated - select for diffs
Mon Mar 24 13:42:40 2014 UTC (10 years, 10 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +4 -4 lines
- Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add  vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38

Revision 1.180: download - view: text, markup, annotated - select for diffs
Fri Feb 7 15:29:21 2014 UTC (11 years ago) by hannken
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +14 -13 lines
Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31

Revision 1.179: download - view: text, markup, annotated - select for diffs
Thu Jan 23 10:13:56 2014 UTC (11 years ago) by hannken
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +6 -6 lines
Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30

Revision 1.178: download - view: text, markup, annotated - select for diffs
Fri Jan 17 10:55:02 2014 UTC (11 years ago) by hannken
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +6 -11 lines
Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29

Revision 1.177: download - view: text, markup, annotated - select for diffs
Thu Oct 17 21:03:27 2013 UTC (11 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +10 -15 lines
- remove unused variables
- add _NOERROR flavor macros for the case where errors are ignored.

Revision 1.161.2.4: download - view: text, markup, annotated - select for diffs
Wed Jan 16 05:33:40 2013 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.161.2.3: preferred, colored; branchpoint 1.161: preferred, colored
Changes since revision 1.161.2.3: +29 -11 lines
sync with (a bit old) head

Revision 1.174.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:02:40 2012 UTC (12 years, 2 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +29 -11 lines
Resync to 2012-11-19 00:00:00 UTC

Revision 1.176: download - view: text, markup, annotated - select for diffs
Mon Nov 5 17:27:38 2012 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +9 -5 lines
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.175: download - view: text, markup, annotated - select for diffs
Mon Nov 5 17:24:10 2012 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +23 -9 lines
Disentangle the namecache from the internals of namei.

 - Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

 - It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

 - Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.

Revision 1.161.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:25 2012 UTC (12 years, 3 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.161.2.2: preferred, colored; branchpoint 1.161: preferred, colored
Changes since revision 1.161.2.2: +192 -45 lines
sync with head

Revision 1.163.2.4: download - view: text, markup, annotated - select for diffs
Sun Aug 12 13:13:20 2012 UTC (12 years, 6 months ago) by martin
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.163.2.3: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.3: +189 -41 lines
Pull up following revision(s) (requested by manu in ticket #438):
	lib/libperfuse/perfuse_priv.h: revision 1.31
	sys/fs/puffs/puffs_msgif.h: revision 1.80
	sys/fs/puffs/puffs_vnops.c: revision 1.171
	lib/libpuffs/puffs_ops.3: revision 1.31
	sys/fs/puffs/puffs_vnops.c: revision 1.172
	sys/fs/puffs/puffs_vnops.c: revision 1.173
	sys/fs/puffs/puffs_vnops.c: revision 1.174
	usr.sbin/perfused/perfused.c: revision 1.24
	sys/fs/puffs/puffs_sys.h: revision 1.80
	sys/fs/puffs/puffs_sys.h: revision 1.81
	sys/fs/puffs/puffs_sys.h: revision 1.82
	lib/libperfuse/subr.c: revision 1.19
	lib/libperfuse/perfuse.c: revision 1.30
	sys/fs/puffs/puffs_msgif.c: revision 1.90
	sys/fs/puffs/puffs_msgif.c: revision 1.91
	sys/fs/puffs/puffs_msgif.c: revision 1.92
	lib/libperfuse/ops.c: revision 1.59
	lib/libpuffs/puffs.3: revision 1.53
	lib/libperfuse/debug.c: revision 1.12
	lib/libpuffs/puffs.3: revision 1.54
	sys/fs/puffs/puffs_vnops.c: revision 1.167
	sys/fs/puffs/puffs_msgif.h: revision 1.79
	usr.sbin/perfused/msg.c: revision 1.21
	sys/fs/puffs/puffs_vfsops.c: revision 1.102
	sys/fs/puffs/puffs_vfsops.c: revision 1.103
	sys/fs/puffs/puffs_vfsops.c: revision 1.105
	lib/libpuffs/puffs.h: revision 1.123
	lib/libperfuse/perfuse_if.h: revision 1.20
	lib/libperfuse/perfuse.c: revision 1.29
	lib/libpuffs/dispatcher.c: revision 1.42
	lib/libpuffs/dispatcher.c: revision 1.43
- Fix same vnodes associated with multiple cookies
The scheme used to retreive known nodes on lookup was flawed, as it only
used parent and name. This produced a different cookie for the same file
if it was renamed, when looking up ../ or when dealing with multiple files
associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of
inodes. This causes a huge rewrite of reclaim code, which do not attempt
to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim
There are a few situations where we issue multiple FUSE operations for
a PUFFS operation. On reclaim, we therefore have to wait for all FUSE
operation to complete, not just the current exchanges. We do this by
introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF
VOP_PUTPAGES causes FAF writes where the kernel does not check the
operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr
No need to wait for the result if the kernel does not want it. There is
however an exception for setattr that touch the size, we need to wait
for completion because we have other operations queued for after the
resize.
- Fix fchmod() on write-open file
fchmod() on a node open with write privilege will send setattr with both mode
and size set. This confuses some FUSE filesystem. Therefore we send two FUSE
operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code
still builds on netbsd-5 but does not have the node TTL feature anymore.
It works fine with kernel support on netbsd-6.
- Improve PUFFS_KFLAG_CACHE_FS_TTL by reclaiming older inactive nodes.
The normal kernel behavior is to retain inactive nodes in the freelist
until it runs out of vnodes. This has some merit for local filesystems,
where the cost of an allocation is about the same as the cost of a
lookup. But that situation is not true for distributed filesystems.
On the other hand, keeping inactive nodes for a long time hold memory
in the file server process, and when the kernel runs out of vnodes, it
produce reclaim avalanches that increase lattency for other operations.
We do not reclaim inactive vnodes immediatly either, as they may be
looked up again shortly. Instead we introduce a grace time and we
reclaim nodes that have been inactive beyond the grace time.
- Fix lookup/reclaim race condition.
The above improvement undercovered a race condition between lookup and
reclaim. If we reclaimed a vnode associated with a userland cookie while
a lookup returning that same cookiewas inprogress, then the kernel ends
up with a vnode associated with a cookie that has been reclaimed in
userland. Next operation on the cookie will crash (or at least confuse)
the filesystem.
We fix this by introducing a lookup count in kernel and userland. On
reclaim, the kernel sends the count, which enable userland to detect
situation where it initiated a lookup that is not completed in kernel.
In such a situation, the reclaim must be ignored, as the node is about
to be looked up again.
Fix hang unmount bug introduced by last commit.
We introduced a slow queue for delayed reclaims, while the existing
queue for unmount, flush and exist has been renamed fast queue. Both
queues had timestamp for when an operation should be done, but it was
useless for the fast queue, which is always used to run an operation
ASAP. And the timestamp test had an error that turned ASAP into "at next
tick", but nobody what there to wake the thread at next tick, hence
the hang. The fix is to remove the useless and buggy timestamp test for
fast queue.
Rename slow sopreq queue into node sopreq queue, to refet the fact that
is only intended for postponed node reclaims.
When purging the node sopreq queue, do not call puffs_msg_sendresp(), as
it makes no sense.
Fix race condition between (create|mknod|mkdir|symlino) and reclaim, just
like we did it between lookup and reclaim.
Missing bit in previous commit (prevent race between create|mknod|mkdir|symlink
and reclaim)
Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.
Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.
Enable the featuure for perfused, as this is how FUSE works.
Missing bit in previous commit (PUFFS_KFLAG_CACHE_DOTDOT option to avoid
looking up ..)

Revision 1.163.2.3: download - view: text, markup, annotated - select for diffs
Sun Aug 12 12:59:49 2012 UTC (12 years, 6 months ago) by martin
Branches: netbsd-6
Diff to: previous 1.163.2.2: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.2: +5 -6 lines
Pull up following revision(s) (requested by manu in ticket #484):
	sys/fs/nilfs/nilfs_vnops.c: revision 1.18
	sys/ufs/ufs/ufs_lookup.c: revision 1.117
	sys/nfs/nfs_vnops.c: revision 1.295
	sys/ufs/chfs/chfs_vnops.c: revision 1.8
	sys/ufs/ext2fs/ext2fs_lookup.c: revision 1.70
	sys/fs/unionfs/unionfs_vnops.c: revision 1.6
	sys/kern/vfs_cache.c: revision 1.89
	sys/fs/efs/efs_vnops.c: revision 1.26
	sys/fs/hfs/hfs_vnops.c: revision 1.26
	sys/fs/adosfs/adlookup.c: revision 1.16
	sys/fs/puffs/puffs_vnops.c: revision 1.168
	sys/fs/tmpfs/tmpfs_vnops.c: revision 1.98
	sys/fs/ntfs/ntfs_vnops.c: revision 1.52
	sys/fs/cd9660/cd9660_lookup.c: revision 1.20
	sys/fs/msdosfs/msdosfs_lookup.c: revision 1.24
	sys/fs/smbfs/smbfs_vnops.c: revision 1.80
	sys/fs/udf/udf_vnops.c: revision 1.72
	sys/fs/filecorefs/filecore_lookup.c: revision 1.14
	sys/fs/puffs/puffs_node.c: revision 1.25
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.174: download - view: text, markup, annotated - select for diffs
Fri Aug 10 16:49:35 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
CVS tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +67 -1 lines
Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.

Enable the featuure for perfused, as this is how FUSE works.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri Aug 10 14:52:56 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +10 -2 lines
Missing bit in previous commit (prevent race between create|mknod|mkdir|symlink
and reclaim)

Revision 1.172: download - view: text, markup, annotated - select for diffs
Fri Aug 10 08:42:11 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +3 -3 lines
Fix race condition between (create|mknod|mkdir|symlino) and reclaim, just
like we did it between lookup and reclaim.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Jul 27 07:38:44 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +3 -3 lines
Rename slow sopreq queue into node sopreq queue, to refet the fact that
is only intended for postponed node reclaims.
When purging the node sopreq queue, do not call puffs_msg_sendresp(), as
it makes no sense.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Mon Jul 23 19:06:10 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +2 -3 lines
Backout NCHNAMLEN check for cache_enter. That change collided with rmind's
move of this exact check into cache_enter

Revision 1.169: download - view: text, markup, annotated - select for diffs
Mon Jul 23 12:15:30 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +5 -4 lines
Di not call cache_enter with path components bigger than NCHNAMLEN, as it
panics the kernel.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sun Jul 22 00:53:20 2012 UTC (12 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +5 -6 lines
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.167: download - view: text, markup, annotated - select for diffs
Sat Jul 21 05:17:11 2012 UTC (12 years, 6 months ago) by manu
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +114 -40 lines
- Improve PUFFS_KFLAG_CACHE_FS_TTL by reclaiming older inactive nodes.

The normal kernel behavior is to retain inactive nodes in the freelist
until it runs out of vnodes. This has some merit for local filesystems,
where the cost of an allocation is about the same as the cost of a
lookup. But that situation is not true for distributed filesystems.
On the other hand, keeping inactive nodes for a long time hold memory
in the file server process, and when the kernel runs out of vnodes, it
produce reclaim avalanches that increase lattency for other operations.

We do not reclaim inactive vnodes immediatly either, as they may be
looked up again shortly. Instead we introduce a grace time and we
reclaim nodes that have been inactive beyond the grace time.

- Fix lookup/reclaim race condition.

The above improvement undercovered a race condition between lookup and
reclaim. If we reclaimed a vnode associated with a userland cookie while
a lookup returning that same cookiewas inprogress, then the kernel ends
up with a vnode associated with a cookie that has been reclaimed in
userland. Next operation on the cookie will crash (or at least confuse)
the filesystem.

We fix this by introducing a lookup count in kernel and userland. On
reclaim, the kernel sends the count, which enable userland to detect
situation where it initiated a lookup that is not completed in kernel.
In such a situation, the reclaim must be ignored, as the node is about
to be looked up again.

Revision 1.161.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:09 2012 UTC (12 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.161.2.1: preferred, colored; branchpoint 1.161: preferred, colored
Changes since revision 1.161.2.1: +32 -19 lines
sync with head.

Revision 1.162.4.3: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:05:03 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.162.4.2: preferred, colored; branchpoint 1.162: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162.4.2: +228 -53 lines
sync to latest -current.

Revision 1.163.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 23 16:49:00 2012 UTC (12 years, 9 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.163.2.1: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.1: +228 -53 lines
Pull up following revision(s) (requested by manu in ticket #195):
	lib/libskey/skeysubr.c: revision 1.27
	lib/libkvm/kvm_getloadavg.c: revision 1.11
	lib/libwrap/update.c: revision 1.9
	lib/liby/yyerror.c: revision 1.9
	lib/libpuffs/puffs_ops.3: revision 1.30
	lib/libwrap/misc.c: revision 1.10
	lib/libwrap/hosts_access.c: revision 1.20
	lib/libpuffs/pnode.c: revision 1.11
	lib/libperfuse/subr.c: revision 1.17
	lib/libpuffs/pnode.c: revision 1.12
	lib/libperfuse/subr.c: revision 1.18
	lib/libwrap/options.c: revision 1.15
	lib/libwrap/fix_options.c: revision 1.11
	lib/libperfuse/ops.c: revision 1.52
	lib/libperfuse/ops.c: revision 1.53
	lib/libperfuse/ops.c: revision 1.54
	lib/libwrap/hosts_ctl.c: revision 1.5
	lib/libintl/gettext.c: revision 1.27
	lib/libwrap/shell_cmd.c: revision 1.6
	lib/libpuffs/dispatcher.c: revision 1.39
	lib/libperfuse/perfuse_priv.h: revision 1.27
	lib/libwrap/socket.c: revision 1.19
	lib/libpuffs/puffs.3: revision 1.50
	lib/libperfuse/perfuse_priv.h: revision 1.28
	lib/libpuffs/puffs_priv.h: revision 1.45
	lib/libpuffs/puffs.3: revision 1.51
	lib/libperfuse/perfuse_priv.h: revision 1.29
	lib/libwrap/percent_x.c: revision 1.5
	lib/libpuffs/puffs.3: revision 1.52
	lib/libperfuse/debug.c: revision 1.11
	sys/fs/puffs/puffs_vnops.c: revision 1.165
	lib/libwrap/tcpd.h: revision 1.13
	sys/fs/puffs/puffs_vnops.c: revision 1.166
	lib/libwrap/eval.c: revision 1.7
	sys/fs/puffs/puffs_msgif.h: revision 1.78
	sys/fs/puffs/puffs_vfsops.c: revision 1.101
	lib/libwrap/rfc931.c: revision 1.9
	lib/libwrap/clean_exit.c: revision 1.5
	lib/libpuffs/puffs.h: revision 1.120
	lib/libc/stdlib/jemalloc.c: revision 1.27
	lib/librmt/rmtlib.c: revision 1.26
	lib/libpuffs/puffs.h: revision 1.121
	sys/fs/puffs/puffs_sys.h: revision 1.79
	lib/librumpclient/rumpclient.c: revision 1.48
	lib/libwrap/refuse.c: revision 1.5
	lib/libperfuse/perfuse.c: revision 1.26
	lib/libperfuse/perfuse.c: revision 1.27
	tests/fs/puffs/t_fuzz.c: revision 1.5
	lib/libperfuse/perfuse.c: revision 1.28
	lib/libpuffs/dispatcher.c: revision 1.40
	sys/fs/puffs/puffs_node.c: revision 1.24
	lib/libwrap/diag.c: revision 1.9
	lib/libintl/textdomain.c: revision 1.13
Use C89 function definition
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.
Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem 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.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.
Split file system.
Comma fixes.
Remove dangling "and".
Bump date for previous.
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout
- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
  attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM
(how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests

Revision 1.166: download - view: text, markup, annotated - select for diffs
Wed Apr 18 00:42:50 2012 UTC (12 years, 9 months ago) by manu
Branches: MAIN
CVS tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +32 -19 lines
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout

Revision 1.161.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:19 2012 UTC (12 years, 10 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +226 -54 lines
sync with head

Revision 1.165: download - view: text, markup, annotated - select for diffs
Sun Apr 8 15:04:41 2012 UTC (12 years, 10 months ago) by manu
Branches: MAIN
CVS tags: yamt-pagecache-base4
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +213 -51 lines
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.162.4.2: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:37 2012 UTC (12 years, 10 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.162.4.1: preferred, colored; branchpoint 1.162: preferred, colored
Changes since revision 1.162.4.1: +5 -2 lines
sync to latest -current.

Revision 1.163.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 3 15:57:50 2012 UTC (12 years, 10 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +5 -2 lines
Pull up following revision(s) (requested by jakllsch in ticket #154):
	sys/fs/puffs/puffs_vnops.c: revision 1.164
Prevent access beyond end of PUFFS file on read,
similar to as is done for NFS.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Mar 16 23:13:48 2012 UTC (12 years, 11 months ago) by jakllsch
Branches: MAIN
CVS tags: jmcneill-usbmp-base8
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +5 -2 lines
Prevent access beyond end of PUFFS file on read,
similar to as is done for NFS.

Revision 1.162.4.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:24 2012 UTC (12 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +10 -5 lines
merge to -current.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Tue Jan 17 09:30:16 2012 UTC (13 years, 1 month ago) by martin
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +10 -5 lines
Add a few KASSERT() - I have a crash that likely will cause one of them to
fire...

Revision 1.162: download - view: text, markup, annotated - select for diffs
Fri Nov 18 21:18:50 2011 UTC (13 years, 2 months ago) by christos
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +4 -2 lines
Obey MNT_RELATIME, the only addition is that mkdir in ufs sets IN_ACCESS too.

Revision 1.129.4.11: download - view: text, markup, annotated - select for diffs
Wed Nov 2 20:11:12 2011 UTC (13 years, 3 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.129.4.10: preferred, colored; branchpoint 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.4.10: +9 -8 lines
Pull up following revision(s) (requested by manu in ticket #1679):
	sys/fs/puffs/puffs_vnops.c: revision 1.157
	sys/fs/puffs/puffs_vnops.c: revision 1.158
	sys/fs/puffs/puffs_vnops.c: revision 1.159
	sys/fs/puffs/puffs_vfsops.c: revision 1.97
	sys/fs/puffs/puffs_vfsops.c: revision 1.99
	sys/fs/puffs/puffs_vnops.c: revision 1.160
	sys/fs/puffs/puffs_vfsops.c: revision 1.100
	sys/miscfs/syncfs/sync_subr.c: revision 1.47
	sys/fs/puffs/puffs_node.c: revision 1.21
	sys/fs/puffs/puffs_node.c: revision 1.22
	sys/fs/puffs/puffs_msgif.c: revision 1.88
	sys/fs/puffs/puffs_msgif.c: revision 1.89
	sys/fs/puffs/puffs_vnops.c: revision 1.156
Make sure ioflush does not sleep in PUFFS code path, waiting for a mutex,
a memory allocation, or a response from the filesystem.
This avoids deadlocks in the following situations:
1) when memory is low: ioflush waits the fileystem, the fielsystem waits
   for memory
2) when the filesystem does not respond (e.g.: network outage ona
   distributed filesystem)
Fix the build that was broken by struct lwp *updateproc reference in
RUMP-visible code. Instead of checking that updateproc (aka ioflush,
aka syncer) will not sleep in PUFFS code, I check for any kernel thread:
after all none of them are designed to hang awaiting for a remote filesystem
operation to complete.
Roll back the change that forced kernel threads to not sleep in PUFFS.
The change does not make consensus, since only pagedaemon should need it.
Other threads will tolerate sleeping, and problems here are only symptoms
that something is going wrong in memory management. The cause, not the
symptoms, need to be fixed.
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.
Remove #ifdef DIAGNOSTIC guards around KASSERT, as the macro contains them

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun Oct 30 13:24:13 2011 UTC (13 years, 3 months ago) by hannken
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +5 -2 lines
Add a comment that pn_sizemtx should be useless as VOP_GETATTR now
needs a shared lock at least.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Wed Oct 19 01:39:29 2011 UTC (13 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +2 -10 lines
Remove #ifdef DIAGNOSTIC guards around KASSERT, as the macro contains them

Revision 1.159: download - view: text, markup, annotated - select for diffs
Tue Oct 18 15:39:09 2011 UTC (13 years, 3 months ago) by manu
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +14 -4 lines
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.158: download - view: text, markup, annotated - select for diffs
Mon Oct 17 23:54:01 2011 UTC (13 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +4 -14 lines
Roll back the change that forced kernel threads to not sleep in PUFFS.
The change does not make consensus, since only pagedaemon should need it.
Other threads will tolerate sleeping, and problems here are only symptoms
that something is going wrong in memory management. The cause, not the
symptoms, need to be fixed.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Fri Sep 23 01:57:32 2011 UTC (13 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +7 -9 lines
Fix the build that was broken by struct lwp *updateproc reference in
RUMP-visible code. Instead of checking that updateproc (aka ioflush,
aka syncer) will not sleep in PUFFS code, I check for any kernel thread:
after all none of them are designed to hang awaiting for a remote filesystem
operation to complete.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Wed Sep 21 15:36:33 2011 UTC (13 years, 4 months ago) by manu
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +23 -5 lines
Make sure ioflush does not sleep in PUFFS code path, waiting for a mutex,
a memory allocation, or a response from the filesystem.

This avoids deadlocks in the following situations:
1) when memory is low: ioflush waits the fileystem, the fielsystem waits
   for memory
2) when the filesystem does not respond (e.g.: network outage ona
   distributed filesystem)

Revision 1.129.4.10: download - view: text, markup, annotated - select for diffs
Sat Sep 17 18:53:30 2011 UTC (13 years, 5 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.129.4.9: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.9: +39 -5 lines
Pull up following revision(s) (requested by manu in ticket #1666):
	sys/fs/puffs/puffs_sys.h: revision 1.78 via patch
	sys/fs/puffs/puffs_node.c: revision 1.20 via patch
	sys/fs/puffs/puffs_vnops.c: revision 1.155 via patch
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.155: download - view: text, markup, annotated - select for diffs
Mon Aug 29 04:12:45 2011 UTC (13 years, 5 months ago) by manu
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +39 -6 lines
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.129.4.9: download - view: text, markup, annotated - select for diffs
Sun Jul 17 15:36:03 2011 UTC (13 years, 7 months ago) by riz
Branches: netbsd-5
Diff to: previous 1.129.4.8: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.8: +264 -11 lines
Pull up following revision(s) (requested by manu in ticket #1645):
lib/libc/sys/Makefile.inc                       1.207 via patch
lib/libc/sys/extattr_get_file.2                 patch
lib/libpuffs/dispatcher.c                       1.34,1.36 via patch
lib/libpuffs/puffs.c                            1.107 via patch
lib/libpuffs/puffs.h                            1.115,1.118 via patch
sys/fs/puffs/puffs_msgif.h                      1.71,1.76 via patch
sys/fs/puffs/puffs_vfsops.c                     1.88 via patch
sys/fs/puffs/puffs_vnops.c                      1.145,1.154 via patch
sys/kern/vfs_xattr.c                            1.24-1.27 via patch
sys/kern/vnode_if.c                             1.87 via patch
sys/sys/Makefile                                1.133 via patch
sys/sys/extattr.h                               1.6 via patch
sys/sys/vnode_if.h                              1.81 via patch
sys/ufs/ffs/ffs_vnops.c                         patch
sys/ufs/ufs/ufs_extattr.c                       1.31,1.34 via patch

* support extended attributes
* bump major due to structure growth
* add some spare space
* remove ABI sillyness
Support extended attributes.
Fix multiple non compliances in our Linux-like extattr API, and make it
public so that it can be used.
Improve a bit listxattr(2). It attemps to list both system and user
extended attributes, and it faled if calling user did not have privilege
for reading system EA. Now we just lise user EA and skip system EA in
reading them is not allowed.
Fix bug introduced in previous commuit: Do not vrele() a vnode we did not
obtained.
Improve UFS1 extended attributes usability
- autocreate attribute backing file for new attributes
- autoload attributes when issuing extattrctl start
- when autoloading attributes, do not display garbage warning when looking
up entries that got ENOENT
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.
There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)
This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Jul 4 08:07:30 2011 UTC (13 years, 7 months ago) by manu
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +5 -2 lines
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.

Revision 1.152.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:16 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.152: preferred, colored; next MAIN 1.153: preferred, colored
Changes since revision 1.152: +16 -16 lines
Catchup with rmind-uvmplock merge.

Revision 1.129.4.8: download - view: text, markup, annotated - select for diffs
Sat Jun 18 16:17:38 2011 UTC (13 years, 8 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.129.4.7: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.7: +10 -8 lines
Pull up following revision(s) (requested by manu in ticket #1623):
	lib/libpuffs/puffs.c: revision 1.116 via patch
	sys/fs/puffs/puffs_vnops.c: revision 1.151 via patch
Call advlock method if supplied

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Jun 12 03:35:54 2011 UTC (13 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +16 -16 lines
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.150.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:23 2011 UTC (13 years, 8 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.150: preferred, colored; next MAIN 1.151: preferred, colored
Changes since revision 1.150: +23 -6 lines
Sync with HEAD.

Revision 1.142.4.5: download - view: text, markup, annotated - select for diffs
Tue May 31 03:04:59 2011 UTC (13 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.142.4.4: preferred, colored; branchpoint 1.142: preferred, colored; next MAIN 1.143: preferred, colored
Changes since revision 1.142.4.4: +21 -4 lines
sync with head

Revision 1.152: download - view: text, markup, annotated - select for diffs
Thu May 19 03:11:57 2011 UTC (13 years, 9 months ago) by rmind
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -4 lines
Remove cache_purge(9) calls from reclamation routines in the file systems,
as vclean(9) performs it for us since Lite2 merge.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue May 3 13:16:47 2011 UTC (13 years, 9 months ago) by manu
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +22 -4 lines
Call advlock method if supplied

Revision 1.142.4.4: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:08 2011 UTC (13 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.142.4.3: preferred, colored; branchpoint 1.142: preferred, colored
Changes since revision 1.142.4.3: +10 -46 lines
sync with head

Revision 1.150: download - view: text, markup, annotated - select for diffs
Tue Jan 11 14:04:54 2011 UTC (14 years, 1 month ago) by kefren
Branches: MAIN
CVS tags: jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +6 -24 lines
add advlock to puffs. ok pooka@
should fix kern/43321

Revision 1.149: download - view: text, markup, annotated - select for diffs
Tue Nov 30 10:43:03 2010 UTC (14 years, 2 months ago) by dholland
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +2 -10 lines
Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Tue Nov 30 10:29:59 2010 UTC (14 years, 2 months ago) by dholland
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +2 -16 lines
Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.

Revision 1.142.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:20 2010 UTC (14 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.142.2.1: preferred, colored; branchpoint 1.142: preferred, colored; next MAIN 1.143: preferred, colored
Changes since revision 1.142.2.1: +266 -12 lines
Sync with HEAD.

Revision 1.128.10.4: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:35 2010 UTC (14 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.128.10.3: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.10.3: +297 -42 lines
sync with head.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Wed Jul 14 14:07:37 2010 UTC (14 years, 7 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +6 -2 lines
RENAME lookup semantics say return EISDIR if dvp = *vpp for the
last component .... obviously(!!)

Revision 1.142.4.3: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:51 2010 UTC (14 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.142.4.2: preferred, colored; branchpoint 1.142: preferred, colored
Changes since revision 1.142.4.2: +5 -5 lines
sync with head

Revision 1.146: download - view: text, markup, annotated - select for diffs
Thu Jun 24 13:03:10 2010 UTC (14 years, 7 months ago) by hannken
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +5 -5 lines
Clean up vnode lock operations pass 2:

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

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.142.4.2: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:56 2010 UTC (14 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.142.4.1: preferred, colored; branchpoint 1.142: preferred, colored
Changes since revision 1.142.4.1: +290 -39 lines
sync with head

Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri May 21 10:16:54 2010 UTC (14 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +261 -11 lines
Support extended attributes.

Revision 1.142.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:07 2010 UTC (14 years, 9 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +31 -30 lines
Sync with HEAD.

Revision 1.129.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:13 2010 UTC (14 years, 9 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +141 -75 lines
sync to netbsd-5

Revision 1.144: download - view: text, markup, annotated - select for diffs
Mon Mar 29 13:11:33 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +31 -31 lines
Stop exposing fifofs internals and leave only fifo_vnodeop_p visible.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Mar 27 02:37:35 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +4 -3 lines
\n, police!

Revision 1.142.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 16 15:38:07 2010 UTC (14 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +16 -16 lines
Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc().  It allows us to share the locks among UVM objects.

Revision 1.128.10.3: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:14 2010 UTC (14 years, 11 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.128.10.2: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.10.2: +200 -198 lines
sync with head

Revision 1.129.4.7: download - view: text, markup, annotated - select for diffs
Sat Jan 16 17:52:13 2010 UTC (15 years, 1 month ago) by bouyer
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.129.4.6: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.6: +5 -4 lines
Pull up following revision(s) (requested by pooka in ticket #1244):
	sys/fs/puffs/puffs_vnops.c: revision 1.142
Since VOP_GETATTR() does not require a locked vnode, resolve and
reference the puffs_node before sending the request to the file
server.  This diminishes the window where the inode can be reclaimed
and be invalidated before it is accessed (but does not completely
eliminate the race, as that is a caller problem which we cannot
fix here).

Revision 1.142: download - view: text, markup, annotated - select for diffs
Thu Jan 14 14:44:13 2010 UTC (15 years, 1 month ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +5 -4 lines
Since VOP_GETATTR() does not require a locked vnode, resolve and
reference the puffs_node before sending the request to the file
server.  This diminishes the window where the inode can be reclaimed
and be invalidated before it is accessed (but does not completely
eliminate the race, as that is a caller problem which we cannot
fix here).

Revision 1.129.4.6: download - view: text, markup, annotated - select for diffs
Fri Dec 18 05:58:26 2009 UTC (15 years, 2 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.129.4.5: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.5: +51 -31 lines
Pull up following revision(s) (requested by pooka in ticket #1184):
	sys/fs/puffs/puffs_vnops.c: revision 1.141 via patch
Push all information cached in the vnode to the file server before
issuing INACTIVE.  PR kern/42194.
Also, send setattr in fsync asynchronously if FSYNC_WAIT is not set.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Fri Dec 4 20:26:35 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +52 -31 lines
Push all information cached in the vnode to the file server before
issuing INACTIVE.  PR kern/42194.
Also, send setattr in fsync asynchronously if FSYNC_WAIT is not set.

Revision 1.129.4.5: download - view: text, markup, annotated - select for diffs
Sat Nov 28 16:00:16 2009 UTC (15 years, 2 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.129.4.4: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.4: +23 -14 lines
Pull up following revision(s) (requested by pooka in ticket #1154):
	sys/fs/puffs/puffs_vnops.c: revision 1.140
Send VOP_ABORTOP() in case attempting cross-dev rename, part of
PR kern/42210.  Also, fix a memory management error in said case.

Revision 1.129.4.4: download - view: text, markup, annotated - select for diffs
Sat Nov 28 15:56:08 2009 UTC (15 years, 2 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.129.4.3: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.3: +4 -4 lines
Pull up following revision(s) (requested by pooka in ticket #1153):
	sys/fs/puffs/puffs_vnops.c: revision 1.139
Send VOP_ABORTOP() as a FAF -- we don't care about the return value.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Thu Nov 19 16:21:04 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +25 -16 lines
Send VOP_ABORTOP() in case attempting cross-dev rename, part of
PR kern/42210.  Also, fix a memory management error in said case.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Thu Nov 19 15:50:49 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +4 -4 lines
Send VOP_ABORTOP() as a FAF -- we don't care about the return value.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Thu Nov 5 19:42:44 2009 UTC (15 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +6 -85 lines
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.137: download - view: text, markup, annotated - select for diffs
Thu Nov 5 19:22:57 2009 UTC (15 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +19 -5 lines
Reinstante PNODE_DYING.  vmlocking had a brief hiatus when it was not
a valid optimization, but that's long gone and once VOP_INACTIVE is
called and the file server says that the vnode is going to be recycled,
it really is going to be recycled extra references gained or not.

Revision 1.129.4.3: download - view: text, markup, annotated - select for diffs
Sun Oct 18 12:46:07 2009 UTC (15 years, 3 months ago) by sborrill
Branches: netbsd-5
Diff to: previous 1.129.4.2: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.2: +31 -3 lines
Pull up the following revisions(s) (requested by pooka in ticket #1100):
	lib/libpuffs/dispatcher.c:	revision 1.33
	lib/libpuffs/puffs.c:	revision 1.99
	lib/libpuffs/puffs.h:	revision 1.111
	sys/fs/puffs/puffs_msgif.h:	revision 1.67 via patch
	sys/fs/puffs/puffs_vnops.c:	revision 1.136

Support VOP_ABORTOP() in puffs.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat Oct 17 23:16:05 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +31 -3 lines
Transmit VOP_ABORTOP() to the server.

Revision 1.129.4.2: download - view: text, markup, annotated - select for diffs
Sat Oct 3 23:11:27 2009 UTC (15 years, 4 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.129.4.1: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.4.1: +25 -29 lines
Pull up following revision(s) (requested by pooka in ticket #1042):
	sys/fs/puffs/puffs_node.c: revision 1.14
	sys/fs/puffs/puffs_vnops.c: revision 1.134
* 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.135: download - view: text, markup, annotated - select for diffs
Wed Sep 30 18:22:29 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +39 -39 lines
remove leading whitespace.  no functional change.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Wed Sep 30 18:19:17 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +25 -29 lines
* 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.129.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 26 18:53:48 2009 UTC (15 years, 4 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +14 -2 lines
Pull up following revision(s) (requested by pooka in ticket #1014):
	sys/fs/puffs/puffs_vnops.c: revision 1.133
Set SAVENAME for rmdir and remove.
Addresses an easy part of PR kern/38188

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sat Sep 19 11:44:19 2009 UTC (15 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +14 -2 lines
Set SAVENAME for rmdir and remove.

Addresses an easy part of PR kern/38188

Revision 1.128.10.2: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:38:00 2009 UTC (15 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.128.10.1: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.10.1: +3 -3 lines
sync with head

Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Sep 12 18:17:55 2009 UTC (15 years, 5 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base8
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -3 lines
Fix typo:
-		pcinfo = kmem_zalloc(sizeof_puffs_cacheinfo) + runsize,
+		pcinfo = kmem_zalloc(sizeof(struct puffs_cacheinfo) + runsize,
in #ifdef'ed out code, per paired kmem_free() in the same function.
Closes PR kern/41840.

Revision 1.128.10.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:43 2009 UTC (15 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +14 -22 lines
sync with head.

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:36 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +7 -15 lines
Sync with HEAD.

Revision 1.128.6.2: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:17 2009 UTC (16 years, 1 month ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.128.6.1: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.6.1: +5 -13 lines
Sync with HEAD.

Revision 1.128.16.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:14:59 2008 UTC (16 years, 2 months ago) by haad
Branches: haad-dm
Diff to: previous 1.128.16.1: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.16.1: +7 -15 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Nov 26 20:17:33 2008 UTC (16 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +6 -15 lines
Rototill all remaining file systems to use ubc_uiomove() instead
of the ubc_alloc() - uiomove() - ubc_release() dance.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Sun Nov 16 19:34:30 2008 UTC (16 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +3 -2 lines
more <sys/buf.h> police

Revision 1.128.16.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:18 2008 UTC (16 years, 3 months ago) by haad
Branches: haad-dm
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +9 -9 lines
Sync with HEAD.

Revision 1.128.6.1: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:50 2008 UTC (16 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +9 -9 lines
Sync with HEAD.

Revision 1.128.12.1: download - view: text, markup, annotated - select for diffs
Wed Sep 24 16:38:56 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128: +9 -9 lines
Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Sep 10 19:25:33 2008 UTC (16 years, 5 months ago) by christos
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, 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, 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, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +9 -9 lines
replace 0xa0 with space from Andy Shevchenko

Revision 1.98.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:56 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.98.2.2: preferred, colored; branchpoint 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98.2.2: +30 -31 lines
sync with HEAD

Revision 1.113.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:40 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.113.2.3: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.3: +214 -245 lines
Sync with HEAD.

Revision 1.23.2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:24:00 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.7: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.7: +30 -31 lines
sync with head.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Jan 30 09:50:21 2008 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-nfs-mp, wrstuden-revivesa, mjf-devfs2, haad-dm
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +11 -10 lines
Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Jan 28 21:06:37 2008 UTC (17 years ago) by pooka
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +21 -21 lines
For code clarity typedef void *puffs_cookie_t.

No functional change.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Fri Jan 25 14:32:13 2008 UTC (17 years ago) by ad
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +2 -4 lines
Remove VOP_LEASE. Discussed on tech-kern.

Revision 1.23.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:45:52 2008 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.6: preferred, colored
Changes since revision 1.23.2.6: +212 -244 lines
sync with head

Revision 1.98.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:55:49 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.98.2.1: preferred, colored; branchpoint 1.98: preferred, colored
Changes since revision 1.98.2.1: +481 -403 lines
sync with HEAD

Revision 1.122.4.2: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:27 2008 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.122.4.1: preferred, colored; branchpoint 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122.4.1: +4 -4 lines
Sync with HEAD

Revision 1.125: download - view: text, markup, annotated - select for diffs
Wed Jan 2 22:37:21 2008 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +6 -6 lines
More type-punning workarounds.  Curiously the kernel compilation
flags cause gcc to not complain.

Revision 1.122.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:35 2008 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +196 -226 lines
Sync with HEAD

Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:44 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +23 -37 lines
Merge vmlocking2 to head.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sun Dec 30 23:04:12 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +175 -191 lines
namespace a bit: vfsops -> puffs_vfsop_x() and vops -> puffs_vnop_x()

Revision 1.113.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:45:47 2007 UTC (17 years, 1 month ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.113.2.2: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.2.2: +14 -16 lines
Sync with HEAD.

Revision 1.121.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:33 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking2
Diff to: previous 1.121.2.1: preferred, colored; branchpoint 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121.2.1: +14 -16 lines
Sync with head.

Revision 1.95.4.9: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:10 2007 UTC (17 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.95.4.8: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.4.8: +14 -16 lines
Sync with HEAD.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Dec 8 19:57:04 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +14 -16 lines
Now that "l" is gone both as an argument to operations and from
componentname, remove all vestiges of puffs_cid.

Revision 1.113.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:20:18 2007 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.113.2.1: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.2.1: +24 -47 lines
Sync with HEAD.

Revision 1.23.2.6: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:06 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.5: preferred, colored
Changes since revision 1.23.2.5: +284 -174 lines
sync with head

Revision 1.121.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 4 13:03:07 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +21 -35 lines
Pull the vmlocking changes into a new branch.

Revision 1.95.4.8: download - view: text, markup, annotated - select for diffs
Tue Nov 27 19:37:49 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.7: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.7: +15 -37 lines
Sync with HEAD. amd64 Xen support needs testing.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Tue Nov 27 11:31:18 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -13 lines
Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Mon Nov 26 19:01:50 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +26 -37 lines
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.95.4.7: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:55:57 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.6: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.6: +272 -140 lines
Sync with HEAD.

Revision 1.107.2.4: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:19:44 2007 UTC (17 years, 2 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.107.2.3: preferred, colored; branchpoint 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107.2.3: +11 -12 lines
Sync with HEAD

Revision 1.119: download - view: text, markup, annotated - select for diffs
Wed Nov 21 16:30:40 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +7 -9 lines
use BUF_ISREAD/WRITE instead of homegrown variants

Revision 1.118: download - view: text, markup, annotated - select for diffs
Tue Nov 20 11:51:02 2007 UTC (17 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +6 -5 lines
Retire M_PUFFS, use kmem(9) instead.

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:48:30 2007 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +263 -130 lines
Sync with HEAD.

Revision 1.107.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 18 19:35:46 2007 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.107.2.2: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.2: +261 -128 lines
Sync with HEAD

Revision 1.117: download - view: text, markup, annotated - select for diffs
Sat Nov 17 21:55:29 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +11 -12 lines
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.116: download - view: text, markup, annotated - select for diffs
Sat Nov 17 21:30:48 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +124 -41 lines
Start playing around with vnode locks.  For now, do the very easy
thing and release locks before the userspace wait for operations
which release the lock before exit from the method in any case.
However, releasing the lock after inserting the request on the
operation queue gives us proper ordering possibilities in userspace
(at least if that bit were implemented, but I don't think there
any file system in userspace that depends on kernel locking and
probably there never should be one).

inspired by a conversation with Nacho Navarro

Revision 1.115: download - view: text, markup, annotated - select for diffs
Sat Nov 17 18:09:04 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +19 -11 lines
Implement a biodone callback for async writes similar to reads and
use that when possible.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Fri Nov 16 20:32:18 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +125 -82 lines
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.107.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:01:50 2007 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.107.2.1: preferred, colored; branchpoint 1.107: preferred, colored
Changes since revision 1.107.2.1: +28 -20 lines
Sync with HEAD

Revision 1.98.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:17 2007 UTC (17 years, 3 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +622 -526 lines
sync with HEAD

Revision 1.95.4.6: download - view: text, markup, annotated - select for diffs
Sun Oct 28 20:11:10 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.5: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.5: +4 -2 lines
Sync with HEAD.

Revision 1.23.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:35:12 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.4: preferred, colored
Changes since revision 1.23.2.4: +622 -526 lines
sync with head.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Oct 26 16:54:50 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +4 -2 lines
Read/write can reuse message memory if operating uncached.  This
will change evetually, but for now just appease a KASSERT by
resetting the message header to 0 after each loop.

Revision 1.95.4.5: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:48:20 2007 UTC (17 years, 3 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.4: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.4: +471 -422 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:39:57 2007 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +15 -14 lines
Sync with HEAD.

Revision 1.52.4.14: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:17:06 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.13: preferred, colored; branchpoint 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52.4.13: +3 -5 lines
Sync with head.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Oct 23 18:27:10 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +28 -22 lines
The kernel (genfs, uvm) can't deal with strategy returning an error
when vclean()ing.  Pending an adventure to the genfs/vm labyrinth
to fix this properly, compensate here by not allowing unstrategic
(no pun) return values.  They are always due to the userspace server
crashing anyway, so it's no big deal if we lie about the final
resting place of the pages.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Oct 21 19:43:52 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +11 -8 lines
* release pathname buffer in link
* some variable massage

Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Oct 19 14:38:45 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +5 -5 lines
When doing a read operation, don't copy the whole kernel buffer to
userspace, since it doesn't contain any information yet.  I should
still rework this more so this is just a quickie to get the read/write
style interface more up to speed with the ioctl version.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Fri Oct 19 13:04:06 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -4 lines
comment polish

Revision 1.108: download - view: text, markup, annotated - select for diffs
Thu Oct 18 17:07:30 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -3 lines
Fix wrong argument order which just happened to work by luck.

Revision 1.98.4.2: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:33 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.98.4.1: preferred, colored; branchpoint 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98.4.1: +447 -405 lines
sync with head.

Revision 1.52.4.13: download - view: text, markup, annotated - select for diffs
Fri Oct 12 17:03:19 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.12: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.12: +446 -404 lines
Sync with head.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Thu Oct 11 19:41:14 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +440 -400 lines
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.106: download - view: text, markup, annotated - select for diffs
Thu Oct 11 12:31:45 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +8 -6 lines
Cache vnode member variables necessary for operations after the
userspace call, namely our private mount structure, in the activation
record.  This avoids problems in situations where the userspace
file server happens to die during our upcall and the vnode is
forcibly reclaimed before we roll back to the current stack frame.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Wed Oct 10 20:42:24 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +5 -5 lines
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.52.4.12: download - view: text, markup, annotated - select for diffs
Tue Oct 9 15:22:17 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.11: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.11: +11 -26 lines
Sync with head.

Revision 1.52.4.11: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:20 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.10: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.10: +225 -166 lines
Sync with head.

Revision 1.95.4.4: download - view: text, markup, annotated - select for diffs
Sun Oct 7 13:25:07 2007 UTC (17 years, 4 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.3: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.3: +2 -91 lines
Sync with HEAD.

Revision 1.98.4.1: download - view: text, markup, annotated - select for diffs
Sat Oct 6 15:29:50 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +231 -186 lines
sync with head.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu Oct 4 21:20:48 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-x86pmap-base2
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -91 lines
g/c the "sizeop" code previous used for ioctl/fcntl.  It was already
commented out and has bitrotted beyond all recognition, so it needs
complete rethinking.

Revision 1.95.4.3: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:28:54 2007 UTC (17 years, 4 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.95.4.2: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.2: +231 -97 lines
Sync with HEAD.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Tue Oct 2 01:17:17 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +147 -66 lines
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.102: download - view: text, markup, annotated - select for diffs
Mon Oct 1 21:09:09 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +60 -28 lines
* 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.101: download - view: text, markup, annotated - select for diffs
Thu Sep 27 21:44:12 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +6 -3 lines
Differentiate between cookie2vnode returning an error and
return to caller, address unknown: no such cookie, no such node.
Make the callers use this info to either create a new vnode or bail.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu Sep 27 21:14:50 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +34 -14 lines
Add error notifications, which are used to deliver errors from the
kernel to the file server for silly things the file server did,
e.g. attempting to create a file with size VSIZENOTSET.  The file
server can handle these as it chooses, but the default action is
for it to throw its hands in the air and sing "goodbye, cruel world,
it's over, walk on by".

Revision 1.99: download - view: text, markup, annotated - select for diffs
Thu Sep 27 14:35:15 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +3 -5 lines
Fix a race in how new cookies are checked.  Previously the checking
was done separate of inserting the cookie into the lookup structure
and without any form of interlock.  This could lead to the same
cookie pointing to two different nodes.  Remedy the race by creating
a separate "checked and ready to be inserted" cookie list which
serves as an interlock without having to hold a fs-global creation
lock.

Revision 1.52.4.10: download - view: text, markup, annotated - select for diffs
Sun Sep 16 19:04:30 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.9: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.9: +7 -21 lines
Checkpoint work in progress on the vnode lifecycle and reference counting
stuff. This makes it work properly without kernel_lock and fixes a few
quite old bugs. See vfs_subr.c 1.283.2.17 for details.

Revision 1.95.4.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:48:46 2007 UTC (17 years, 5 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.95.4.1: preferred, colored; branchpoint 1.95: preferred, colored
Changes since revision 1.95.4.1: +3 -3 lines
Sync with HEAD.

Revision 1.23.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:31 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.3: preferred, colored
Changes since revision 1.23.2.3: +732 -351 lines
sync with head.

Revision 1.88.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:22:56 2007 UTC (17 years, 5 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.88.2.1: preferred, colored; branchpoint 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88.2.1: +3 -3 lines
Sync with HEAD.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Aug 22 17:54:31 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
CVS tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -3 lines
Mimic namei structure changes for puffs.  bump both kernel & lib version.

Revision 1.52.4.9: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:26:10 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.8: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.8: +128 -40 lines
Sync with HEAD.

Revision 1.52.4.8: download - view: text, markup, annotated - select for diffs
Sun Aug 19 19:24:51 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.7: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.7: +7 -3 lines
- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.95.4.1: download - view: text, markup, annotated - select for diffs
Thu Aug 16 11:03:26 2007 UTC (17 years, 6 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +42 -12 lines
Sync with HEAD.

Revision 1.88.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:00 2007 UTC (17 years, 6 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +129 -43 lines
Sync with HEAD.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Aug 13 09:48:55 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +16 -14 lines
* don't call VOP_ACCESS in lookup, that's the file system's problem
* be more careful with r/o fs to catch EEXIST in lookup CREATE
* some comment polish

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Aug 12 19:44:15 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +32 -4 lines
enforce MNT_RDONLY

Revision 1.95.6.2: download - view: text, markup, annotated - select for diffs
Mon Jul 30 14:49:02 2007 UTC (17 years, 6 months ago) by pooka
Branches: matt-mips64
Diff to: previous 1.95.6.1: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.6.1: +2448 -0 lines
properly setup ubcflags

Revision 1.95.6.1
Mon Jul 30 14:49:01 2007 UTC (17 years, 6 months ago) by pooka
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.95: +0 -2448 lines
file puffs_vnops.c was added on branch matt-mips64 on 2007-07-30 14:49:02 +0000

Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon Jul 30 14:49:01 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3 lines
properly setup ubcflags

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Jul 29 13:31:10 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -5 lines
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Fri Jul 27 09:50:36 2007 UTC (17 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3 lines
ubc_uiomove: add an "advice" argument rather than using UVM_ADV_RANDOM blindly.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Jul 27 08:26:39 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +4 -4 lines
Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Jul 22 18:59:00 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3 lines
use NULL, not 0, to pass a pointer

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Jul 22 18:22:49 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +57 -20 lines
Keep track of the maximum size we have supplied the file server (or
it has supplied us).  If we fault pages which are at offset >= server
size, but less than the in-kernel vnode size, inform the file server
of the latest developments in file size before issueing the fault.
The avoids confusion with files which are not written start to finish.

fixes kern/36429 by yamt

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Jul 19 09:38:01 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +29 -8 lines
don't request more than the maximum request size in readdir

Revision 1.52.4.7: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:51 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.6: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.6: +197 -213 lines
Sync with head.

Revision 1.52.6.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:09:31 2007 UTC (17 years, 7 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +617 -322 lines
Sync with head.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:55:10 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
s/pagedaemon_lwp/pagedaemon_proc/

Revision 1.87: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:10:49 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +4 -2 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon Jul 2 18:25:37 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +9 -2 lines
support turning REQUIREDIR off and extra consume in lookup

Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Jul 2 10:24:17 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +5 -11 lines
Get rid of the "int *refs" parameter to inactive: the same can be
accomplished now with puffs_setbacks.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Jul 1 23:30:42 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -3 lines
loosen KASSERT: we can also fail due to ENOMEM

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Jul 1 22:54:16 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +31 -24 lines
Give the file server to ability to request the entire pathname buffer
under lookup by using PUFFS_KFLAG_LOOKUP_FULLPNBUF instead just the
current component.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Jul 1 17:22:18 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +32 -23 lines
Instead of supplying a plain pid, supply an abstract struct puffs_cid *,
which can currently be used to query the pid and lwpid.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Jul 1 15:30:16 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +36 -26 lines
make puffs_cred an opaque type

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Jun 30 16:28:14 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +7 -7 lines
Fix logic flaw in KASSERT.  Seems like my lkm wasn't compiled with
DIAGNOSTIC ...

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Jun 26 12:50:49 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +102 -145 lines
Simplify code, mainly vop_strategy.  No functional change

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Jun 24 22:16:04 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +9 -9 lines
Split the NOCACHE option in twain: NOCACHE_NAME & NOCACHE_PAGE.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Jun 21 14:54:49 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +4 -4 lines
Refactor the pnode2vnode translation slightly so that VFS_ROOT
can use it directly.

Revision 1.52.4.6: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:31:11 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.5: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.5: +5 -5 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.52.4.5: download - view: text, markup, annotated - select for diffs
Sat Jun 9 23:58:02 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.4: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.4: +29 -31 lines
Sync with head.

Revision 1.52.4.4: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:15:01 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.3: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.3: +216 -128 lines
Sync with head.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Wed Jun 6 01:55:00 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +2 -5 lines
Move puffs to a two clause license where it already isn't so.  And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...

Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Jun 6 01:33:10 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +12 -7 lines
In very verbose debug mode, print also return values for operations
(well, at least for those that go through checkop()).

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Jun 5 12:31:30 2007 UTC (17 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +17 -16 lines
improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Jun 1 15:59:37 2007 UTC (17 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
\xa0 -> space.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat May 19 16:35:01 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +8 -6 lines
Actually, we do need separate "no references in file server" and
"noref + inactive" flags if we wish to correctly support unix open
file semantics and optimize away pre-reclaim cache flushes.  So,
add PNODE_DYING which stands for norefs + inactive.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri May 18 15:46:09 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3 lines
Introduce noref setbacks, which the file server can use to signal
the kernel it has 0 references to the node in question.  In other
words, this can be used to avoid inactive(), or, if the file server
does not implement inactive, prompt reclaim for removed nodes.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Fri May 18 14:25:30 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -3 lines
selrecord() before calling userspace to avoid (very theoretical) race
where selinfo contains uninitialized garbage

Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri May 18 13:53:09 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +48 -10 lines
Support VOP_POLL.  This requires some acrobatics on the puffs_node,
as we give a reference to userspace for the puffs_node for the
duration of the poll call.  So reference count puffs_node separately
from the parent vnode.  vref()/vrele() is not possible due to a possible
surprise visit from VOP_INACTIVE.

Revision 1.51.2.5: download - view: text, markup, annotated - select for diffs
Thu May 17 13:41:44 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.51.2.4: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.4: +70 -70 lines
sync with head.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue May 15 12:48:48 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
In case strategy memory allocation for B_ASYNC|B_READ fails,
make sure to release the buf.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue May 8 21:39:03 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +21 -6 lines
Adventures in file systems, part (u_quad_t)-1: we can't use the
file system value for the size of device special files, as that
comes from specfs instead of the "host" file system.  Therefore,
take care that getattr doesn't override the value of vp->v_size.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon May 7 17:14:54 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +50 -65 lines
Introduce puffs "setbacks", which can be used to set certain flags
for nodes upon return from the userspace.  Currently it can be used
to indicate that the file server should be notified of "inactive"
in case the file server has opted to not receive inactive every
time the reference count for a vnode drops to zero.  (inactive is
a common event, almost never requires any action and must be executed
sychronously, so it is wasteful).

While doing this, cleanup the release-relock nonsense from the
vntouser*() arguments.  It was never enabled and the whole LOCKEDVP()
concept was very broken to begin with.

Revision 1.51.2.4: download - view: text, markup, annotated - select for diffs
Mon May 7 10:55:42 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.51.2.3: preferred, colored
Changes since revision 1.51.2.3: +63 -47 lines
sync with head.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun May 6 19:43:14 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +30 -17 lines
If setattr is called explicitly, use that as the sign to flush out
all metadata info cached in the kernel while we're setattr'ing in
any case.  Solves problems such as truncate (via extend-by-write)
+ chmod resulting in EPERM because the file was already read-only
when the actual truncate was flushed out of the kernel in fsync.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Apr 24 16:29:29 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +11 -17 lines
If ubc style write fails, do not extend the file by zero-padding
it.  It might be that the file server is either crashing or just
returning consistent errors.  uiomove() would handle the error,
but if the pages weren't faulted in, memset() to the unfaultable
ubc window would cause a kernel page fault.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Apr 22 18:50:28 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +11 -9 lines
Issue close to the file server asynchronously.  We're not interested
in the return value.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Apr 22 18:02:05 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +9 -2 lines
define PUFFS_KFLAG_WTCACHE, which makes the page cache write-through

Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Apr 20 11:56:35 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +8 -8 lines
* in readdir, don't copy extra memory back and forth to userspace
* consistent usage of the variable argsize with the rest of the module

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Apr 20 11:36:25 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
Size of a readdir cookie is sizeof(**ap->a_cookies), not
sizeof(*ap->a_cookies).  Fixes nfs readdir in the case that a
directory had lots of entries with short names.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Apr 16 13:03:26 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -3 lines
Give the file server the ability to specify the file handle length
instead of defining a static length file handle on the framework-level.

Revision 1.51.2.3: download - view: text, markup, annotated - select for diffs
Sun Apr 15 16:03:47 2007 UTC (17 years, 10 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.51.2.2: preferred, colored
Changes since revision 1.51.2.2: +113 -59 lines
sync with head.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Apr 11 21:03:05 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +43 -11 lines
* support VFS_FHTOVP and VFS_VPTOFH
* support cookies in for VOP_READDIR

nfs exporting puffs file systems works now

Revision 1.52.4.3: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:26:36 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.2: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.2: +282 -64 lines
Sync with head.

Revision 1.52.4.2: download - view: text, markup, annotated - select for diffs
Mon Apr 9 22:10:01 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.4.1: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.4.1: +3 -3 lines
- Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.

Revision 1.52.4.1: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:57:48 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +13 -11 lines
Compile fixes.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Apr 4 16:13:52 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -4 lines
Make it possible to interrupt waiters for fs operation completion
again.  This is useful until locking is further developed and basically
any deadlocks can be solved by killing appropriate processes.

Thanks especially to Tommi Kyntola and Antti Louko for sitting down
with me and discussing resource ownership and locking strategies
in implementing this.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Mar 30 17:48:59 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +54 -34 lines
* abstract ASYNCBIOREAD and let callers freely issue a callback called
  from putop.  even though there's only one user currently, makes code
  more readable
* move "delta" to a standard parameter in vntouser and get rid of the
  specialcase vntouser_delta

Revision 1.53.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 29 19:27:56 2007 UTC (17 years, 10 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53: +230 -32 lines
Pullup to -current

Revision 1.55: download - view: text, markup, annotated - select for diffs
Thu Mar 29 16:04:26 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +25 -23 lines
Convert spinlocks & sleep/wakeup to newlock2 locking stuff.  Fix a
bunch of bugs.

* park structures are now always allocated from a pool instead of a
  mixed stack/malloc allocation
* get rid of the whole adjbuf concept, always just alloc the maximal
  amount of memory to satisfy a request
* little regression: don't allow interrupting wait from file system
  to userspace; this had problems already before, but now the problems
  really started to shine through.  I'll try to make this work again
  some day.
* fix bmap to return a sensible value in runp

Revision 1.51.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:55:58 2007 UTC (17 years, 10 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.51.2.1: preferred, colored
Changes since revision 1.51.2.1: +221 -25 lines
sync with head.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue Mar 20 10:21:59 2007 UTC (17 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +213 -17 lines
* rework the page cache interaction a bit: cache metadata in the
  kernel and flush it out all at once instead of continuous updating
* add support for delivering notifications to the file server about
  when a page was written to (but disabled by default for now).  the
  file server can use this to request flushing or invalidating the
  kernel page cache

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Mar 14 12:13:58 2007 UTC (17 years, 11 months ago) by pooka
Branches: MAIN
Branch point for: reinoud-bufcleanup
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +10 -10 lines
Support B_READ|B_ASYNC in strategy by calling biodone() directly
when the file server puts the result.

Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:13 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.23.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:10:58 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.2: preferred, colored
Changes since revision 1.23.2.2: +374 -203 lines
sync with head.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Feb 20 19:45:37 2007 UTC (17 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
Properly fix rev 1.44: limit error values from the file server to
positive values of errno and 0.  Otherwise it can return internal values
such as EJUSTRETURN and screw things up.

thanks to Bill for reminding me to revisit this

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 17 23:27:45 2007 UTC (18 years ago) by tron
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +10 -27 lines
Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Feb 15 19:50:54 2007 UTC (18 years ago) by pooka
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +9 -4 lines
Sanity-check linklen returned from file server in READLINK.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Feb 10 13:12:43 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +36 -12 lines
* in write, do sync pageflush for the ubc case every 64k, otherwise
  the user file server can't really keep up and just writing and writing
  may result in kernel memory exhaustion.  this lossage is also partially
  due to the stupid way mtime + size info is handled currently, but that
  should change soon (*knock knock* ;)
* score a few debug printfs

Revision 1.14.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:03:52 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.14.2.4: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.4: +50 -27 lines
Sync with HEAD.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Feb 9 08:53:51 2007 UTC (18 years ago) by pooka
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -13 lines
honor B_ASYNC

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Feb 9 08:15:41 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -5 lines
assign value for strategy output parameter b_resid instead of decreasing it

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Feb 8 22:55:06 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +29 -19 lines
If the file server doesn't support write, don't use genfs_null_putpages
for putpages, as it assumes a vnode doesn't have any pages.  For
mounts using the page cache this is simply not true.  Rather,
prevent opening a regular file in write-mode.  That way a vnode
can never have dirty pages which would need to be flushed (i.e.
written).

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Feb 8 05:09:25 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +7 -7 lines
chuq shone arcane wisdom on me: b_bcount comes in, b_resid goes out

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Feb 8 04:52:23 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +21 -2 lines
Don't block and wait for file server response in case strategy is
run in pagedaemon context: it gives the file server way more control
over the fate of the entire kernel than what we're comfortable with.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Feb 6 01:53:11 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -2 lines
Limit errors from puffs_lookup to 0, EJUSTRETURN and ENOENT, as
that's what namei/lookup expects.

Revision 1.14.2.4: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:33 2007 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.14.2.3: preferred, colored
Changes since revision 1.14.2.3: +161 -100 lines
Sync with head.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jan 29 15:42:50 2007 UTC (18 years ago) by hannken
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -4 lines
Change fstrans enum types to upper case.
No functional change.

From Antti Kantee <pooka@netbsd.org>

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Jan 26 23:25:56 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
We don't handle fsync in checkop anymore, so direct the fifoop fsync
also to a place less panicy, namely fifo_fsync (because currently the
metadata information is update when the node is changed.  This will
probably change soon, though).

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Jan 26 22:59:49 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +39 -9 lines
Initial attempt at suspend/snapshot support for userspace file
servers.  This is still pretty much on the level "if it breaks ...".
It should work for single-threaded servers which handle one operation
from start to finish in one go.  Also, it does not yet totally
correctly synchronize metadata and data in some cases.  So needless
to say, it needs improvement, but it is possible that will have to
wait for some lock revampage.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Jan 25 23:43:57 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +7 -2 lines
if strategy fails, set bp->b_error and B_ERROR

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Jan 25 17:43:56 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -8 lines
don't hold spinlocks (except vnode interlock) when doing vget()

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Jan 21 16:29:31 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +28 -12 lines
optimize a bit: don't flush pages for vnodes which have no references
in the kernel or links in the backend

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Jan 21 14:52:20 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -5 lines
remove diagnostic printf

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Jan 19 17:52:01 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -3 lines
hannken noted that the latest gcc (?) complains about uninitialized
variable use in puffs_strategy() for "dowritefaf" (incorrectly)
and "error" (correctly, although the function is practically of
type void)

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Jan 19 14:59:50 2007 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +64 -24 lines
In case the fs server is in the kernel doing an operation on a
completely different file system, we still might re-enter the same
puffs fs in case we execute something on the other file system,
which wants to get a new vnode and ends up recycling a puffs vnode
for the purpose.  In this case the fs server will sleep in the
kernel until it itself handles the operation .... which of course
is a slightly unlikely event.

After analyzing the path from getcleanvnode() to the vnode cemetary,
identify that fsync and putpages (strategy) are the ones in danger
of striking a deadlock deal.  Abuse the vnode flag VXLOCK to tell
them "this vnode is irreversably going to meet its maker, don't
care about user server return values" (failure is not acceptable
down the vgonel() path) and issue the respective operations as
Fire-And-Forget (FAF) operations.  no wait -> no deadlock.

This of course is a "fix" skating on thin ice.  A better, more
generic solution is already in sight, but will take more effort to
implement.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Jan 16 21:58:49 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +19 -56 lines
* don't wait for the answer of VOP_RECLAIM, just fire-and-forget
* revoke puffs_revoke.  we can deal with it just by calling genfs_revoke

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Jan 15 23:29:08 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -2 lines
Store puffs_node's on lists hashed with the cookie value instead
of just one flat list.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Jan 15 20:40:29 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +14 -2 lines
* do not accept the directory cookie as the result of a lookup (otherwise
  we'd be locking against ourselves)
* do not accept duplicate cookies when creating new nodes

Revision 1.14.2.3: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:05 2007 UTC (18 years, 1 month ago) by ad
Branches: newlock2
Diff to: previous 1.14.2.2: preferred, colored
Changes since revision 1.14.2.2: +506 -210 lines
Sync with head.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Jan 11 16:08:58 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +26 -18 lines
Since fsync is really putpages + fsync, check for both separately
instead of using just putpages to decide the op's faith.

And the real beef in this commit is of course a tyop fix in a comment.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Jan 9 18:14:31 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4 lines
Introduce flush operations, which the fs server can use to control
kernel caching.  Currently supported are only flushing the name
cache for a directory or flushing the name cache for the entire fs.

Also, get rid of PNODE_INACTIVE status, since it was racy and
essentially didn't work.  All this on top of being useless in the
first place ....

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Jan 7 00:53:13 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +7 -2 lines
getcwd wants eofflag - set eofflag in readdir if amount of data is 0

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Jan 2 00:14:15 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +6 -10 lines
In rename, tdvp == tvp holds if we are renaming a directory to "."
(XXX: for all the sense that makes).  Deal with it gracefully here
for now.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Jan 1 23:07:36 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -18 lines
remove r/o mount check done also in vfs lookup()

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Jan 1 20:16:36 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +97 -40 lines
async update node metadata for spec- and fifoops

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Jan 1 20:14:36 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -3 lines
properly handle VOP_REMOVE case where vp == dvp

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Jan 1 14:41:21 2007 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -2 lines
explicitly disable ioctl and fcntl for now - support has bitrotted

Revision 1.23.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:01 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.23.2.1: preferred, colored
Changes since revision 1.23.2.1: +1926 -0 lines
sync with head.

Revision 1.23.2.1
Sat Dec 30 01:29:03 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
FILE REMOVED
Changes since revision 1.23: +0 -1926 lines
file puffs_vnops.c was added on branch yamt-lazymbuf on 2006-12-30 20:50:01 +0000

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Dec 30 01:29:03 2006 UTC (18 years, 1 month ago) by pooka
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +27 -15 lines
* use PUFFS_KFLAG_NOCACHE to also signal that we don't want the namecache
* enter files into the namecache immediately when new nodes are created
  (if it's a caching mount, of course)

Revision 1.22.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:18:38 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.22.2.1: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.2.1: +1914 -0 lines
sync with head.

Revision 1.22.2.1
Sat Dec 9 16:11:51 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-splraiseipl
FILE REMOVED
Changes since revision 1.22: +0 -1914 lines
file puffs_vnops.c was added on branch yamt-splraiseipl on 2006-12-10 07:18:38 +0000

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Dec 9 16:11:51 2006 UTC (18 years, 2 months ago) by chs
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Branch point for: yamt-splraiseipl
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +10 -27 lines
a smorgasbord of improvements to vnode locking and path lookup:
 - LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Dec 7 16:58:39 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +38 -16 lines
let implementation ultimately decide if mmap is supported - pass
VOP_MMAP to fs server

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Dec 5 23:07:42 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -3 lines
adjust file size in write only if file grows.  but since this change is
in the "never use ubc" branch, I don't think it matters except for cosmetics.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Dec 5 23:03:28 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -7 lines
Allow multiple requests to be transferred in each GET/PUTOP.  For
a single request, the performance is still the same.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Dec 1 12:48:31 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +7 -7 lines
prefix kernel flags with PUFFS_KFLAG to have a separate namespace
from the library flags

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Dec 1 12:37:41 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +224 -54 lines
don't call the fs server for all operations, only those it has told
us that it implements

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Nov 28 13:20:03 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +18 -3 lines
don't allow mmap if operating uncached

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Nov 18 22:45:39 2006 UTC (18 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +13 -40 lines
Actually, for NOCACHE, use direct read/write instead of going through
page cache at all and invalidating.  XXX: mmap

Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:20 2006 UTC (18 years, 2 months ago) by ad
Branches: newlock2
Diff to: previous 1.14.2.1: preferred, colored
Changes since revision 1.14.2.1: +1688 -0 lines
Sync with head.

Revision 1.14.2.1
Sat Nov 18 19:33:02 2006 UTC (18 years, 3 months ago) by ad
Branches: newlock2
FILE REMOVED
Changes since revision 1.14: +0 -1749 lines
file puffs_vnops.c was added on branch newlock2 on 2006-11-18 21:39:20 +0000

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Nov 18 19:33:02 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Branch point for: newlock2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +51 -27 lines
make puffs_strategy more robust

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Nov 18 12:39:48 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +11 -2 lines
Require statvfs info from startreq so that we have that info available.
Also, don't pass fsid to userspace and just fill it in the kernel.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Nov 18 08:18:24 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +18 -10 lines
As a first generation best-effort hack, use NOCACHE to mean "file
size can change without the kernel knowing" and therefore query
the file size before invoking read or write operations.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Nov 17 17:48:02 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +33 -13 lines
Introduce uncached operation, makes sense when the file system backend
can be modified from elsewhere than the file system interface

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Nov 13 20:57:56 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -6 lines
No need to return a special value for CREATE/RENAME lookup, so just
handle ENOENT.  If there's a real error, userspace will return
something else.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Nov 8 11:49:36 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +8 -3 lines
update struct buf resid in strategy according to what was transferred.
seems like only nestiobuf complains when it wasn't updated ...

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Nov 7 22:10:18 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +364 -131 lines
attach to genfs & support page cache.  most noticeable effect is
mmap and therefore execution of binaries starting to work, some
speed improvements with large file I/O also.  caching semantics
and error case handling most likely need revisiting.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Oct 27 19:01:48 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Use spec_fsync for specops vop_fsync: it knows about vflushbuf(), which
is more than what puffs currently knows.  makes e.g. ffs unmount for a
puffs-based device node work.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Oct 27 12:25:16 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +71 -8 lines
support fifos

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Oct 26 22:52:47 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +79 -8 lines
support specfs

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Oct 26 13:42:21 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +34 -10 lines
Fix operations creating new nodes to honor the vnode locking protocol
if the userspace server returns an error.  Fixes lockups if any
of the following operations failed: create, mknod, mkdir, symlink

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Oct 25 18:15:39 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +46 -24 lines
pass VOP_INACTIVE() to userspace

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Oct 23 12:21:39 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -4 lines
fix print in VOP_PRINT

also make it compile on amd64.  problem noticed by Blair Sadewitz
on current-users

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 22:43:23 2006 UTC (18 years, 3 months ago) by pooka
Branches: MAIN
kernel portion of puffs - the Pass-to-Userspace Framework File System.
It contains the VFS attachment and userspace message-passing interface.

This work was initially started and completed for Google SoC 2005
and tweaked to work a bit better in the past few weeks.  While
being far from complete, it is functional enough to be able and
stable to host a fairly general-purpose in-memory file system in
userspace.  Even so, puffs should be considered experimental and
no binary compatibility for interfaces or crash-freedom or zero
security implications should be relied upon just yet.

The GSoC project was mentored by William Studenmund and the final
review for the code was done by Christos.

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

CVSweb <webmaster@jp.NetBSD.org>