forked from tytso/ext4
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add per-sb s_write_srcu to implement 'vfs write barriers'. Writers need to opt-in to participate in 'vfs write barriers' by using the new {sb,file}_{start,end}_write_srcu() helpers. sb_write_barrier() calls synchronize_srcu() to wait for all the writers that opted-in to participate in 'vfs write barriers'. sb_write_barrier() may block, waiting for old writes to complete, but it never blocks new writers from starting write. To minimize performance overhead when write barriers are not needed, consumers of sb_write_barrier() need to activate write barrier on sb by calling activate_sb_write_barrier(). There is no deactivate, so the performance overhead sticks with the sb until it is killed. Tested-by: kernel test robot <oliver.sang@intel.com> Link: https://lore.kernel.org/oe-lkp/202306192245.d77d7216-oliver.sang@intel.com Signed-off-by: Amir Goldstein <amir73il@gmail.com>
- Loading branch information
Showing
2 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters