From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69672C433E7 for ; Fri, 10 Jul 2020 17:44:23 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AAF92076A; Fri, 10 Jul 2020 17:44:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="iajkI60D"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="IwFeU1O8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="e2/pNTOR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AAF92076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jtx4Q-0007EN-5x; Fri, 10 Jul 2020 17:44:22 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtx4O-0007EB-1J for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Jul 2020 17:44:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5hTOH+QmCfnrhK/mqhbRpJ/RxnCtKUGZ8yaUDNcaGs4=; b=iajkI60D3HqjSnnnl3nuyz99q7 o69YWHl5SbHPI/xIneD4hmcgMTSXTvcxMxBIwPA5bT+i0jl0tlkx0GdBXI/lI5XSOgzsrrV70P3Hy b7pKs58W12mbjt4EkjUQmO+v2HKftsPTHRT3ZizPVwLlNpgTQjaci6VmTwd7NFD60J9o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=5hTOH+QmCfnrhK/mqhbRpJ/RxnCtKUGZ8yaUDNcaGs4=; b=I wFeU1O821UipC5rd25pjy/QoG3I3Ll+HO3EZlD6r3EB5ilEttAdWu5SpFds44Rhly9/eyTJOLTUgN O5Tz0NYTZ9l3o82UTOiocXg6lVqwzLvQiPK1kJxZE08AYhEB1W0unWpQv3VWhasuhVo8J1rxqEdSS HfSJ2dE2VfDA/R5Q=; Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jtx4M-00GN8a-BI for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Jul 2020 17:44:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1594403058; x=1625939058; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cbc3oM6oIgo9G4kTaaD0VNdPm5ejczfoBNVZTRiYqc0=; b=e2/pNTORW11e2BQwpyonY6HdodsZ0U9ZRax9aM5wJLowTJRtAufFtOTY f4Hlyi5/KcY/N7iSDXvowD8Jdb0Eo1rZpdfUiITnP7mQL/SyLIzdu/2jl yux02Sj54LEVfIyoPZl+EmDRwH2/o8o3wio06qVyMnXJGu0arhVALTLIi X4chs0/xklAVtRUCzOPqkZimt4/Fo3nBizbPQNMJn4YSWmkOcwPPDySu6 gHh2uLs6oBJy42lYnnP3pYiW6HMHY3KxwLtjcM0rIJUqDq3Td9EAzmpV2 wWteGG9FXBmET2HH39JFhNQ0rRHKQMv9KHwAt8HZnYwHPMgC6nfS2STNy w==; IronPort-SDR: dWmkSREDPf78O1+Q5tcWSnAnusw6DJ5711CPi2S4whXhcRqkNnnVwEsSGkOVh6pRiGOaFfs0DA hX2vszUIC8DN4bdOB3rKKmvrdqXbsKXDSX+naxJLICjqVCsSHqV3BmEXwY4Zf7UEhzwbV+rpW6 lYO7wIPZOeBDhQ09Y2YUkfPKulAwsp/iJaZ0sD5ew/xlS4wFD9NazBbMSMDIYM5eZ53rQz/cyJ WhulbuvIZEkj5NLbyDdhPxYwIHP98YcD2W2jeXqHV4iVKeUDWkzQShLOQStlNjR9ompUbQPZBH F6g= X-IronPort-AV: E=Sophos;i="5.75,336,1589212800"; d="scan'208";a="142313669" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2020 01:44:01 +0800 IronPort-SDR: l8fOQJwrvVTk8/xC+39M2jSLo201kQQGGngGO2ToOy1YTFqpEhX0n2Ju2hFEpt93B8a0wYWHGZ YgxieNRk/KgwFqGiNDrkHVVlNhqoiOCa8= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2020 10:32:35 -0700 IronPort-SDR: blztnjK4Hr8mDDnOtUyUAVCX9Zd4cdtNa2WcuJVOvCmTXnXU9rOLJV21Gxa2bdRBhvM2Go+ebd hSRVNrEM6l3w== WDCIronportException: Internal Received: from aravind-workstation.hgst.com (HELO localhost.localdomain) ([10.64.18.44]) by uls-op-cesaip02.wdc.com with ESMTP; 10 Jul 2020 10:43:58 -0700 From: Aravind Ramesh To: jaegeuk@kernel.org, yuchao0@huawei.com, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, hch@lst.de Date: Fri, 10 Jul 2020 23:13:52 +0530 Message-Id: <20200710174353.21988-1-aravind.ramesh@wdc.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Headers-End: 1jtx4M-00GN8a-BI Subject: [f2fs-dev] [PATCH v2 0/1] f2fs: zns zone-capacity support X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: niklas.cassel@wdc.com, Damien.LeMoal@wdc.com, Aravind Ramesh , matias.bjorling@wdc.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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://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 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(-) -- 2.19.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel