diff options
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 5c95fa8ec11d..ff4e2a30227d 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -111,7 +111,7 @@ struct xfs_imap { | |||
111 | * Generally, we do not want to hold the i_rlock while holding the | 111 | * Generally, we do not want to hold the i_rlock while holding the |
112 | * i_ilock. Hierarchy is i_iolock followed by i_rlock. | 112 | * i_ilock. Hierarchy is i_iolock followed by i_rlock. |
113 | * | 113 | * |
114 | * xfs_iptr_t contains all the inode fields upto and including the | 114 | * xfs_iptr_t contains all the inode fields up to and including the |
115 | * i_mnext and i_mprev fields, it is used as a marker in the inode | 115 | * i_mnext and i_mprev fields, it is used as a marker in the inode |
116 | * chain off the mount structure by xfs_sync calls. | 116 | * chain off the mount structure by xfs_sync calls. |
117 | */ | 117 | */ |
@@ -336,7 +336,7 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) | |||
336 | 336 | ||
337 | /* | 337 | /* |
338 | * Project quota id helpers (previously projid was 16bit only | 338 | * Project quota id helpers (previously projid was 16bit only |
339 | * and using two 16bit values to hold new 32bit projid was choosen | 339 | * and using two 16bit values to hold new 32bit projid was chosen |
340 | * to retain compatibility with "old" filesystems). | 340 | * to retain compatibility with "old" filesystems). |
341 | */ | 341 | */ |
342 | static inline prid_t | 342 | static inline prid_t |
@@ -409,28 +409,35 @@ static inline void xfs_ifunlock(xfs_inode_t *ip) | |||
409 | /* | 409 | /* |
410 | * Flags for lockdep annotations. | 410 | * Flags for lockdep annotations. |
411 | * | 411 | * |
412 | * XFS_I[O]LOCK_PARENT - for operations that require locking two inodes | 412 | * XFS_LOCK_PARENT - for directory operations that require locking a |
413 | * (ie directory operations that require locking a directory inode and | 413 | * parent directory inode and a child entry inode. The parent gets locked |
414 | * an entry inode). The first inode gets locked with this flag so it | 414 | * with this flag so it gets a lockdep subclass of 1 and the child entry |
415 | * gets a lockdep subclass of 1 and the second lock will have a lockdep | 415 | * lock will have a lockdep subclass of 0. |
416 | * subclass of 0. | 416 | * |
417 | * XFS_LOCK_RTBITMAP/XFS_LOCK_RTSUM - the realtime device bitmap and summary | ||
418 | * inodes do not participate in the normal lock order, and thus have their | ||
419 | * own subclasses. | ||
417 | * | 420 | * |
418 | * XFS_LOCK_INUMORDER - for locking several inodes at the some time | 421 | * XFS_LOCK_INUMORDER - for locking several inodes at the some time |
419 | * with xfs_lock_inodes(). This flag is used as the starting subclass | 422 | * with xfs_lock_inodes(). This flag is used as the starting subclass |
420 | * and each subsequent lock acquired will increment the subclass by one. | 423 | * and each subsequent lock acquired will increment the subclass by one. |
421 | * So the first lock acquired will have a lockdep subclass of 2, the | 424 | * So the first lock acquired will have a lockdep subclass of 4, the |
422 | * second lock will have a lockdep subclass of 3, and so on. It is | 425 | * second lock will have a lockdep subclass of 5, and so on. It is |
423 | * the responsibility of the class builder to shift this to the correct | 426 | * the responsibility of the class builder to shift this to the correct |
424 | * portion of the lock_mode lockdep mask. | 427 | * portion of the lock_mode lockdep mask. |
425 | */ | 428 | */ |
426 | #define XFS_LOCK_PARENT 1 | 429 | #define XFS_LOCK_PARENT 1 |
427 | #define XFS_LOCK_INUMORDER 2 | 430 | #define XFS_LOCK_RTBITMAP 2 |
431 | #define XFS_LOCK_RTSUM 3 | ||
432 | #define XFS_LOCK_INUMORDER 4 | ||
428 | 433 | ||
429 | #define XFS_IOLOCK_SHIFT 16 | 434 | #define XFS_IOLOCK_SHIFT 16 |
430 | #define XFS_IOLOCK_PARENT (XFS_LOCK_PARENT << XFS_IOLOCK_SHIFT) | 435 | #define XFS_IOLOCK_PARENT (XFS_LOCK_PARENT << XFS_IOLOCK_SHIFT) |
431 | 436 | ||
432 | #define XFS_ILOCK_SHIFT 24 | 437 | #define XFS_ILOCK_SHIFT 24 |
433 | #define XFS_ILOCK_PARENT (XFS_LOCK_PARENT << XFS_ILOCK_SHIFT) | 438 | #define XFS_ILOCK_PARENT (XFS_LOCK_PARENT << XFS_ILOCK_SHIFT) |
439 | #define XFS_ILOCK_RTBITMAP (XFS_LOCK_RTBITMAP << XFS_ILOCK_SHIFT) | ||
440 | #define XFS_ILOCK_RTSUM (XFS_LOCK_RTSUM << XFS_ILOCK_SHIFT) | ||
434 | 441 | ||
435 | #define XFS_IOLOCK_DEP_MASK 0x00ff0000 | 442 | #define XFS_IOLOCK_DEP_MASK 0x00ff0000 |
436 | #define XFS_ILOCK_DEP_MASK 0xff000000 | 443 | #define XFS_ILOCK_DEP_MASK 0xff000000 |