Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp780850lqa; Sun, 28 Apr 2024 04:16:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRhFcEN9Yw37cAwQ4AbaZrQvIKKb9pGeYIF5pC6R7Uz3+g1GdbFTorK55YNQoLg8EDmKGCBAoNp0iRQMn4GUDiS3xUAZXSGiPDA4lULw== X-Google-Smtp-Source: AGHT+IHyPzRpRMcnUJ/xq3uKpino/gMAb53J3TsdUZLdiLREWb1QcS+rxpbhwXzEE7l968s8krSp X-Received: by 2002:a17:903:11ce:b0:1e3:f4f1:a2c4 with SMTP id q14-20020a17090311ce00b001e3f4f1a2c4mr8705883plh.64.1714302987155; Sun, 28 Apr 2024 04:16:27 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e18-20020a170902ef5200b001eb7766e66asi1728805plx.530.2024.04.28.04.16.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 04:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161394-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=quPq+IdU; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-161394-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161394-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B3BCDB211E9 for ; Sun, 28 Apr 2024 11:16:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6408156B6C; Sun, 28 Apr 2024 11:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="quPq+IdU" Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2070.outbound.protection.outlook.com [40.107.117.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D07343E493 for ; Sun, 28 Apr 2024 11:16:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.117.70 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714302967; cv=fail; b=X0Q8bxw9JsbhAnBLQ70hATHkekFG+oQyDwJPqS0ByOnEX3FT4BdqmMKe+XfdjscMs76BjmjkWdYsRcrE0O0mpZg3p9UP5YQC0xr/e8SrfZ+Bi6bUBMrerW+113mNHqxx+gx7AHWYk2a/C/sqK5lEueENDpM2YTUgN8ymXas2GJc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714302967; c=relaxed/simple; bh=wH0bRDwDJ6coVL4nvn2Q59MVkHR4ET4RW5IO2ztL1H4=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=MItAG7xxVWnEy6+6J0ZcXKf7TYX8AWcLiS33sFqlUCO9cx2Peo143iBLTWqzbDb58yyMyysHiWZEj4D1u7b5aWbkIlD+zaYThTQU7nrapLWqmxPcnrDtmuqrgvygI2jku7p3QMjqdGbKRISkBvXcdqgmBRBIqfLpdjBEViXeNdI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=quPq+IdU; arc=fail smtp.client-ip=40.107.117.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gJlmac62OM4+tx4yOtPIVhQbJirnw9Yi7PWP878Oi2MdaDUAKezw82tBqN1MtmcrLMEZotckRGHpi6fmz51238OvpKNNx2KCO95RLq7xOiKGj4vj6L1NXAykJ+LPDGCYtPCJLjq1tNMNj4MtKywpyT2I7RnHt+Z95DGhGFjAWf4DanHy+G2QdUm8iHTsLbgSK3IT0ugGEZXhrOpstkcfWR9u90rN2gx+FfsSgpOW4BedVtw/29yL6uZ/YB1D822wbJkY4zfEL2b5AS3Yyr8xpdD2yhyLRZg0XnpmTmeTr21ELP9SwE1cvmkGgy+pN8n9Kggz69ZuC5QSJXAHBIf3Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bMU87YWCmjz83FtStBkdo/ngsypV4KRejSdcm0EbsFM=; b=TfBevdCsSefnPlvucMKDWLEKcilnSRtDNylZP256PNuMhEfd+9uKUg/7ODNFamadTQwXg01AB96/zn9nLR8jTtU1ZR0wdAVFmu9/leGPMTsiOvXfZRLcl+a/9+353pQZojGvE98kOqkT6mXLc9jSXMr96k96yLtZzhTSqyYr91ErBtOKXYhqVXykQoVPMC9S7khCbCe3XaCye0DMV34O+V6EE1B2nwQwz3MhAuJlVgm761cFepJJVodgNFKaOK+xvpUqe8nJcmqa61k48VadQP+lVozTq2+6PHdsNvfTyuNgkab9xuz0/n+/hdyhqa266VmdJjGnmbWl2qCFuukG8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bMU87YWCmjz83FtStBkdo/ngsypV4KRejSdcm0EbsFM=; b=quPq+IdU+pGaxCVHsiPYNxnUcEmxhH3QUXXvKveEpGUcROgMtDZ0TK+eUh5U74Qn4YNql6Z3wiSUVTs2vAHJsgC+S7No7gI+o96tPTCI0doE7O9CIX13TEzkMwId8JqUKtbmdYEk/qTidzRVzbhKHZZ9U792ahBagGSG7IkIioggauu+aWRyJlYRI/cLR3YJV0SN259GjOJRCOGpwZRe/aeLPvHD7kAwve+f+pp9vglOzteEDdc5rDDdYxVhjFEbi12IekmvZOSWruPU2ic9/EkiHeAy81UaL/lSsNi1z3hd/SIPx82iIuJgvXRwd7oDPoPqdKZYyv8uJIMF9vH25A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5576.apcprd06.prod.outlook.com (2603:1096:101:c9::14) by SI2PR06MB5266.apcprd06.prod.outlook.com (2603:1096:4:1e5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.32; Sun, 28 Apr 2024 11:16:02 +0000 Received: from SEZPR06MB5576.apcprd06.prod.outlook.com ([fe80::5c0a:2748:6a72:99b6]) by SEZPR06MB5576.apcprd06.prod.outlook.com ([fe80::5c0a:2748:6a72:99b6%6]) with mapi id 15.20.7519.031; Sun, 28 Apr 2024 11:16:02 +0000 From: Liao Yuanhong To: Jaegeuk Kim , Chao Yu Cc: bo.wu@vivo.com, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Liao Yuanhong Subject: [PATCH] f2fs:remove the restriction on zone sector being align to pow2 Date: Sun, 28 Apr 2024 19:14:57 +0800 Message-Id: <20240428111457.17224-1-liaoyuanhong@vivo.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0040.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::9) To SEZPR06MB5576.apcprd06.prod.outlook.com (2603:1096:101:c9::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5576:EE_|SI2PR06MB5266:EE_ X-MS-Office365-Filtering-Correlation-Id: fb087850-05b7-4cba-14b6-08dc6774968e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|52116005|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8fVKQvTRiA9gaF5KTT7bQ9k15iCTnONoRDoX0jk4GwF6cHwFyOizjmE7EMGJ?= =?us-ascii?Q?KFcDOkSSkG55CU5Z2cWm1XQ9dVRFBN4Ts5VqpsGpw8p27M8NRaR8XTgT8qJm?= =?us-ascii?Q?j4svFLHUf0PmR7LFrC0kTJtpHM0cjw500Vr1p1ErgGsYgS2GT+o4MWvrW3zi?= =?us-ascii?Q?tIwyrCxhPBAblDkvyxGHG/NfkWEONbwArk4XEVG1LCr5dIrGzRu5u0abdfs8?= =?us-ascii?Q?DMg8rf/FzXYMKX3sL3Ptp1RMANWU6aKu+wtShpTpKVscX3y+oSnCnH8jF5ei?= =?us-ascii?Q?9fJFk/312GlDAZGdhybIhwKYOsqXh0t9QWZhPdKWRplSGVYHeW0ldcn+Av3o?= =?us-ascii?Q?LsldUejZ5B1Tlq/MIydpLcdJdOl5aSmZqvdqf80uWwhuW90g4WMMgtAxM0e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/k7sCajqNxplIEFAyA4T?= =?us-ascii?Q?fhOKOF99YLobu+UIGCiggvaudmWjsJObQKtI38iidYxCPQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5576.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(52116005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?paz1ZiQCAN00cKDjazTqNzSMBzItyK2r+ajRT0dMyKG4b3Q3ZTM405pjyD+p?= =?us-ascii?Q?fVXScpa5kE06qnTOP+ydhN/Z/VTo5dQz+/Y3k2WhyKQG7CzptcrPf/fQC1th?= =?us-ascii?Q?vwPHuMcmCURx7rt41rzdXUf7c9p9rRPAX2/zesceKGcCeLEIvimzQofWokqQ?= =?us-ascii?Q?s9pYi74JCf4U0kUFKRQSlAoQ7KadGXtgajQ2YU4lOzTIwNtcJD2085YQeVPJ?= =?us-ascii?Q?foxF9D6xeOy+5CJl2bcCxK2k/QmhSGcgqJrlABA9w+B6nERG/kAvaxpOZ8Lt?= =?us-ascii?Q?7RCJR42xbgMsaJrJpfxbYQjgyau8wv+Cdq8mdaiUB250xc3w/luBGKf0Bh0n?= =?us-ascii?Q?fIW7KMWiHDGZEWs6A6pAE/TI8b5Sob6p0k+H6mWNgq4k+GPF2IYF0WDI7Cu+?= =?us-ascii?Q?E1g7EwSh/DKwEaHrzKcISE4UyInu8wJHebopz0Et305lxkcdCCuWyJdiQRkm?= =?us-ascii?Q?x4YYIeH+xg9ZJ+uYv82cWXLEY0R/spe8AzuAufn5CVgw+JPs74J8KxVsbR/z?= =?us-ascii?Q?Au2wShX8OSiWgXCNWP/zRPFxPhrbi6Q+Dn4WpvlNvgIW5mOkCKxN7rMvoKbl?= =?us-ascii?Q?5olbpex19pf1Yamwoty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ascii?Q?Eya0oaZu7wtN8YEp7Z5/+AGdfSBj5yyUZnFXRhXJxsW73WR3XLKbRmMQcb2Z?= =?us-ascii?Q?pmFVTcfCdy0fC/Ctev6vxWVM0+Dm0hEcrJX/6ZcT?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb087850-05b7-4cba-14b6-08dc6774968e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5576.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2024 11:16:02.1670 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /1b2ZjBW5eIwkNhUuU/voE76WeTq40TILDvFLvYRsRLF6H2frXJogM3pcP5MpVWvRDJsEszcioKUezlbDt/+Yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5266 For zoned-UFS, sector size may not aligned to pow2, so we need to remove the pow2 limitation. Signed-off-by: Liao Yuanhong --- drivers/md/dm-table.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 41f1d731ae5a..823f2f6a2d53 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1663,10 +1663,6 @@ static int validate_hardware_zoned(struct dm_table *t, bool zoned, return -EINVAL; } - /* Check zone size validity and compatibility */ - if (!zone_sectors || !is_power_of_2(zone_sectors)) - return -EINVAL; - if (dm_table_any_dev_attr(t, device_not_matches_zone_sectors, &zone_sectors)) { DMERR("%s: zone sectors is not consistent across all zoned devices", dm_device_name(t->md)); -- 2.25.1