hannken
5985f10515
No need to call vflush from failing udf_mount(). If the system nodes
...
really have to disappear we should change vrele() to vrecycle() here.
2017-06-24 12:13:16 +00:00
chs
fd34ea77eb
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.
2017-06-01 02:45:05 +00:00
hannken
5dc331fb8e
When a vnode has an invalid type because the type changed on the
...
server replace vgone() with new operation smbfs_uncache() that
removes the vnode from the name cache and changes the vcache key
to an unique and illegal key to prevent further lookups.
2017-05-28 16:36:37 +00:00
riastradh
93562e3f53
Eliminate crusty debugging sludge.
...
We have a mostly sane vnode lifecycle now. If this needs debugging,
it should be done once at the call site of VOP_RECLAIM.
2017-05-26 14:34:19 +00:00
riastradh
7f7aad09bd
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.
2017-05-26 14:20:59 +00:00
hannken
3194ba799d
Use VCALL() to lock or unlock the lower node.
2017-05-24 09:55:18 +00:00
hannken
2aedd7ca2a
Move v_writecount adjustment from revoke to reclaim.
2017-05-07 08:21:57 +00:00
riastradh
6fa7b15833
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
2017-04-26 03:02:47 +00:00
hannken
20bb034f5b
Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
...
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
2017-04-17 08:32:00 +00:00
hannken
ebb8f73b4b
Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference to
...
struct mount. Rename vfs_destroy(mp) to vfs_rele(mp) and replace
incrementing mp->mnt_refcnt with vfs_ref(mp).
2017-04-17 08:31:01 +00:00
riastradh
87fb32292e
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!
2017-04-11 14:24:59 +00:00
hannken
9888a178c6
Update mtime when updating file size.
...
PR kern/51762 (mtime not updated by open(O_TRUNC))
2017-04-08 08:49:44 +00:00
christos
6b0cbcd6e2
use ubc_zerorange
2017-04-06 00:02:19 +00:00
christos
b53a5a0ca4
use MAX_PAGE_SIZE.
2017-04-04 21:07:50 +00:00
riastradh
30509f8074
KASSERT(mutex_owned(vp->v_interlock)) in vnode iterator selector.
2017-04-01 19:35:56 +00:00
hannken
3c404d2c80
Protect tmpfs_getpages() against reclaiming vnodes.
2017-03-30 09:09:26 +00:00
hannken
1f6768b2fd
Add field "mnt_lower" to "struct mount" to track the file system
...
a layered file system is mounted on.
Welcome to 7.99.65
2017-03-06 10:10:07 +00:00
hannken
8c855e05d7
Handle v_writecount from union_open(), union_close() and union_revoke()
...
so lower file system vnodes get marked as open for writing.
2017-03-06 10:08:49 +00:00
hannken
90ead62d2f
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
2017-03-01 10:44:47 +00:00
hannken
61b2de1d70
Remove now redundant calls to fstrans_start()/fstrans_done().
2017-03-01 10:41:28 +00:00
hannken
a378d58ecb
Enable fstrans on all file systems.
...
Welcome to 7.99.61
2017-02-22 09:50:13 +00:00
hannken
326db3aaf6
Add generic genfs_suspendctl() and use it for all file systems.
...
Layered file systems need work.
2017-02-17 08:31:23 +00:00
hannken
64a4d4bd11
Untangle VFS_SYNC() from VFS_SUSPENDCTL().
2017-02-17 08:29:11 +00:00
hannken
4b595f6ef6
Take vnode lock for VOP_FSYNC().
2017-02-17 08:27:20 +00:00
hannken
ac23b49f6d
Run vflush() when going from read/write to read only.
2017-01-27 10:47:54 +00:00
maya
be48413a3c
Be explicit about how we're placing part of the on-disk name into
...
the extension, so it doesn't appear like we are overrunning an array.
Appeases coverity, NFC.
ok riastradh
2017-01-14 17:17:53 +00:00
joerg
a88ba739cb
Remove RO check in tmpfs_putpages for now, the syncer doesn't like the
...
error code.
2017-01-11 12:12:32 +00:00
christos
4faed551bb
PR/51777: David Binderman: Remove unused computation
2017-01-04 15:53:14 +00:00
hannken
bd6e0af46f
Change tmpfs_chsize() to update mtime etc. even if "length == node->tn_size".
...
Adresses PR kern/51762 "mtime not updated by open(O_TRUNC)"
2017-01-04 10:06:43 +00:00
skrll
244ca08653
Hold the interlock when calling cv_broadcast as per condvar(9)
2016-12-26 08:21:09 +00:00
hannken
70ec436e39
Move vnode members "v_freelisthd" and "v_freelist" from "struct vnode"
...
to "struct vnode_impl" and rename to "vi_lrulisthd" and "vi_lrulist".
No functional change intended.
Welcome to 7.99.48
2016-12-14 15:48:54 +00:00
pgoyette
47cc427df8
More changes for creds, mutex, etc.
2016-12-13 22:54:24 +00:00
pgoyette
0342d5080b
Mostly mechanical updates for caddr_t, thread, mutex, and credentials
2016-12-13 22:52:46 +00:00
pgoyette
752640fd36
Disable duplicate typedef
2016-12-13 22:49:02 +00:00
pgoyette
88b1d6a671
More cleanup of #includes
2016-12-13 22:31:51 +00:00
pgoyette
3be2222bbe
Adapt code for our location of the nfs headers, and some updates for
...
differences in kernel options(4) handling
2016-12-13 22:17:33 +00:00
pgoyette
d687e96a02
Update for location of newnfs headers, clean up some other #include
2016-12-13 21:58:17 +00:00
pgoyette
c10f8b5081
Update locations for new nfs header files.
...
XXX Some #includes are just disabled (via #if 0) and will need to be
XXX resolved before further progress can be made.
2016-12-13 21:50:32 +00:00
pgoyette
c81f4ce3f4
One more option for the opt_ file.
2016-12-13 21:44:01 +00:00
pgoyette
01ce88d0f3
More clean-up of #includes
2016-11-18 22:58:08 +00:00
pgoyette
f8afa79068
Add the initial module(9) infrastructure
2016-11-18 22:41:18 +00:00
pgoyette
c68a82788b
Clean up some #includes
2016-11-18 22:37:50 +00:00
pgoyette
34f2d232eb
Clean up after the import auto-generate.
...
At least now it doesn't cause config(1) any problems.
2016-11-18 09:58:38 +00:00
pgoyette
2d39560c47
Resolve conflicts
2016-11-18 08:31:29 +00:00
pgoyette
e81f0ea2ca
Update to FreeBSD revision 308975 ( approx 2016-11-18 07:30 UTC)
...
If I'm going to try to get this working, I should at least start with
the most recent code available.
2016-11-18 07:49:10 +00:00
christos
aeed4fbb7e
add missing attribute
2016-09-22 15:57:05 +00:00
dholland
b5981bcf46
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)
2016-08-26 21:44:24 +00:00
skrll
a321adb539
Two fixes from rmind
...
- tmpfs_node_get: restore (decrement) the node count on the error path.
- tmpfs_bytes_max: save the value of uvmexp.freetarg (since it is
unlocked/racy).
2016-08-22 23:07:36 +00:00
hannken
7139aab724
Remove now obsolete operation vcache_remove().
...
Welcome to 7.99.36
2016-08-20 12:37:06 +00:00
christos
0d5ace558d
replace variable stack declaration with a large enough one and KASSERT.
2016-07-21 18:21:27 +00:00