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>
此提交包含在:
Johannes Thumshirn
2020-07-21 21:10:26 +09:00
提交者 Damien Le Moal
父節點 00e4db5125
當前提交 e3c3155bc9
共有 2 個檔案被更改,包括 15 行新增4 行删除

查看文件

@@ -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