summaryrefslogtreecommitdiffstats
path: root/fs/zonefs/zonefs.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2020-07-21 14:10:26 +0200
committerDamien Le Moal <damien.lemoal@wdc.com>2020-08-11 10:42:24 +0200
commite3c3155bc95ab6a7b21ac40418bf80bedb204949 (patch)
tree6ff49ead35604c82a93c6f70210d3990f357da5d /fs/zonefs/zonefs.h
parentMerge tag 'perf-tools-2020-08-10' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadlinux-e3c3155bc95ab6a7b21ac40418bf80bedb204949.tar.xz
linux-e3c3155bc95ab6a7b21ac40418bf80bedb204949.zip
zonefs: add zone-capacity support
In the zoned storage model, the sectors within a zone are typically all writeable. With the introduction of the Zoned Namespace (ZNS) Command Set in the NVM Express organization, the model was extended to have a specific writeable capacity. This zone capacity can be less than the overall zone size for a NVMe ZNS device or null_blk in zoned-mode. For other ZBC/ZAC devices the zone capacity is always equal to the zone size. Use the zone capacity field instead from blk_zone for determining the maximum inode size and inode blocks in zonefs. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to '')
-rw-r--r--fs/zonefs/zonefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/zonefs/zonefs.h b/fs/zonefs/zonefs.h
index ad17fef7ce91..55b39970acb2 100644
--- a/fs/zonefs/zonefs.h
+++ b/fs/zonefs/zonefs.h
@@ -56,6 +56,9 @@ struct zonefs_inode_info {
/* File maximum size */
loff_t i_max_size;
+ /* File zone size */
+ loff_t i_zone_size;
+
/*
* To serialise fully against both syscall and mmap based IO and
* sequential file truncation, two locks are used. For serializing