Linux-Fsdevel Archive on
help / color / mirror / Atom feed
* [PATCH v2 0/1]  f2fs: zns zone-capacity support
@ 2020-07-10 17:43 Aravind Ramesh
  2020-07-10 17:43 ` [PATCH v2 1/1] f2fs: support zone capacity less than zone size Aravind Ramesh
  0 siblings, 1 reply; 6+ messages in thread
From: Aravind Ramesh @ 2020-07-10 17:43 UTC (permalink / raw)
  To: jaegeuk, yuchao0, linux-fsdevel, linux-f2fs-devel, hch
  Cc: Damien.LeMoal, niklas.cassel, matias.bjorling, Aravind Ramesh

NVM Express Zoned Namespace command set specification allows host software
to communicate with a NVM subsystem using zones. ZNS defines a host-managed
zoned block device model for NVMe devices. It divides the logical address
space of a namespace into zones. Each zone provides a LBA range that
shall be written sequentially. An explicit reset of zone is needed to write to
the zone again.

ZNS defines a per-zone capacity which can be equal or less than the
zone-size. Zone-capacity is the number of usable blocks in the zone.
This patchset implements support for ZNS devices with a zone-capacity
that is less that the device zone-size.

This patch checks if zone-capacity is less than zone-size, if it is,
then any segment which starts after the zone-capacity is marked as
not-free in the free segment bitmap at initial mount time. These segments
are marked as permanently used so they are not allocated for writes and
consequently not needed to be garbage collected. In case the zone-capacity
is not aligned to default segment size(2MB), then a segment can start
before the zone-capacity and span across zone-capacity boundary.
Such spanning segments are also considered as usable segments. It tracks
the usable blocks in a spanning segment, so that during writes and GC,
usable blocks in spanning segment is calculated to ensure writes/reads
do not cross the zone-capacity boundary.

This patch is based on the git tree
git:// branch dev
and requires the below patch in order to build.

The above patch has been merged to the nvme-5.9 branch in the git tree:

Aravind Ramesh (1):
  f2fs: support zone capacity less than zone size

 Documentation/filesystems/f2fs.rst |  15 +++
 fs/f2fs/f2fs.h                     |   5 +
 fs/f2fs/gc.c                       |  27 +++--
 fs/f2fs/gc.h                       |  42 +++++++-
 fs/f2fs/segment.c                  | 154 ++++++++++++++++++++++++++---
 fs/f2fs/segment.h                  |  21 ++--
 fs/f2fs/super.c                    |  41 ++++++--
 7 files changed, 267 insertions(+), 38 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-16 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 17:43 [PATCH v2 0/1] f2fs: zns zone-capacity support Aravind Ramesh
2020-07-10 17:43 ` [PATCH v2 1/1] f2fs: support zone capacity less than zone size Aravind Ramesh
2020-07-14 11:57   ` Chao Yu
2020-07-14 18:40     ` Aravind Ramesh
2020-07-15  2:02       ` Chao Yu
2020-07-16 12:56         ` Aravind Ramesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).