From 5e405595e5bf4c09fab9ca1e7dbe5b62872757b5 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 24 Aug 2017 16:42:48 -0700 Subject: ext4: perform dax_device lookup at mount The ->iomap_begin() operation is a hot path, so cache the fs_dax_get_by_host() result at mount time to avoid the incurring the hash lookup overhead on a per-i/o basis. Cc: "Theodore Ts'o" Cc: Andreas Dilger Reviewed-by: Jan Kara Reported-by: Christoph Hellwig Signed-off-by: Dan Williams --- fs/ext4/ext4.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/ext4/ext4.h') diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index a2bb7d2870e4..194e622dc3dd 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1528,6 +1528,7 @@ struct ext4_sb_info { /* Barrier between changing inodes' journal flags and writepages ops. */ struct percpu_rw_semaphore s_journal_flag_rwsem; + struct dax_device *s_daxdev; }; static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb) -- cgit v1.2.3