History

fs: Lift XFS_IDONTCACHE to the VFS layer

DAX effective mode (S_DAX) changes requires inode eviction. XFS has an advisory flag (XFS_IDONTCACHE) to prevent caching of the inode if no other additional references are taken. We lift this flag to the VFS layer and change the behavior slightly by allowing the flag to remain even if multiple references are taken. This will expedite the eviction of inodes to change S_DAX.

Ira Weiny committed 6 years ago

Commit dae2f8e1 parent 83d90884 files · +9 −6Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/fs.h+5−1
@@ -2156,6 +2156,8 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, · 2155 unmodified lines
2156 *2156 *
2157 * I_CREATING New object's inode in the middle of setting up.2157 * I_CREATING New object's inode in the middle of setting up.
2158 *2158 *
2159 * I_DONTCACHE Evict inode as soon as it is not used anymore.
2160 *
2159 * Q: What is the difference between I_WILL_FREE and I_FREEING?2161 * Q: What is the difference between I_WILL_FREE and I_FREEING?
2160 */2162 */
2161#define I_DIRTY_SYNC (1 << 0)2163#define I_DIRTY_SYNC (1 << 0)
@@ -2178,6 +2180,7 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src, · 16 unmodified lines
2178#define I_WB_SWITCH (1 << 13)2180#define I_WB_SWITCH (1 << 13)
2179#define I_OVL_INUSE (1 << 14)2181#define I_OVL_INUSE (1 << 14)
2180#define I_CREATING (1 << 15)2182#define I_CREATING (1 << 15)
2183#define I_DONTCACHE (1 << 16)
2181 2184
2182#define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC)2185#define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC)
2183#define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES)2186#define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES)
@@ -3049,7 +3052,8 @@ extern int inode_needs_sync(struct inode *inode); · 865 unmodified lines
3049extern int generic_delete_inode(struct inode *inode);3052extern int generic_delete_inode(struct inode *inode);
3050static inline int generic_drop_inode(struct inode *inode)3053static inline int generic_drop_inode(struct inode *inode)
3051{3054{
3052 return !inode->i_nlink || inode_unhashed(inode);3055 return !inode->i_nlink || inode_unhashed(inode) ||
3056 (inode->i_state & I_DONTCACHE);
3053}3057}
3054 3058
3055extern struct inode *ilookup5_nowait(struct super_block *sb,3059extern struct inode *ilookup5_nowait(struct super_block *sb,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t