summaryrefslogtreecommitdiffstats
path: root/fs/zonefs/zonefs.h
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-01-04 09:20:55 +0100
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-01-23 01:25:51 +0100
commit43592c46375a056b411b065acf2d37fc1e3ab251 (patch)
treef331151261d2f067a6fb51e980bead844a8b545e /fs/zonefs/zonefs.h
parentzonefs: Dynamically create file inodes when needed (diff)
downloadlinux-43592c46375a056b411b065acf2d37fc1e3ab251.tar.xz
linux-43592c46375a056b411b065acf2d37fc1e3ab251.zip
zonefs: Cache zone group directory inodes
Since looking up any zone file inode requires looking up first the inode for the directory representing the zone group of the file, ensuring that the zone group inodes are always cached is desired. To do so, take an extra reference on the zone groups directory inodes on mount, thus avoiding the eviction of these inodes from the inode cache until the volume is unmounted. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Diffstat (limited to 'fs/zonefs/zonefs.h')
-rw-r--r--fs/zonefs/zonefs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/zonefs/zonefs.h b/fs/zonefs/zonefs.h
index f88466a4158b..8175652241b5 100644
--- a/fs/zonefs/zonefs.h
+++ b/fs/zonefs/zonefs.h
@@ -76,6 +76,7 @@ struct zonefs_zone {
* as files, one file per zone.
*/
struct zonefs_zone_group {
+ struct inode *g_inode;
unsigned int g_nr_zones;
struct zonefs_zone *g_zones;
};