mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
vfs: replace vfs_smr_quiesce with vfs_smr_synchronize
This ends up using a smr specific method.
Suggested by: markj
Tested by: pho
(cherry picked from commit 72b3b5a941)
This commit is contained in:
parent
f1727a6697
commit
e9fc871b0d
2 changed files with 7 additions and 7 deletions
|
|
@ -2678,7 +2678,7 @@ cache_vnode_init(struct vnode *vp)
|
|||
*
|
||||
* This will force a fs lookup.
|
||||
*
|
||||
* Synchronisation is done in 2 steps, calling vfs_smr_quiesce each time
|
||||
* Synchronisation is done in 2 steps, calling vfs_smr_synchronize each time
|
||||
* to observe all CPUs not performing the lookup.
|
||||
*/
|
||||
static void
|
||||
|
|
@ -2694,14 +2694,14 @@ cache_changesize_set_temp(struct nchashhead *temptbl, u_long temphash)
|
|||
*/
|
||||
atomic_store_long(&nchash, temphash);
|
||||
atomic_thread_fence_rel();
|
||||
vfs_smr_quiesce();
|
||||
vfs_smr_synchronize();
|
||||
/*
|
||||
* At this point everyone sees the updated hash value, but they still
|
||||
* see the old table.
|
||||
*/
|
||||
atomic_store_ptr(&nchashtbl, temptbl);
|
||||
atomic_thread_fence_rel();
|
||||
vfs_smr_quiesce();
|
||||
vfs_smr_synchronize();
|
||||
/*
|
||||
* At this point everyone sees the updated table pointer and size pair.
|
||||
*/
|
||||
|
|
@ -2724,14 +2724,14 @@ cache_changesize_set_new(struct nchashhead *new_tbl, u_long new_hash)
|
|||
*/
|
||||
atomic_store_ptr(&nchashtbl, new_tbl);
|
||||
atomic_thread_fence_rel();
|
||||
vfs_smr_quiesce();
|
||||
vfs_smr_synchronize();
|
||||
/*
|
||||
* At this point everyone sees the updated pointer value, but they
|
||||
* still see the old size.
|
||||
*/
|
||||
atomic_store_long(&nchash, new_hash);
|
||||
atomic_thread_fence_rel();
|
||||
vfs_smr_quiesce();
|
||||
vfs_smr_synchronize();
|
||||
/*
|
||||
* At this point everyone sees the updated table pointer and size pair.
|
||||
*/
|
||||
|
|
@ -3876,7 +3876,7 @@ cache_fplookup_lockout(void)
|
|||
if (on) {
|
||||
atomic_store_char(&cache_fast_lookup_enabled, false);
|
||||
atomic_thread_fence_rel();
|
||||
vfs_smr_quiesce();
|
||||
vfs_smr_synchronize();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp);
|
|||
#define VFS_SMR() vfs_smr
|
||||
#define vfs_smr_enter() smr_enter(VFS_SMR())
|
||||
#define vfs_smr_exit() smr_exit(VFS_SMR())
|
||||
#define vfs_smr_quiesce() quiesce_all_critical()
|
||||
#define vfs_smr_synchronize() smr_synchronize(VFS_SMR())
|
||||
#define vfs_smr_entered_load(ptr) smr_entered_load((ptr), VFS_SMR())
|
||||
#define VFS_SMR_ASSERT_ENTERED() SMR_ASSERT_ENTERED(VFS_SMR())
|
||||
#define VFS_SMR_ASSERT_NOT_ENTERED() SMR_ASSERT_NOT_ENTERED(VFS_SMR())
|
||||
|
|
|
|||
Loading…
Reference in a new issue