Home
last modified time | relevance | path

Searched refs:i_rwsem (Results 1 – 25 of 26) sorted by relevance

12

/Linux-v5.4/fs/ceph/
Dio.c24 lockdep_assert_held_write(&inode->i_rwsem); in ceph_block_o_direct()
56 down_read(&inode->i_rwsem); in ceph_start_io_read()
59 up_read(&inode->i_rwsem); in ceph_start_io_read()
61 down_write(&inode->i_rwsem); in ceph_start_io_read()
63 downgrade_write(&inode->i_rwsem); in ceph_start_io_read()
76 up_read(&inode->i_rwsem); in ceph_end_io_read()
89 down_write(&inode->i_rwsem); in ceph_start_io_write()
103 up_write(&inode->i_rwsem); in ceph_end_io_write()
109 lockdep_assert_held_write(&inode->i_rwsem); in ceph_block_buffered()
142 down_read(&inode->i_rwsem); in ceph_start_io_direct()
[all …]
/Linux-v5.4/fs/nfs/
Dio.c47 down_read(&inode->i_rwsem); in nfs_start_io_read()
50 up_read(&inode->i_rwsem); in nfs_start_io_read()
52 down_write(&inode->i_rwsem); in nfs_start_io_read()
54 downgrade_write(&inode->i_rwsem); in nfs_start_io_read()
67 up_read(&inode->i_rwsem); in nfs_end_io_read()
80 down_write(&inode->i_rwsem); in nfs_start_io_write()
94 up_write(&inode->i_rwsem); in nfs_end_io_write()
127 down_read(&inode->i_rwsem); in nfs_start_io_direct()
130 up_read(&inode->i_rwsem); in nfs_start_io_direct()
132 down_write(&inode->i_rwsem); in nfs_start_io_direct()
[all …]
/Linux-v5.4/Documentation/filesystems/
Ddirectory-locking.rst7 kinds of locks - per-inode (->i_rwsem) and per-filesystem
10 When taking the i_rwsem on multiple non-directory objects, we
58 All ->i_rwsem are taken exclusive. Again, we might get away with locking
94 Thus all processes are blocked on ->i_rwsem.
Dlocking.rst88 ops i_rwsem(inode)
113 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem
137 ops i_rwsem(inode)
268 ops PageLocked(page) i_rwsem
546 ->iterate() is called with i_rwsem exclusive.
548 ->iterate_shared() is called with i_rwsem at least shared.
Dpath-lookup.rst238 inode->i_rwsem
241 ``i_rwsem`` is a read/write semaphore that serializes all changes to a particular
248 This has a complementary role to that of ``d_lock``: ``i_rwsem`` on a
251 dcache hold ``i_rwsem`` on the relevant directory inode and briefly take
254 memory pressure. This uses ``d_lock``, but ``i_rwsem`` plays no role.
260 falls back to ``lookup_slow()`` which takes a shared lock on ``i_rwsem``, checks again that
266 sometimes need to take an exclusive lock on ``i_rwsem`` before performing the last lookup so
268 to take, or not take, ``i_rwsem`` is one of the
272 name that is not yet in the dcache - the shared lock on ``i_rwsem`` will
279 ``i_rwsem``, a thread must call ``d_alloc_parallel()``. This allocates a
[all …]
Dgfs2-glocks.txt103 1. i_rwsem (if required)
Dporting.rst669 ->i_mutex is replaced with ->i_rwsem now. inode_lock() et.al. work as
/Linux-v5.4/fs/xfs/
Dxfs_inode.c180 down_write_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock()
183 down_read_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock()
231 if (!down_write_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait()
234 if (!down_read_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait()
262 up_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait()
264 up_read(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait()
301 up_write(&VFS_I(ip)->i_rwsem); in xfs_iunlock()
303 up_read(&VFS_I(ip)->i_rwsem); in xfs_iunlock()
336 downgrade_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_demote()
362 lockdep_is_held_type(&VFS_I(ip)->i_rwsem, 0); in xfs_isilocked()
[all …]
Dxfs_icache.c455 ASSERT(!rwsem_is_locked(&inode->i_rwsem)); in xfs_iget_cache_hit()
456 init_rwsem(&inode->i_rwsem); in xfs_iget_cache_hit()
Dxfs_iops.c1290 lockdep_set_class(&inode->i_rwsem, in xfs_setup_inode()
Dxfs_super.c934 ASSERT(!rwsem_is_locked(&inode->i_rwsem)); in xfs_fs_destroy_inode()
/Linux-v5.4/fs/orangefs/
Dfile.c331 down_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter()
338 up_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter()
/Linux-v5.4/include/linux/
Dfs.h678 struct rw_semaphore i_rwsem; member
791 down_write(&inode->i_rwsem); in inode_lock()
796 up_write(&inode->i_rwsem); in inode_unlock()
801 down_read(&inode->i_rwsem); in inode_lock_shared()
806 up_read(&inode->i_rwsem); in inode_unlock_shared()
811 return down_write_trylock(&inode->i_rwsem); in inode_trylock()
816 return down_read_trylock(&inode->i_rwsem); in inode_trylock_shared()
821 return rwsem_is_locked(&inode->i_rwsem); in inode_is_locked()
826 down_write_nested(&inode->i_rwsem, subclass); in inode_lock_nested()
831 down_read_nested(&inode->i_rwsem, subclass); in inode_lock_shared_nested()
/Linux-v5.4/fs/
Dinode.c174 init_rwsem(&inode->i_rwsem); in inode_init_always()
175 lockdep_set_class(&inode->i_rwsem, &sb->s_type->i_mutex_key); in inode_init_always()
962 if (lockdep_match_class(&inode->i_rwsem, &type->i_mutex_key)) { in lockdep_annotate_inode_mutex_key()
967 init_rwsem(&inode->i_rwsem); in lockdep_annotate_inode_mutex_key()
968 lockdep_set_class(&inode->i_rwsem, in lockdep_annotate_inode_mutex_key()
Dreaddir.c55 res = down_read_killable(&inode->i_rwsem); in iterate_dir()
57 res = down_write_killable(&inode->i_rwsem); in iterate_dir()
Ddax.c1204 lockdep_assert_held_write(&inode->i_rwsem); in dax_iomap_rw()
1207 lockdep_assert_held(&inode->i_rwsem); in dax_iomap_rw()
Ddcache.c2963 m2 = &alias->d_parent->d_inode->i_rwsem; in __d_unalias()
/Linux-v5.4/fs/configfs/
Dinode.c145 lockdep_set_class(&inode->i_rwsem, in configfs_set_inode_lock_class()
/Linux-v5.4/fs/overlayfs/
Dinode.c540 lockdep_set_class(&inode->i_rwsem, &ovl_i_mutex_dir_key[depth]); in ovl_lockdep_annotate_inode_mutex_key()
542 lockdep_set_class(&inode->i_rwsem, &ovl_i_mutex_key[depth]); in ovl_lockdep_annotate_inode_mutex_key()
Dreaddir.c276 err = down_write_killable(&dir->d_inode->i_rwsem); in ovl_check_whiteouts()
/Linux-v5.4/fs/iomap/
Ddirect-io.c407 lockdep_assert_held(&inode->i_rwsem); in iomap_dio_rw()
/Linux-v5.4/fs/ocfs2/
Dinode.c247 lockdep_set_class(&inode->i_rwsem, in ocfs2_init_locked_inode()
/Linux-v5.4/fs/gfs2/
Dops_fstype.c820 lockdep_set_class(&sdp->sd_quota_inode->i_rwsem, in init_inodes()
/Linux-v5.4/fs/btrfs/
Ddelayed-inode.c1646 downgrade_write(&inode->i_rwsem); in btrfs_readdir_put_delayed_items()
Dioctl.c959 error = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_mksubvol()
2867 err = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_ioctl_snap_destroy()

12