Lines Matching refs:inode

21 /* Call with exclusively locked inode->i_rwsem */
22 static void ceph_block_o_direct(struct ceph_inode_info *ci, struct inode *inode)
24 lockdep_assert_held_write(&inode->i_rwsem);
30 inode_dio_wait(inode);
36 * @inode: file inode
41 * and holds a shared lock on inode->i_rwsem to ensure that the flag
48 * inode->i_rwsem, meaning that those are serialised w.r.t. the reads.
51 ceph_start_io_read(struct inode *inode)
53 struct ceph_inode_info *ci = ceph_inode(inode);
56 down_read(&inode->i_rwsem);
59 up_read(&inode->i_rwsem);
61 down_write(&inode->i_rwsem);
62 ceph_block_o_direct(ci, inode);
63 downgrade_write(&inode->i_rwsem);
68 * @inode: file inode
71 * lock on inode->i_rwsem.
74 ceph_end_io_read(struct inode *inode)
76 up_read(&inode->i_rwsem);
81 * @inode: file inode
87 ceph_start_io_write(struct inode *inode)
89 down_write(&inode->i_rwsem);
90 ceph_block_o_direct(ceph_inode(inode), inode);
95 * @inode: file inode
98 * lock on inode->i_rwsem.
101 ceph_end_io_write(struct inode *inode)
103 up_write(&inode->i_rwsem);
106 /* Call with exclusively locked inode->i_rwsem */
107 static void ceph_block_buffered(struct ceph_inode_info *ci, struct inode *inode)
109 lockdep_assert_held_write(&inode->i_rwsem);
116 filemap_write_and_wait(inode->i_mapping);
122 * @inode: file inode
127 * and holds a shared lock on inode->i_rwsem to ensure that the flag
134 * inode->i_rwsem, meaning that those are serialised w.r.t. O_DIRECT.
137 ceph_start_io_direct(struct inode *inode)
139 struct ceph_inode_info *ci = ceph_inode(inode);
142 down_read(&inode->i_rwsem);
145 up_read(&inode->i_rwsem);
147 down_write(&inode->i_rwsem);
148 ceph_block_buffered(ci, inode);
149 downgrade_write(&inode->i_rwsem);
154 * @inode: file inode
157 * lock on inode->i_rwsem.
160 ceph_end_io_direct(struct inode *inode)
162 up_read(&inode->i_rwsem);