Home | History | Annotate | Download | only in tmpfs
History log of /src/sys/fs/tmpfs/tmpfs_specops.c
RevisionDateAuthorComments
 1.16  19-Jul-2021  dholland 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.
 1.15  18-Jul-2021  dholland 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.
 1.14  29-Jun-2021  dholland - 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.
 1.13  16-May-2020  christos branches: 1.13.6;
Add ACL support for FFS. From FreeBSD.
 1.12  25-Jul-2014  dholland 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.
 1.11  23-Nov-2013  rmind branches: 1.11.2;
- Simplify tmpfs_update(), eliminate tmpfs_note_t::tn_status and deferred
timestamp updates. Fix some incorrect updates and plug some missing ones.
Should fix PR/48385.
- tmpfs_rmdir: avoid O(n) scan when the directory is not empty and whiteout
entries were never added.
 1.10  24-May-2011  rmind branches: 1.10.4; 1.10.14; 1.10.18;
- Describe some locking.
- Add VOP argument comments, add some asserts.
- Update/fix/remove outdated/missleading comments.
- Clean up, de-indent, KNF, misc.

No functional changes intended.
 1.9  20-Jun-2008  skd branches: 1.9.18; 1.9.24;
add NULL arg so it will compile.
 1.8  28-Apr-2008  martin branches: 1.8.2; 1.8.4;
Remove clause 3 and 4 from TNF licenses
 1.7  25-Jan-2008  ad branches: 1.7.6; 1.7.8; 1.7.10;
Remove VOP_LEASE. Discussed on tech-kern.
 1.6  11-Dec-2005  christos branches: 1.6.18; 1.6.48; 1.6.54;
merge ktrace-lwp.
 1.5  02-Nov-2005  yamt branches: 1.5.2;
merge yamt-vop branch. remove following VOPs.

VOP_BLKATOFF
VOP_VALLOC
VOP_BALLOC
VOP_REALLOCBLKS
VOP_VFREE
VOP_TRUNCATE
VOP_UPDATE
 1.4  02-Nov-2005  dyoung Bug fix: correct the sense of an if-condition in tmpfs_spec_close:
because VOP_UPDATE() usually succeeded, spec_close() was not usually
called. Only skip the spec_close() step if VOP_UPDATE() returns
an error result. Now /dev/watchdog works as expected when /dev/
is a tmpfs; previously, it was impossible to disarm a user-tickled
watchdog.
 1.3  23-Sep-2005  jmmv branches: 1.3.2;
Kill the tmpfs(9) manual page; it was just documenting internal details of
tmpfs' "API" and was already rotting.

Instead, merge all the relevant comments into the code. This includes
acknowledgements to Google's Summer of Code 2005 program (they were in the
AUTHORS section of tmpfs(9) before), so all the files need to be changed
to include this sentence alongside the title. (Note that this was not a
requirement of the program.)
 1.2  10-Sep-2005  jmmv wiz@ remembers that the preferred way to spell file-system in NetBSD is
file system.
 1.1  10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*. Therefore, it is disabled by
default in all kernels. However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
 1.3.2.3  02-Nov-2005  yamt sync with head.
 1.3.2.2  29-Oct-2005  yamt as tmpfs_update never fails, make it return void.
suggested by Chuck Silvers.
 1.3.2.1  20-Oct-2005  yamt adapt tmpfs.
 1.5.2.2  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.1  02-Nov-2005  skrll file tmpfs_specops.c was added on branch ktrace-lwp on 2005-11-10 14:09:44 +0000
 1.6.54.1  18-Feb-2008  mjf Sync with HEAD.
 1.6.48.1  23-Mar-2008  matt sync with HEAD
 1.6.18.3  04-Feb-2008  yamt sync with head.
 1.6.18.2  21-Jun-2006  yamt sync with head.
 1.6.18.1  11-Dec-2005  yamt file tmpfs_specops.c was added on branch yamt-lazymbuf on 2006-06-21 15:09:36 +0000
 1.7.10.2  04-May-2009  yamt sync with head.
 1.7.10.1  16-May-2008  yamt sync with head.
 1.7.8.1  18-May-2008  yamt sync with head.
 1.7.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.7.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.8.4.1  27-Jun-2008  simonb Sync with head.
 1.8.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.24.1  06-Jun-2011  jruoho Sync with HEAD.
 1.9.18.1  31-May-2011  rmind sync with head
 1.10.18.1  18-May-2014  rmind sync with head
 1.10.14.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.4.1  22-May-2014  yamt 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")
 1.11.2.1  10-Aug-2014  tls Rebase.
 1.13.6.1  01-Aug-2021  thorpej Sync with HEAD.

RSS XML Feed