History log of /netbsd-src/sys/fs/tmpfs/tmpfs_vfsops.c (Results 1 – 25 of 78)
Revision Date Author Comments
# aac0938b 10-Nov-2022 hannken <hannken@NetBSD.org>

Tmpfs_mount() uses tmpfs_unmount() for cleanup if set_statvfs_info() fails.
This will not work as tmpfs_unmount() needs a suspended file system.

Just call set_statvfs_info() before allocating the ro

Tmpfs_mount() uses tmpfs_unmount() for cleanup if set_statvfs_info() fails.
This will not work as tmpfs_unmount() needs a suspended file system.

Just call set_statvfs_info() before allocating the root vnode and add
and use a common error exit label.

Reported-by: syzbot+343f2bfea65a32ab4222@syzkaller.appspotmail.com

show more ...


# c90f9c8c 04-Apr-2020 ad <ad@NetBSD.org>

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode lo

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.

Possible future enhancements:

- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.

show more ...


# c2e9cb94 17-Jan-2020 ad <ad@NetBSD.org>

VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.


# 24da3199 04-Oct-2019 mrg <mrg@NetBSD.org>

remove an always false check and its' "This can never happen?" comment.


# b689ec0f 01-Jan-2019 hannken <hannken@NetBSD.org>

Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30


# ef24a844 09-Aug-2018 christos <christos@NetBSD.org>

FIx performance regression from rmind@:

Just from a very quick look, it seems like a regression introduced with
the vcache changes: the MP-safe flag is set too late and not inherited
by the root vno

FIx performance regression from rmind@:

Just from a very quick look, it seems like a regression introduced with
the vcache changes: the MP-safe flag is set too late and not inherited
by the root vnode.

show more ...


# fd34ea77 01-Jun-2017 chs <chs@NetBSD.org>

remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

al

remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

show more ...


# 90ead62d 01-Mar-2017 hannken <hannken@NetBSD.org>

Change the protocol to update a mounted file system from read-write
to read-only and vice versa:

- Add an internal flag IMNT_WANTRDONLY.
- Set either IMNT_WANTRDWR or IMNT_WANTRDONLY if going from o

Change the protocol to update a mounted file system from read-write
to read-only and vice versa:

- Add an internal flag IMNT_WANTRDONLY.
- Set either IMNT_WANTRDWR or IMNT_WANTRDONLY if going from or to read-only.
- After successfull call to VFS_MOUNT() set or clear MNT_RDONLY.

Adapt tmpfs and rumpfs to the new protocol. Other file systems will be
updated when they get the IMNT_CAN_RWTORO property.

Welcome to 7.99.64

show more ...


# 326db3aa 17-Feb-2017 hannken <hannken@NetBSD.org>

Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.


# ac23b49f 27-Jan-2017 hannken <hannken@NetBSD.org>

Run vflush() when going from read/write to read only.


# b5981bcf 26-Aug-2016 dholland <dholland@NetBSD.org>

In the event that loading the root vnode fails, bail out of
tmpfs_mount instead of crashing.

Came up in PR 51436, where kmem issues caused internal allocations to
wrongly fail. However, that could h

In the event that loading the root vnode fails, bail out of
tmpfs_mount instead of crashing.

Came up in PR 51436, where kmem issues caused internal allocations to
wrongly fail. However, that could happen for real sometime (e.g.
probably if you tried to mount a new tmpfs when the system was very
low on memory, or possibly for other reasons entirely) and crashing
isn't the ticket.

(This is not a fix for PR 51436)

show more ...


# b2f46950 12-Mar-2016 joerg <joerg@NetBSD.org>

Implement most of mount -ur functionality for tmpfs. Remaining issue is
the question who is responsible for syncing pending writes, but the
functionality is good enough for serving as read-only chroo

Implement most of mount -ur functionality for tmpfs. Remaining issue is
the question who is responsible for syncing pending writes, but the
functionality is good enough for serving as read-only chroot base in
bulk builds.

show more ...


# d547094d 12-Mar-2016 joerg <joerg@NetBSD.org>

Only recheck size/node limits on update mounts, if there actually have
been specified.


# 8c80da52 06-Jul-2015 hannken <hannken@NetBSD.org>

Change tmpfs to vcache.
- Use tmpfs node address as key.
- Remove tn_vlock, field tn_vnode now protected by vcache.
- Add a hold count to tmpfs node to prevent nodes from disappearing
while tmpfs_f

Change tmpfs to vcache.
- Use tmpfs node address as key.
- Remove tn_vlock, field tn_vnode now protected by vcache.
- Add a hold count to tmpfs node to prevent nodes from disappearing
while tmpfs_fhtovp() trys to vcache_get() them. Last holder
destroys reclaimed nodes.
- Remove the now unneeded parent unlock/lock for lookup of '..'.

show more ...


# 12475e02 06-Jul-2015 hannken <hannken@NetBSD.org>

Use VFS_PROTOS() for tmpfs.


# b7650b1a 10-Jun-2014 martin <martin@NetBSD.org>

Check for invalid mount arguments early and gracefully fail the mount.
Spotted by pooka@


# c7dd06b6 07-Jun-2014 martin <martin@NetBSD.org>

Remove the hardcoded 4 MB free kernel memory limit and replace it
by uvmexp.freetarg, as discussed on tech-kern.
Main purpose is to make tmpfs usable (as far as possible) on small memory
machines.
Th

Remove the hardcoded 4 MB free kernel memory limit and replace it
by uvmexp.freetarg, as discussed on tech-kern.
Main purpose is to make tmpfs usable (as far as possible) on small memory
machines.
This is a bit experimental, but we need to give it some real world exposure
to see how well it works.

show more ...


# 71fd4168 30-Apr-2014 christos <christos@NetBSD.org>

fix typo


# 0172bc97 30-Apr-2014 christos <christos@NetBSD.org>

handle MNT_UPDATE


# 23f76b6d 16-Apr-2014 maxv <maxv@NetBSD.org>

An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs

An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@

show more ...


# 6d285189 23-Mar-2014 hannken <hannken@NetBSD.org>

Change all vfsops to use C99 designated initializers.

No functional changes intended.


# b9c5e8c0 06-Feb-2014 hannken <hannken@NetBSD.org>

Remove an annoying printf. And to answer the question: VFS_VGET() gets
used by NFS V3 server for readdirplus.


# b04f8aa8 04-Jan-2014 hannken <hannken@NetBSD.org>

Fix a race where thread1 runs VOP_REMOVE() and gets preempted in
tmpfs_reclaim() before the call to tmpfs_free_node(). Thread2
runs VFS_FHTOVP() and gets a new vnode attached to the node thread1
is

Fix a race where thread1 runs VOP_REMOVE() and gets preempted in
tmpfs_reclaim() before the call to tmpfs_free_node(). Thread2
runs VFS_FHTOVP() and gets a new vnode attached to the node thread1
is about to destroy.

Change tmpfs_fhtovp() to check the generation number after
tmpfs_vnode_get() succeeded.

show more ...


# e63cf28e 23-Nov-2013 rmind <rmind@NetBSD.org>

- 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)

- 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.

show more ...


# 89433ee6 10-Nov-2013 rmind <rmind@NetBSD.org>

Handle whiteout case in tmpfs_dir_detach() and tmpfs_unmount().


1234