Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Aravind Ramesh <aravind.ramesh@wdc.com>
To: jaegeuk@kernel.org, yuchao0@huawei.com,
	linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, hch@lst.de
Cc: Damien.LeMoal@wdc.com, niklas.cassel@wdc.com,
	matias.bjorling@wdc.com, Aravind Ramesh <aravind.ramesh@wdc.com>
Subject: [PATCH 0/2] f2fs: zns zone-capacity support
Date: Thu,  2 Jul 2020 21:23:59 +0530	[thread overview]
Message-ID: <20200702155401.13322-1-aravind.ramesh@wdc.com> (raw)

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.

The first 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.

The second patch 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 series is based on the git tree
git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git branch dev
and requires the below patch in order to build.
https://lore.kernel.org/linux-nvme/20200701063720.GA28954@lst.de/T/#m19e0197ae1837b7fe959b13fbc2a859b1f2abc1e

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

Jaegeuk, perhaps you can carry this patch through your tree as well ?


Aravind Ramesh (2):
  f2fs: support zone capacity less than zone size
  f2fs: manage zone capacity during writes and gc

 fs/f2fs/f2fs.h    |   5 ++
 fs/f2fs/gc.c      |  27 +++++---
 fs/f2fs/gc.h      |  42 +++++++++++--
 fs/f2fs/segment.c | 154 ++++++++++++++++++++++++++++++++++++++++++----
 fs/f2fs/segment.h |  12 ++--
 fs/f2fs/super.c   |  41 ++++++++++--
 6 files changed, 247 insertions(+), 34 deletions(-)

-- 
2.19.1


             reply	other threads:[~2020-07-02 15:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 15:53 Aravind Ramesh [this message]
2020-07-02 15:54 ` [PATCH 1/2] f2fs: support zone capacity less than zone size Aravind Ramesh
2020-07-02 22:09   ` kernel test robot
2020-07-02 23:27   ` kernel test robot
2020-07-07  0:07   ` Jaegeuk Kim
2020-07-07  3:27     ` Aravind Ramesh
2020-07-07  3:49       ` Jaegeuk Kim
2020-07-07  5:18         ` Aravind Ramesh
2020-07-07 12:18   ` Chao Yu
2020-07-07 18:23     ` Aravind Ramesh
2020-07-08  2:33       ` Chao Yu
2020-07-08 13:04         ` Aravind Ramesh
2020-07-09  2:55           ` Chao Yu
2020-07-09  5:31             ` Aravind Ramesh
2020-07-09  7:05               ` Chao Yu
2020-07-09  7:11                 ` Aravind Ramesh
2020-07-10 17:44                   ` Aravind Ramesh
2020-07-02 15:54 ` [PATCH 2/2] f2fs: manage zone capacity during writes and gc Aravind Ramesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200702155401.13322-1-aravind.ramesh@wdc.com \
    --to=aravind.ramesh@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matias.bjorling@wdc.com \
    --cc=niklas.cassel@wdc.com \
    --cc=yuchao0@huawei.com \
    --subject='Re: [PATCH 0/2] f2fs: zns zone-capacity support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).