Commit 518f167a37b3c53f3cf44d27800455ca24e920f6
1 parent
34ce4e7c23
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
fs/exofs/exofs.h
... | ... | @@ -78,13 +78,13 @@ |
78 | 78 | * our extension to the in-memory inode |
79 | 79 | */ |
80 | 80 | struct exofs_i_info { |
81 | + struct inode vfs_inode; /* normal in-memory inode */ | |
82 | + wait_queue_head_t i_wq; /* wait queue for inode */ | |
81 | 83 | unsigned long i_flags; /* various atomic flags */ |
82 | 84 | uint32_t i_data[EXOFS_IDATA];/*short symlink names and device #s*/ |
83 | 85 | uint32_t i_dir_start_lookup; /* which page to start lookup */ |
84 | - wait_queue_head_t i_wq; /* wait queue for inode */ | |
85 | 86 | uint64_t i_commit_size; /* the object's written length */ |
86 | 87 | uint8_t i_cred[OSD_CAP_LEN];/* all-powerful credential */ |
87 | - struct inode vfs_inode; /* normal in-memory inode */ | |
88 | 88 | }; |
89 | 89 | |
90 | 90 | static inline osd_id exofs_oi_objno(struct exofs_i_info *oi) |