From patchwork Thu Jan 25 16:53:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13531424 X-Patchwork-Delegate: snitzer@redhat.com Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) (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 7540413DB9B for ; Thu, 25 Jan 2024 16:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.71.154.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706201628; cv=none; b=ug+wtDo/CnhKwaNrhBuGmyKG7SxRW4jV6QTEJORjAsthfPV7eRQo7v/+VyfUqI4//tpZC06RvMJ+rlzKcoHaxyGSGCoKOC433TQdn9QgrAb4UetbZj+l5kfAxYaYxgjSdKQ2A6ppMo9CzDoLWaSxPN4buh6iwHABnVaBlQf35is= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706201628; c=relaxed/simple; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rTSl2+Glvc919VSmz2B5pnewybLJ8Ng0YMkGAYZ9Jw2Qet6DnsMLf9LA6EEa61psnNPPKFTIKGh0BwOaxb8xsx5sUihGZr/xTprkXpyE9v+ybuWudQWfJhXGJr6BUZR5PeO8t4Qtfo2lnE4qZ+ELjJDfoKozw0gXey3VkLG3H9Q= 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=LlqRas+u; arc=none smtp.client-ip=216.71.154.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="LlqRas+u" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1706201627; x=1737737627; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; b=LlqRas+ugzftRd8iMpoKGwUulBpND+QkJPOe5S/Xo+y5w4PcXehcL6lg DRJ6h1Xxu1SBOpvlZnW/534bGMDuJo+b5Ng/C63A7lkzJuhF3Dr1brzDY oQW6P8p1miIE8/rF6p580m4wuoIIGvAuVQh0HFeI9r8zfCKxk20ouUVdb nvSps3qampcAQL5eOP+NNmETOa7YA7nt/MtZ1Jlr+RhgidSOpEAhcty0j DsxhbXHFAoDfsCmv8hSHANQL58QPATU9IrEoJUVB9rrvIQF3hqHDLobGB KmNGKRJrdzGxK4GqQKj+XBGFsmWBv7xFvTNF0I8cxmWFY8k5I4nHFxv+y A==; X-CSE-ConnectionGUID: q5lYG/QeQXu+tHYtrUf2og== X-CSE-MsgGUID: FeOvoxtcQwSRfkf9RpL5vA== X-IronPort-AV: E=Sophos;i="6.05,216,1701100800"; d="scan'208";a="7456548" 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; 26 Jan 2024 00:53:39 +0800 IronPort-SDR: hH5oHdZjlQUNMcN4jadiJ5wTWfIfkdTlFWnnV8LuGR/H8UaLUbN2AGmVQF7OJIJiAr4rVe+yfS 0V4+o7F4JyhQ== 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; 25 Jan 2024 07:57:58 -0800 IronPort-SDR: VOx0UIr5lbldPsjxQBhoPSsQoOEZNWGs3Yn004iQ+BbMXVrE9gDtrUz+juD/7EPs5IyZ7d6MAQ oXv5yVO5EAbg== WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip01.wdc.com with ESMTP; 25 Jan 2024 08:53:33 -0800 From: Johannes Thumshirn Date: Thu, 25 Jan 2024 08:53:24 -0800 Subject: [PATCH v2 1/5] zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240125-zonefs_nofs-v2-1-2d975c8c1690@wdc.com> References: <20240125-zonefs_nofs-v2-0-2d975c8c1690@wdc.com> In-Reply-To: <20240125-zonefs_nofs-v2-0-2d975c8c1690@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=1706201608; l=1041; i=johannes.thumshirn@wdc.com; s=20230613; h=from:subject:message-id; bh=eGx4McY1FmrYKhrAp3TTxFkfkbSfbNbdZDzzsYbn3SA=; b=7i7rSG5FOL3Y+GFA5rvmzOGA1LPZcNa6uQEcp9OZuAhx8o+EuzcMQlp/v7AQwfxAOFFlfDgdz pJC/jmeDno3BoWXgTUVMLTNlb/W+P6XXYXlpj2p8o3WXeCGKXi91zBB X-Developer-Key: i=johannes.thumshirn@wdc.com; a=ed25519; pk=TGmHKs78FdPi+QhrViEvjKIGwReUGCfa+3LEnGoR2KM= 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 --- 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",