aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2010-01-21 13:00:02 -0500
committerBoaz Harrosh <bharrosh@panasas.com>2010-02-28 06:35:25 -0500
commit518f167a37b3c53f3cf44d27800455ca24e920f6 (patch)
tree9ba5e73f6e7b7107a1b151503eecd8d5cc09e687 /fs/exofs
parent34ce4e7c23e3da578e459b05c6fb17edecb19e6b (diff)
exofs: Micro-optimize exofs_i_info
optimize the exofs_i_info struct usage by moving the embedded vfs_inode to be first. A compiler might optimize away an "add" operation with constant zero. (Which it cannot with other constants) Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r--fs/exofs/exofs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index c35fd4623986..13663da2b119 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -78,13 +78,13 @@ struct exofs_sb_info {
78 * our extension to the in-memory inode 78 * our extension to the in-memory inode
79 */ 79 */
80struct exofs_i_info { 80struct exofs_i_info {
81 struct inode vfs_inode; /* normal in-memory inode */
82 wait_queue_head_t i_wq; /* wait queue for inode */
81 unsigned long i_flags; /* various atomic flags */ 83 unsigned long i_flags; /* various atomic flags */
82 uint32_t i_data[EXOFS_IDATA];/*short symlink names and device #s*/ 84 uint32_t i_data[EXOFS_IDATA];/*short symlink names and device #s*/
83 uint32_t i_dir_start_lookup; /* which page to start lookup */ 85 uint32_t i_dir_start_lookup; /* which page to start lookup */
84 wait_queue_head_t i_wq; /* wait queue for inode */
85 uint64_t i_commit_size; /* the object's written length */ 86 uint64_t i_commit_size; /* the object's written length */
86 uint8_t i_cred[OSD_CAP_LEN];/* all-powerful credential */ 87 uint8_t i_cred[OSD_CAP_LEN];/* all-powerful credential */
87 struct inode vfs_inode; /* normal in-memory inode */
88}; 88};
89 89
90static inline osd_id exofs_oi_objno(struct exofs_i_info *oi) 90static inline osd_id exofs_oi_objno(struct exofs_i_info *oi)