From patchwork Mon Jan 29 07:52:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 193305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp417026dyb; Sun, 28 Jan 2024 23:54:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEO2VsIudDJFV1D7z1+8ELG8KFxPNL5jUtZPeptYe7XFuc4MjXkvu9xjbjT1+oitF1gj/Q3 X-Received: by 2002:a05:622a:30e:b0:42a:1e4c:7e21 with SMTP id q14-20020a05622a030e00b0042a1e4c7e21mr6859336qtw.50.1706514864159; Sun, 28 Jan 2024 23:54:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706514864; cv=pass; d=google.com; s=arc-20160816; b=doSDP/tqYx4EvPIws7zHE2569EB1gJ4oqFvpTM790T57bRhUns9akA8XM/sACkoBxS 8hccFUCUMUn5bLqiW/3G2tdoV/ft27Nt93l3eT70py6Af933b42v5NsYplJkMtytt0Ue yah33Jztt41acRoKsVX8Bl8td6iNrVS7epiDcugrJjk66GFF/IBDcwVYRvecnu/kBpcD AJACDt7er8H4Q/IBgJF8xEg6CiCkkj6meUnQ9fBdekKt5ir27b490o8yNNc3O8fKGii9 fQdEvbZL8Qc0ZRvvDVLc43xJz+90fX/Xm0c3D6nrv9IwqGKRPzdF93ktZsO1SFQS8DdI BnBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:wdcironportexception:ironport-sdr:ironport-sdr :dkim-signature; bh=fpd79ziWWnEkE4PQSjIRnLcjjQg7HoWMKhlTrkjmDK0=; fh=vtx/9SjU+G6yTbfUE/Jg3PhHwMv090uaPA+oNrmxeyw=; b=1EydBtn65K1cUnnOiB/kS2HuMuJgdiyFc41Mpu0q/z/sMxkO5q4lrsuj8bIYuPPygw n5QHC0agTgVKZlPY8faNzsgc03BAcxtCspDo0Z2QpcojOztFiCLc+MqUuB1b4bKmTtLH ha+5uLrY0J0UGyiZWgKhJkLuMJHfGhEEleHVe7rsu5HO8RvNlaBc+u1oZ/0r8+yJjpOL 85JoQIPO9st9IPCDj2kjzEU/WaVq8aynHmC7Jp/KB1Y4+HLw87yLf8OD7Ms1fgkmXkWA dhcqwEF75rEOJ5+lp5Rx5NNRPQyRXrjnNzzOkAcXElaS4VZqsO5oD+EeI5ftMcPVmb6Q dJ3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=b0kdW2sE; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel+bounces-42302-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42302-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t14-20020a05622a01ce00b0042a8615f726si6127839qtw.597.2024.01.28.23.54.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 23:54:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42302-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@wdc.com header.s=dkim.wdc.com header.b=b0kdW2sE; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel+bounces-42302-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42302-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EE9791C23683 for ; Mon, 29 Jan 2024 07:54:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B51754BEA; Mon, 29 Jan 2024 07:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="b0kdW2sE" Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (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 C949752F80; Mon, 29 Jan 2024 07:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.141.245 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706514757; cv=none; b=hD7tQ5YH7pFkUO+lQdNlVQJPDMWNPrKldnhjOCPczT+4wWOnxSpdVzFTMt4aM+Wd8TJv0ItDaRuIwZunLhK77ahkGxMN3sk0bYu8Y24rrS4Z2Q45YF++1k4KiAKrjlgHSpm2MJj7lpdZ/GJZnEp+XoDEssB3xSEwmguj4aDSzmc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706514757; c=relaxed/simple; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cQvk44QC1tEXNENt9JmSUaoE5bmPpF3WhkF49UHROPf9SvGoAkWgi2sSf/YYGdHMDT0xcsb33ZpWT3ALc98Aj3YZsFni9f/AcU4MKH4l+6ws4xZjLlizyt8jYdRvsfa8Di3govmuiwZey6V4Gt+j7xsULc6UxvnZyLNkYrstCOI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com; spf=pass smtp.mailfrom=wdc.com; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b=b0kdW2sE; arc=none smtp.client-ip=68.232.141.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1706514755; x=1738050755; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; b=b0kdW2sE4ONRfs8jGwY/v4nA1WUCksxaIE0iQy/LAjNIWbXBQBPxhSf7 iyMVK/Ayn7Z1K1Od9nac2bmF4TgczIKpyI3Ngpw3YFWHFZdb8tz3iZg4x Kik5mzwv711q6Do0soiCSMy+4dpNA6p6cdISQ05vq+xESEdDwHnpTZIsP K296N3XM8WytmOHF8q/ZeVQ9nRK8bffKMPVAixf0atxclhayucyHxzjme EkgPL2HexsGMHHJxF95YSwqIvaeIEt5Z5syfgrPKyMGsliBznIl7zo0ux oksxYJAzrVvDq8s5KJwB85ItIEcDMrpH4ypXqmNyF/smdKfFsoj27lWQg g==; X-CSE-ConnectionGUID: SX9cJwP2TQOalpS9SLaRMg== X-CSE-MsgGUID: m4iXc/eRRye5LfRgd4HTLA== X-IronPort-AV: E=Sophos;i="6.05,226,1701100800"; d="scan'208";a="8194611" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 29 Jan 2024 15:52:31 +0800 IronPort-SDR: cAR7V5dWRuCGGVUIC2Yz+9GQPP42jhwBXAf7VvylpX8W6shxDYvaEPOxq2giVJt+i7d8JMw3gv VZ6B58gXqE9g== Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 28 Jan 2024 22:56:46 -0800 IronPort-SDR: TgaA8LrWz4JmksfFMd9XbYuIoWjMlrDoGLua+Pb607OI4wE3Fe9/wAPKrNdtSrWLoefyzcMDAc YY+ofLHHgnnA== WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 28 Jan 2024 23:52:27 -0800 From: Johannes Thumshirn Date: Sun, 28 Jan 2024 23:52:16 -0800 Subject: [PATCH v3 1/5] zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240128-zonefs_nofs-v3-1-ae3b7c8def61@wdc.com> References: <20240128-zonefs_nofs-v3-0-ae3b7c8def61@wdc.com> In-Reply-To: <20240128-zonefs_nofs-v3-0-ae3b7c8def61@wdc.com> To: Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , dm-devel@lists.linux.dev, Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Johannes Thumshirn X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706514743; l=1041; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; b=t4wcaJhs6oV11H9tXDjzJ4heS84olNEuvuiMDoCT7kiC4VWqi/UCfvHK0WP330iTVs0p8G2QQ 0WRameby5F7DGgOvyyko8FG4gi9vkmFaf+HGZUlvOWp9nymIgGBuC/o X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789410530654295988 X-GMAIL-MSGID: 1789410530654295988 Pass GFP_KERNEL instead of GFP_NOFS to the blkdev_zone_mgmt() call in zonefs_zone_mgmt(). As as zonefs_zone_mgmt() and zonefs_inode_zone_mgmt() are never called from a place that can recurse back into the filesystem on memory reclaim, it is save to call blkdev_zone_mgmt() with GFP_KERNEL. Link: https://lore.kernel.org/all/ZZcgXI46AinlcBDP@casper.infradead.org/ Signed-off-by: Johannes Thumshirn Acked-by: Damien Le Moal --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 93971742613a..63fbac018c04 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -113,7 +113,7 @@ static int zonefs_zone_mgmt(struct super_block *sb, trace_zonefs_zone_mgmt(sb, z, op); ret = blkdev_zone_mgmt(sb->s_bdev, op, z->z_sector, - z->z_size >> SECTOR_SHIFT, GFP_NOFS); + z->z_size >> SECTOR_SHIFT, GFP_KERNEL); if (ret) { zonefs_err(sb, "Zone management operation %s at %llu failed %d\n",