Loading Documentation/filesystems/gfs2-glocks.txt +3 −2 Original line number Diff line number Diff line Loading @@ -100,14 +100,15 @@ indicates that it is caching uptodate data. Glock locking order within GFS2: 1. i_mutex (if required) 1. i_rwsem (if required) 2. Rename glock (for rename only) 3. Inode glock(s) (Parents before children, inodes at "same level" with same parent in lock number order) 4. Rgrp glock(s) (for (de)allocation operations) 5. Transaction glock (via gfs2_trans_begin) for non-read operations 6. Page lock (always last, very important!) 6. i_rw_mutex (if required) 7. Page lock (always last, very important!) There are two glocks per inode. One deals with access to the inode itself (locking order as above), and the other, known as the iopen Loading fs/gfs2/bmap.c +1 −1 Original line number Diff line number Diff line Loading @@ -1744,7 +1744,7 @@ static int do_grow(struct inode *inode, u64 size) * @newsize: the size to make the file * * The file size can grow, shrink, or stay the same size. This * is called holding i_mutex and an exclusive glock on the inode * is called holding i_rwsem and an exclusive glock on the inode * in question. * * Returns: errno Loading fs/gfs2/ops_fstype.c +1 −1 Original line number Diff line number Diff line Loading @@ -825,7 +825,7 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) goto fail_rindex; } /* * i_mutex on quota files is special. Since this inode is hidden system * i_rwsem on quota files is special. Since this inode is hidden system * file, we are safe to define locking ourselves. */ lockdep_set_class(&sdp->sd_quota_inode->i_rwsem, Loading Loading
Documentation/filesystems/gfs2-glocks.txt +3 −2 Original line number Diff line number Diff line Loading @@ -100,14 +100,15 @@ indicates that it is caching uptodate data. Glock locking order within GFS2: 1. i_mutex (if required) 1. i_rwsem (if required) 2. Rename glock (for rename only) 3. Inode glock(s) (Parents before children, inodes at "same level" with same parent in lock number order) 4. Rgrp glock(s) (for (de)allocation operations) 5. Transaction glock (via gfs2_trans_begin) for non-read operations 6. Page lock (always last, very important!) 6. i_rw_mutex (if required) 7. Page lock (always last, very important!) There are two glocks per inode. One deals with access to the inode itself (locking order as above), and the other, known as the iopen Loading
fs/gfs2/bmap.c +1 −1 Original line number Diff line number Diff line Loading @@ -1744,7 +1744,7 @@ static int do_grow(struct inode *inode, u64 size) * @newsize: the size to make the file * * The file size can grow, shrink, or stay the same size. This * is called holding i_mutex and an exclusive glock on the inode * is called holding i_rwsem and an exclusive glock on the inode * in question. * * Returns: errno Loading
fs/gfs2/ops_fstype.c +1 −1 Original line number Diff line number Diff line Loading @@ -825,7 +825,7 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) goto fail_rindex; } /* * i_mutex on quota files is special. Since this inode is hidden system * i_rwsem on quota files is special. Since this inode is hidden system * file, we are safe to define locking ourselves. */ lockdep_set_class(&sdp->sd_quota_inode->i_rwsem, Loading