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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2761FC433EF for ; Wed, 27 Apr 2022 23:39:49 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1njrG7-0002WB-DY; Wed, 27 Apr 2022 23:39:46 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1njrG6-0002W5-8y for linux-f2fs-devel@lists.sourceforge.net; Wed, 27 Apr 2022 23:39:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1AB1XQxDQK3ZvB6f0g1bRoPnbSC4y/Y6L7PxXS2Kx3I=; b=bYcoM2/G1/LFNT5YIjQBMDpWwx wpnSs7xL1wGjQwmqn+vJ8Egj3BMoIzTGqHq0udNy8+AQ+uz4EsgulDuu14pPKh/ma3rTL2arfeNPq mbarWMU0/cVcfxK8Rzhyytr+k1ipwkFjUPw4FE/Ki6ohrauX1F++nqNN+c5XbmJs5PuY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1AB1XQxDQK3ZvB6f0g1bRoPnbSC4y/Y6L7PxXS2Kx3I=; b=T3dOrSyw2oSpvE2TfbHwU07o2U X0xb8DR3d4N6ygfr1UVNFMwFh4wUhvg69DM7FgIrK+YDzCgRLO6+t+tq1c2H+vTGOGaVk7NQxznOn mcyRmgK26EsbU6NWXPEcmheMo/zb0XibZ8bY8KZUDlqQXywZMnB20MckcWROK9F5V9t4=; Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1njrG1-0000EF-2h for linux-f2fs-devel@lists.sourceforge.net; Wed, 27 Apr 2022 23:39:44 +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=1651102780; x=1682638780; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=MKuYv4XGK8HdnYkTj9llLnq6WFfSVxaVrJlMmCv+wiQ=; b=JVR+1XVgJY/HIps56Ys89ckMb3SHSdCTQ5eqQhRMugnyuuYoezN7ra2G JKV91ikxLDWA2XLcCKLq7XPYE2Qu2mk8A2QaM7csAdHuQJNC7EHlB3tiJ 9KvmncedjmgqbqL7Xur85rpwW91uA4M8egLl+DD2foQgvdHS1RYs8xCl1 WDNH404DZCxEYcOC3Bzx7AmdBT4muOTQoCeVtgFZeidKM90Vhgvjt+FvB MmweKywd5BdhAMIiuPi8dMQPt6PlFLNBkM35zdpzvTi3ZF+CJ96MwYZsO WEOQop/yr0Q3DG3+KYKNKfA+dq8PH+jGZNnQxt4ex+Rxlq3WZ6Lum5JZ4 w==; X-IronPort-AV: E=Sophos;i="5.90,294,1643644800"; d="scan'208";a="303212735" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Apr 2022 07:39:32 +0800 IronPort-SDR: l1TiWVJsEhO2ucTzTgL6NlC/oC/LNPxZTJb27G7Gq7KpyYLGY9OlxdCTPSbSy7RdrsakhvVswU BlFzKi91S7D5RaaDMUpRmUQlpeuO2AelbXA2z11aj03GdpWFjPx6sabU8oiMRYFgWG3rnyRzlu 8dk+6n/VVY+OV5wYxwMd0hbvIVt9mbYqBqIrcLlEmwF6kkmTvFeKImeM+X7P6WMApGHtWrLrod XhI3R8FQmk5qc3iRJ8V4xBNUMzB+KLIk7N4huPfhTWIRD9fJIEOtif1Gu0P+DL0rN6Pjx4884e XsRfeVdye2meAXgIgfQ9v5jH Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Apr 2022 16:09:42 -0700 IronPort-SDR: ncSJDo2T+/ZA/8XbiSDr47amwgtj2QMRfC6m1UL4AA7QLQDBVZDj0cxNhFgKDfH2PSjGiF2eEv oUtqkbZ3ppLpmTwQ5noOsBMhjxhWK8w88fMJDJSWKsZG0E/y5sCYePiUvAvCzUAn8CbDoOCU+1 s+bclg6a+OhYCoo/sFs9ys3t54HLPCvQG88RO3D4S9jVGpmccK7ybAnU8CdnKkQ3btlmir2cGX 9dBeLaUwwrl2xvwnaPKH1LdS1WEtDo/EzPVMgkAjLmxjYv9+SjoigUQsHvLrF1hoG98twEOylj UG4= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Apr 2022 16:39:33 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4KpZwN11brz1SVp7 for ; Wed, 27 Apr 2022 16:39:32 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1651102770; x=1653694771; bh=MKuYv4XGK8HdnYkTj9llLnq6WFfSVxaVrJl MmCv+wiQ=; b=F5aK313D/33i58L2HhyWZlmIYLxYFRau6pifLJL1hYJrhXiCZ8a QUlDThdd2S3jmMYxAnQGrk3uOInkmqWWXkmRW3ymLN1LfKOS5+bY79RzMlQL1w3p byr+W7KlfQmvdAdTOFjqy4Bvd6pxExnVEQWWyxoWm8P74hjVHX/Vm9LlwbazeVIZ wJ7tVTr0brCKfrteamJp89kRredPxEKv83eWrlHtbe+v5l92MU36wBYsIEFDv/Kv dXViO7aRNsJw2ghY9ipJqj+m8Fo9xYv4zTR8q40gyecTBz59xhum1EvNku7fAoNM dMuWLLgJcGyyRSZREN2s2w7PK2MFxbc5f1g== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oK4MF_FCCw7A for ; Wed, 27 Apr 2022 16:39:30 -0700 (PDT) Received: from [10.225.163.27] (unknown [10.225.163.27]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4KpZwF5hMDz1Rvlc; Wed, 27 Apr 2022 16:39:25 -0700 (PDT) Message-ID: Date: Thu, 28 Apr 2022 08:39:24 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Content-Language: en-US To: Pankaj Raghav , jaegeuk@kernel.org, axboe@kernel.dk, snitzer@kernel.org, hch@lst.de, mcgrof@kernel.org, naohiro.aota@wdc.com, sagi@grimberg.me, dsterba@suse.com, johannes.thumshirn@wdc.com References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-13-p.raghav@samsung.com> Organization: Western Digital Research In-Reply-To: <20220427160255.300418-13-p.raghav@samsung.com> X-Headers-End: 1njrG1-0000EF-2h Subject: Re: [f2fs-dev] [PATCH 12/16] zonefs: allow non power of 2 zoned devices 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: , From: Damien Le Moal via Linux-f2fs-devel Reply-To: Damien Le Moal Cc: jiangbo.365@bytedance.com, kch@nvidia.com, bvanassche@acm.org, matias.bjorling@wdc.com, gost.dev@samsung.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, clm@fb.com, dm-devel@redhat.com, agk@redhat.com, jonathan.derrick@linux.dev, kbusch@kernel.org, linux-fsdevel@vger.kernel.org, josef@toxicpanda.com, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 4/28/22 01:02, Pankaj Raghav wrote: > The zone size shift variable is useful only if the zone sizes are known > to be power of 2. Remove that variable and use generic helpers from > block layer to calculate zone index in zonefs Period missing at the end of the sentence. What about zonefs-tools and its test suite ? Is everything still OK on that front ? I suspect not... > > Reviewed-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > fs/zonefs/super.c | 6 ++---- > fs/zonefs/zonefs.h | 1 - > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c > index 3614c7834007..5422be2ca570 100644 > --- a/fs/zonefs/super.c > +++ b/fs/zonefs/super.c > @@ -401,10 +401,9 @@ static void __zonefs_io_error(struct inode *inode, bool write) > { > struct zonefs_inode_info *zi = ZONEFS_I(inode); > struct super_block *sb = inode->i_sb; > - struct zonefs_sb_info *sbi = ZONEFS_SB(sb); > unsigned int noio_flag; > unsigned int nr_zones = > - zi->i_zone_size >> (sbi->s_zone_sectors_shift + SECTOR_SHIFT); > + bdev_zone_no(sb->s_bdev, zi->i_zone_size >> SECTOR_SHIFT); > struct zonefs_ioerr_data err = { > .inode = inode, > .write = write, > @@ -1300,7 +1299,7 @@ static void zonefs_init_file_inode(struct inode *inode, struct blk_zone *zone, > struct zonefs_sb_info *sbi = ZONEFS_SB(sb); > struct zonefs_inode_info *zi = ZONEFS_I(inode); > > - inode->i_ino = zone->start >> sbi->s_zone_sectors_shift; > + inode->i_ino = bdev_zone_no(sb->s_bdev, zone->start); > inode->i_mode = S_IFREG | sbi->s_perm; > > zi->i_ztype = type; > @@ -1647,7 +1646,6 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent) > * interface constraints. > */ > sb_set_blocksize(sb, bdev_zone_write_granularity(sb->s_bdev)); > - sbi->s_zone_sectors_shift = ilog2(bdev_zone_sectors(sb->s_bdev)); > sbi->s_uid = GLOBAL_ROOT_UID; > sbi->s_gid = GLOBAL_ROOT_GID; > sbi->s_perm = 0640; > diff --git a/fs/zonefs/zonefs.h b/fs/zonefs/zonefs.h > index 7b147907c328..2d5ea3be3a8e 100644 > --- a/fs/zonefs/zonefs.h > +++ b/fs/zonefs/zonefs.h > @@ -175,7 +175,6 @@ struct zonefs_sb_info { > kgid_t s_gid; > umode_t s_perm; > uuid_t s_uuid; > - unsigned int s_zone_sectors_shift; > > unsigned int s_nr_files[ZONEFS_ZTYPE_MAX]; > -- Damien Le Moal Western Digital Research _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel