Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216322/?format=api
{ "id": 2216322, "url": "http://patchwork.ozlabs.org/api/patches/2216322/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326095354.16340-72-jack@suse.cz/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260326095354.16340-72-jack@suse.cz>", "list_archive_url": null, "date": "2026-03-26T09:54:24", "name": "[30/42] fs: Move metadata bhs tracking to a separate struct", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "03aa6194bec573222deb81772a56cd386391523d", "submitter": { "id": 363, "url": "http://patchwork.ozlabs.org/api/people/363/?format=api", "name": "Jan Kara", "email": "jack@suse.cz" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326095354.16340-72-jack@suse.cz/mbox/", "series": [ { "id": 497561, "url": "http://patchwork.ozlabs.org/api/series/497561/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=497561", "date": "2026-03-26T09:53:55", "name": "fs: Move metadata bh tracking from address_space", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497561/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216322/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216322/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=xo9b=B2=vger.kernel.org=linux-ext4+bounces-15426-patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-ext4@vger.kernel.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "patchwork-incoming@ozlabs.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=2Gqog0u7;\n\tdkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX;\n\tdkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.a=rsa-sha256 header.s=susede2_rsa header.b=2Gqog0u7;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=xo9b=b2=vger.kernel.org=linux-ext4+bounces-15426-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.105.105.114 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=suse.cz", "gandalf.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=2Gqog0u7;\n\tdkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX;\n\tdkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.a=rsa-sha256 header.s=susede2_rsa header.b=2Gqog0u7;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15426-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"2Gqog0u7\";\n\tdkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"fqFTVCwX\";\n\tdkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"2Gqog0u7\";\n\tdkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"fqFTVCwX\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=195.135.223.131", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=suse.cz", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=suse.cz", "smtp-out2.suse.de;\n\tnone" ], "Received": [ "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhKHm377wz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 21:09:08 +1100 (AEDT)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhKHm2gkPz4w9T\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 21:09:08 +1100 (AEDT)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fhKHm2ZKQz4wHX; Thu, 26 Mar 2026 21:09:08 +1100 (AEDT)", "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4fhKHh5yVgz4w9T\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 21:09:04 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 6603E316B5C7\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 09:59:52 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4017F3C3BE8;\n\tThu, 26 Mar 2026 09:57:15 +0000 (UTC)", "from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id EC32A3CBE86\n\tfor <linux-ext4@vger.kernel.org>; Thu, 26 Mar 2026 09:57:10 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby smtp-out2.suse.de (Postfix) with ESMTPS id 7C7BD5BDB3;\n\tThu, 26 Mar 2026 09:55:01 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6EC5B4A0A8;\n\tThu, 26 Mar 2026 09:55:01 +0000 (UTC)", "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n\tby imap1.dmz-prg2.suse.org with ESMTPSA\n\tid nWD/GnUCxWnrYAAAD6G6ig\n\t(envelope-from <jack@suse.cz>); Thu, 26 Mar 2026 09:55:01 +0000", "by quack3.suse.cz (Postfix, from userid 1000)\n\tid 84FBAA0C74; Thu, 26 Mar 2026 10:54:49 +0100 (CET)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774519748; cv=pass;\n\tb=B4AkfYQBLevTwynj0nOOxAg3bIBj+f2YWrY2RuDXFuOiO3HEkQHuj3EYBTCuaXwQHuAjgfcf6BEdzlo4o0Y8qMHgHqAzePBv/+86PbZ/reM0clLNQ+cklcg5NHCjCw9FyqPNOJ22AxOZNIl1HOs0K7Gtb+FKSJrziVLizYvTeEbJNoC+/0IqUVZ0Eb6H5jLC6fBdcDQEOmjRmejLDzxF0P7eleg+KYDiGWd5nSv6IV2Gg+BFYa1LWy0mSg2lKM1JHszDcau18lQnCsRwXyRM8jWi1PfUN8iEgf2KolVoGgWxcT+qkhDNCTYqdwzoKkP9im2mK0l1WFZeEo6SRjvrIw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774519034; cv=none;\n b=nra69UYv0leseGVNkYA57L2UvVf1tQiifY8vp8LvkdRXxnZN+QgejlSnsX5w6IBqSGBgIkESj3yYTmm+HJFmQgUlqybgEREpNKgTYsq1W3n6/Hkib+YGj+QaAeXQy5pxjDlsMw7+dBdwd2a+tOrjo85qWTw0Ml88Zbc30rMVWHc=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774519748; c=relaxed/relaxed;\n\tbh=6+ZUth1tKXX0ZiI7up2I/VhlTIHl09BJjUwtjTmNbDA=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=a1a/12R9ssuMpO9HNGkgYZQOeyzceN2de63iXO42Y/0gsDApM6/0EMaYpdr2sbuJwlzONixGAjvjKxK7izPUPHed1NghKzoza74J070zgp3Huda/DFQC0MyUtRYRwiWAG19SZfTFo3mzg/HqsVu04IyG5IVB5pnuIjNk9hWUtAiyP1+bWq640MKtWnmDgpGYiNIeS7R4JIKVI4kyS9ZOrkvC39GvtuqMsx2srniGPhCzduWfkaK13r1OuBc7PescC4nY9fs1mNqxo0G1/vcIS+ioJNrIhM9TULigORQlI2E8pXDu+LEwJnKMn1z92HK+sIdzERXMMbv7xecfc0qkaA==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774519034; c=relaxed/simple;\n\tbh=YdvQcXpzVIE/5wk9piV7s051s369O9z8dW1705+xcWs=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=q4sjN78UNdArZiYCFYrWYvCoDFPNAfGpq0vqgpVaJeksNpg8mlT/g5AkX+DtrEaP841YVj0VLj1NkvuVWDC4PA6UUnWeZ5gz067+LzE1f2A46nbNTmV2DSSFWHyXEBiT9Tnt4RSU052JL1HQxyww52L2ljJr+AoIKhC3RPEERcw=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=suse.cz; dkim=pass (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=2Gqog0u7;\n dkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX;\n dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.a=rsa-sha256 header.s=susede2_rsa header.b=2Gqog0u7;\n dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fqFTVCwX; dkim-atps=neutral;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15426-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=suse.cz;\n spf=pass smtp.mailfrom=suse.cz;\n dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=2Gqog0u7;\n dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=fqFTVCwX;\n dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=2Gqog0u7;\n dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=fqFTVCwX; arc=none smtp.client-ip=195.135.223.131" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n\tt=1774518901;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n\t mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=6+ZUth1tKXX0ZiI7up2I/VhlTIHl09BJjUwtjTmNbDA=;\n\tb=2Gqog0u7qh4PuOZBKtKWV2lIxV8WwiuElfirq7GgaRyO1nAHuBlCL/An4bY3C2LBp4cA6Q\n\t8JWvz3OiLsrbG+ZIQ4UFku6G53TiaY/rJvXrA+Ieod4hqg24GrDevWVeMpn0WNm0tthRqP\n\tqZo+ntsh6Bm5jjP0vKYco6E7cBVmKj4=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n\ts=susede2_ed25519; t=1774518901;\n\th=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n\t mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=6+ZUth1tKXX0ZiI7up2I/VhlTIHl09BJjUwtjTmNbDA=;\n\tb=fqFTVCwXQpzIFmejXE3OB8AgfRlxJ4yXBHDJQhRf4kyFut0c6DmOBcIzVNFOPFTBxnIEKU\n\tBr4hNdjHH06BxBCw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n\tt=1774518901;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n\t mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=6+ZUth1tKXX0ZiI7up2I/VhlTIHl09BJjUwtjTmNbDA=;\n\tb=2Gqog0u7qh4PuOZBKtKWV2lIxV8WwiuElfirq7GgaRyO1nAHuBlCL/An4bY3C2LBp4cA6Q\n\t8JWvz3OiLsrbG+ZIQ4UFku6G53TiaY/rJvXrA+Ieod4hqg24GrDevWVeMpn0WNm0tthRqP\n\tqZo+ntsh6Bm5jjP0vKYco6E7cBVmKj4=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n\ts=susede2_ed25519; t=1774518901;\n\th=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n\t mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=6+ZUth1tKXX0ZiI7up2I/VhlTIHl09BJjUwtjTmNbDA=;\n\tb=fqFTVCwXQpzIFmejXE3OB8AgfRlxJ4yXBHDJQhRf4kyFut0c6DmOBcIzVNFOPFTBxnIEKU\n\tBr4hNdjHH06BxBCw==" ], "From": "Jan Kara <jack@suse.cz>", "To": "<linux-fsdevel@vger.kernel.org>", "Cc": "<linux-block@vger.kernel.org>,\n\tChristian Brauner <brauner@kernel.org>,\n\tAl Viro <viro@ZenIV.linux.org.uk>,\n\t<linux-ext4@vger.kernel.org>,\n\tTed Tso <tytso@mit.edu>,\n\t\"Tigran A. Aivazian\" <aivazian.tigran@gmail.com>,\n\tDavid Sterba <dsterba@suse.com>,\n\tOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,\n\tMuchun Song <muchun.song@linux.dev>,\n\tOscar Salvador <osalvador@suse.de>,\n\tDavid Hildenbrand <david@kernel.org>,\n\tlinux-mm@kvack.org,\n\tlinux-aio@kvack.org,\n\tBenjamin LaHaise <bcrl@kvack.org>,\n\tJan Kara <jack@suse.cz>,\n\tChristoph Hellwig <hch@lst.de>", "Subject": "[PATCH 30/42] fs: Move metadata bhs tracking to a separate struct", "Date": "Thu, 26 Mar 2026 10:54:24 +0100", "Message-ID": "<20260326095354.16340-72-jack@suse.cz>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260326082428.31660-1-jack@suse.cz>", "References": "<20260326082428.31660-1-jack@suse.cz>", "Precedence": "bulk", "X-Mailing-List": "linux-ext4@vger.kernel.org", "List-Id": "<linux-ext4.vger.kernel.org>", "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=11992; i=jack@suse.cz;\n h=from:subject; bh=YdvQcXpzVIE/5wk9piV7s051s369O9z8dW1705+xcWs=;\n b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBpxQJM0hqf0FzMkktcRWAJkssblEBwKXGuf60WU\n DPDaNoDyl+JATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCacUCTAAKCRCcnaoHP2RA\n 2Z2TCADfLqtlAel4HKSFv4LI0HZ2GGiVoRpDlSw1eEMTS9QJ74CWIJfBK7c0i/510E3RDh/wlEn\n 7/O06yC1/NCnJhENUvZbyTlXvECDT9QsunJ8jtuZRZ8oHy9ddOFaJulsvh43LnKFRU+10QBSeG2\n IGefxqOi4sTvPvc0R/19OFJ6xiOtSZiQPWeKk2L2yT4Kmc6DN13xMSj8feKC1SiAzmEPCICGGaU\n +Fu6AzYECsHU0Ie4BTpdDgZBoYBr7NhH7I2LR0XwqI8IzOaF80iahbpv7lxkaYUs7NxCItt9evf\n 6kkkslGpcqjOy2uBncw9MhxdjIuJoFpwqha8WGY1vvZD8wXf", "X-Developer-Key": "i=jack@suse.cz; a=openpgp;\n fpr=93C6099A142276A28BBE35D815BC833443038D8C", "Content-Transfer-Encoding": "8bit", "X-Spamd-Result": "default: False [-1.30 / 50.00];\n\tBAYES_HAM(-3.00)[100.00%];\n\tSUSPICIOUS_RECIPS(1.50)[];\n\tNEURAL_HAM_LONG(-1.00)[-1.000];\n\tMID_CONTAINS_FROM(1.00)[];\n\tR_MISSING_CHARSET(0.50)[];\n\tNEURAL_HAM_SHORT(-0.20)[-1.000];\n\tMIME_GOOD(-0.10)[text/plain];\n\tTAGGED_RCPT(0.00)[];\n\tMIME_TRACE(0.00)[0:+];\n\tFUZZY_RATELIMITED(0.00)[rspamd.com];\n\tRCVD_VIA_SMTP_AUTH(0.00)[];\n\tTO_DN_SOME(0.00)[];\n\tRCPT_COUNT_TWELVE(0.00)[17];\n\tARC_NA(0.00)[];\n\tRCVD_COUNT_THREE(0.00)[3];\n\tDKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n\tFROM_HAS_DN(0.00)[];\n\tFREEMAIL_CC(0.00)[vger.kernel.org,kernel.org,ZenIV.linux.org.uk,mit.edu,gmail.com,suse.com,mail.parknet.co.jp,linux.dev,suse.de,kvack.org,suse.cz,lst.de];\n\tR_RATELIMIT(0.00)[to_ip_from(RLck8brw5hxmszoarioc7838it),to(RLpnp1psq57oqao6ocwdpbxen9)];\n\tFROM_EQ_ENVFROM(0.00)[];\n\tTO_MATCH_ENVRCPT_ALL(0.00)[];\n\tDBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo];\n\tRCVD_TLS_LAST(0.00)[];\n\tFREEMAIL_ENVRCPT(0.00)[gmail.com]", "X-Spam-Score": "-1.30", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_MISSING,\n\tHEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,\n\tSPF_PASS autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "Instead of tracking metadata bhs for a mapping using i_private_list and\ni_private_lock create a dedicated mapping_metadata_bhs struct for it.\nSo far this struct is embedded in address_space but that will be\nswitched for per-fs private inode parts later in the series. This also\nchanges the locking from bdev mapping's i_private_lock to a new lock\nembedded in mapping_metadata_bhs to untangle the i_private_lock locking\nfor maintaining lists of metadata bhs and the locking for looking up /\nreclaiming bdev's buffer heads. The locking in remove_assoc_map() gets\nmore complex due to this but overall this looks like a reasonable\ntradeoff.\n\nReviewed-by: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Jan Kara <jack@suse.cz>\n---\n fs/buffer.c | 138 +++++++++++++++++++++------------------------\n fs/inode.c | 2 +\n include/linux/fs.h | 7 +++\n 3 files changed, 74 insertions(+), 73 deletions(-)", "diff": "diff --git a/fs/buffer.c b/fs/buffer.c\nindex fa3d84084adf..294f9cd07f42 100644\n--- a/fs/buffer.c\n+++ b/fs/buffer.c\n@@ -469,30 +469,13 @@ EXPORT_SYMBOL(mark_buffer_async_write);\n *\n * The functions mark_buffer_dirty_inode(), fsync_inode_buffers(),\n * inode_has_buffers() and invalidate_inode_buffers() are provided for the\n- * management of a list of dependent buffers at ->i_mapping->i_private_list.\n- *\n- * Locking is a little subtle: try_to_free_buffers() will remove buffers\n- * from their controlling inode's queue when they are being freed. But\n- * try_to_free_buffers() will be operating against the *blockdev* mapping\n- * at the time, not against the S_ISREG file which depends on those buffers.\n- * So the locking for i_private_list is via the i_private_lock in the address_space\n- * which backs the buffers. Which is different from the address_space \n- * against which the buffers are listed. So for a particular address_space,\n- * mapping->i_private_lock does *not* protect mapping->i_private_list! In fact,\n- * mapping->i_private_list will always be protected by the backing blockdev's\n- * ->i_private_lock.\n- *\n- * Which introduces a requirement: all buffers on an address_space's\n- * ->i_private_list must be from the same address_space: the blockdev's.\n- *\n- * address_spaces which do not place buffers at ->i_private_list via these\n- * utility functions are free to use i_private_lock and i_private_list for\n- * whatever they want. The only requirement is that list_empty(i_private_list)\n- * be true at clear_inode() time.\n- *\n- * FIXME: clear_inode should not call invalidate_inode_buffers(). The\n- * filesystems should do that. invalidate_inode_buffers() should just go\n- * BUG_ON(!list_empty).\n+ * management of a list of dependent buffers in mapping_metadata_bhs struct.\n+ *\n+ * The locking is a little subtle: The list of buffer heads is protected by\n+ * the lock in mapping_metadata_bhs so functions coming from bdev mapping\n+ * (such as try_to_free_buffers()) need to safely get to mapping_metadata_bhs\n+ * using RCU, grab the lock, verify we didn't race with somebody detaching the\n+ * bh / moving it to different inode and only then proceeding.\n *\n * FIXME: mark_buffer_dirty_inode() is a data-plane operation. It should\n * take an address_space, not an inode. And it should be called\n@@ -509,19 +492,45 @@ EXPORT_SYMBOL(mark_buffer_async_write);\n * b_inode back.\n */\n \n-/*\n- * The buffer's backing address_space's i_private_lock must be held\n- */\n-static void __remove_assoc_queue(struct buffer_head *bh)\n+static void __remove_assoc_queue(struct mapping_metadata_bhs *mmb,\n+\t\t\t struct buffer_head *bh)\n {\n+\tlockdep_assert_held(&mmb->lock);\n \tlist_del_init(&bh->b_assoc_buffers);\n \tWARN_ON(!bh->b_assoc_map);\n \tbh->b_assoc_map = NULL;\n }\n \n+static void remove_assoc_queue(struct buffer_head *bh)\n+{\n+\tstruct address_space *mapping;\n+\tstruct mapping_metadata_bhs *mmb;\n+\n+\t/*\n+\t * The locking dance is ugly here. We need to acquire the lock\n+\t * protecting the metadata bh list while possibly racing with bh\n+\t * being removed from the list or moved to a different one. We\n+\t * use RCU to pin mapping_metadata_bhs in memory to\n+\t * opportunistically acquire the lock and then recheck the bh\n+\t * didn't move under us.\n+\t */\n+\twhile (bh->b_assoc_map) {\n+\t\trcu_read_lock();\n+\t\tmapping = READ_ONCE(bh->b_assoc_map);\n+\t\tif (mapping) {\n+\t\t\tmmb = &mapping->i_metadata_bhs;\n+\t\t\tspin_lock(&mmb->lock);\n+\t\t\tif (bh->b_assoc_map == mapping)\n+\t\t\t\t__remove_assoc_queue(mmb, bh);\n+\t\t\tspin_unlock(&mmb->lock);\n+\t\t}\n+\t\trcu_read_unlock();\n+\t}\n+}\n+\n int inode_has_buffers(struct inode *inode)\n {\n-\treturn !list_empty(&inode->i_data.i_private_list);\n+\treturn !list_empty(&inode->i_data.i_metadata_bhs.list);\n }\n EXPORT_SYMBOL_GPL(inode_has_buffers);\n \n@@ -529,7 +538,7 @@ EXPORT_SYMBOL_GPL(inode_has_buffers);\n * sync_mapping_buffers - write out & wait upon a mapping's \"associated\" buffers\n * @mapping: the mapping which wants those buffers written\n *\n- * Starts I/O against the buffers at mapping->i_private_list, and waits upon\n+ * Starts I/O against the buffers at mapping->i_metadata_bhs and waits upon\n * that I/O. Basically, this is a convenience function for fsync(). @mapping\n * is a file or directory which needs those buffers to be written for a\n * successful fsync().\n@@ -548,23 +557,22 @@ EXPORT_SYMBOL_GPL(inode_has_buffers);\n */\n int sync_mapping_buffers(struct address_space *mapping)\n {\n-\tstruct address_space *buffer_mapping =\n-\t\t\t\tmapping->host->i_sb->s_bdev->bd_mapping;\n+\tstruct mapping_metadata_bhs *mmb = &mapping->i_metadata_bhs;\n \tstruct buffer_head *bh;\n \tint err = 0;\n \tstruct blk_plug plug;\n \tLIST_HEAD(tmp);\n \n-\tif (list_empty(&mapping->i_private_list))\n+\tif (list_empty(&mmb->list))\n \t\treturn 0;\n \n \tblk_start_plug(&plug);\n \n-\tspin_lock(&buffer_mapping->i_private_lock);\n-\twhile (!list_empty(&mapping->i_private_list)) {\n-\t\tbh = BH_ENTRY(mapping->i_private_list.next);\n+\tspin_lock(&mmb->lock);\n+\twhile (!list_empty(&mmb->list)) {\n+\t\tbh = BH_ENTRY(mmb->list.next);\n \t\tWARN_ON_ONCE(bh->b_assoc_map != mapping);\n-\t\t__remove_assoc_queue(bh);\n+\t\t__remove_assoc_queue(mmb, bh);\n \t\t/* Avoid race with mark_buffer_dirty_inode() which does\n \t\t * a lockless check and we rely on seeing the dirty bit */\n \t\tsmp_mb();\n@@ -573,7 +581,7 @@ int sync_mapping_buffers(struct address_space *mapping)\n \t\t\tbh->b_assoc_map = mapping;\n \t\t\tif (buffer_dirty(bh)) {\n \t\t\t\tget_bh(bh);\n-\t\t\t\tspin_unlock(&buffer_mapping->i_private_lock);\n+\t\t\t\tspin_unlock(&mmb->lock);\n \t\t\t\t/*\n \t\t\t\t * Ensure any pending I/O completes so that\n \t\t\t\t * write_dirty_buffer() actually writes the\n@@ -590,35 +598,34 @@ int sync_mapping_buffers(struct address_space *mapping)\n \t\t\t\t * through sync_buffer().\n \t\t\t\t */\n \t\t\t\tbrelse(bh);\n-\t\t\t\tspin_lock(&buffer_mapping->i_private_lock);\n+\t\t\t\tspin_lock(&mmb->lock);\n \t\t\t}\n \t\t}\n \t}\n \n-\tspin_unlock(&buffer_mapping->i_private_lock);\n+\tspin_unlock(&mmb->lock);\n \tblk_finish_plug(&plug);\n-\tspin_lock(&buffer_mapping->i_private_lock);\n+\tspin_lock(&mmb->lock);\n \n \twhile (!list_empty(&tmp)) {\n \t\tbh = BH_ENTRY(tmp.prev);\n \t\tget_bh(bh);\n-\t\t__remove_assoc_queue(bh);\n+\t\t__remove_assoc_queue(mmb, bh);\n \t\t/* Avoid race with mark_buffer_dirty_inode() which does\n \t\t * a lockless check and we rely on seeing the dirty bit */\n \t\tsmp_mb();\n \t\tif (buffer_dirty(bh)) {\n-\t\t\tlist_add(&bh->b_assoc_buffers,\n-\t\t\t\t &mapping->i_private_list);\n+\t\t\tlist_add(&bh->b_assoc_buffers, &mmb->list);\n \t\t\tbh->b_assoc_map = mapping;\n \t\t}\n-\t\tspin_unlock(&buffer_mapping->i_private_lock);\n+\t\tspin_unlock(&mmb->lock);\n \t\twait_on_buffer(bh);\n \t\tif (!buffer_uptodate(bh))\n \t\t\terr = -EIO;\n \t\tbrelse(bh);\n-\t\tspin_lock(&buffer_mapping->i_private_lock);\n+\t\tspin_lock(&mmb->lock);\n \t}\n-\tspin_unlock(&buffer_mapping->i_private_lock);\n+\tspin_unlock(&mmb->lock);\n \treturn err;\n }\n EXPORT_SYMBOL(sync_mapping_buffers);\n@@ -715,15 +722,14 @@ void write_boundary_block(struct block_device *bdev,\n void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode)\n {\n \tstruct address_space *mapping = inode->i_mapping;\n-\tstruct address_space *buffer_mapping = bh->b_folio->mapping;\n \n \tmark_buffer_dirty(bh);\n \tif (!bh->b_assoc_map) {\n-\t\tspin_lock(&buffer_mapping->i_private_lock);\n+\t\tspin_lock(&mapping->i_metadata_bhs.lock);\n \t\tlist_move_tail(&bh->b_assoc_buffers,\n-\t\t\t\t&mapping->i_private_list);\n+\t\t\t\t&mapping->i_metadata_bhs.list);\n \t\tbh->b_assoc_map = mapping;\n-\t\tspin_unlock(&buffer_mapping->i_private_lock);\n+\t\tspin_unlock(&mapping->i_metadata_bhs.lock);\n \t}\n }\n EXPORT_SYMBOL(mark_buffer_dirty_inode);\n@@ -796,22 +802,16 @@ EXPORT_SYMBOL(block_dirty_folio);\n * Invalidate any and all dirty buffers on a given inode. We are\n * probably unmounting the fs, but that doesn't mean we have already\n * done a sync(). Just drop the buffers from the inode list.\n- *\n- * NOTE: we take the inode's blockdev's mapping's i_private_lock. Which\n- * assumes that all the buffers are against the blockdev.\n */\n void invalidate_inode_buffers(struct inode *inode)\n {\n \tif (inode_has_buffers(inode)) {\n-\t\tstruct address_space *mapping = &inode->i_data;\n-\t\tstruct list_head *list = &mapping->i_private_list;\n-\t\tstruct address_space *buffer_mapping =\n-\t\t\t\tmapping->host->i_sb->s_bdev->bd_mapping;\n-\n-\t\tspin_lock(&buffer_mapping->i_private_lock);\n-\t\twhile (!list_empty(list))\n-\t\t\t__remove_assoc_queue(BH_ENTRY(list->next));\n-\t\tspin_unlock(&buffer_mapping->i_private_lock);\n+\t\tstruct mapping_metadata_bhs *mmb = &inode->i_data.i_metadata_bhs;\n+\n+\t\tspin_lock(&mmb->lock);\n+\t\twhile (!list_empty(&mmb->list))\n+\t\t\t__remove_assoc_queue(mmb, BH_ENTRY(mmb->list.next));\n+\t\tspin_unlock(&mmb->lock);\n \t}\n }\n EXPORT_SYMBOL(invalidate_inode_buffers);\n@@ -1155,14 +1155,7 @@ EXPORT_SYMBOL(__brelse);\n void __bforget(struct buffer_head *bh)\n {\n \tclear_buffer_dirty(bh);\n-\tif (bh->b_assoc_map) {\n-\t\tstruct address_space *buffer_mapping = bh->b_folio->mapping;\n-\n-\t\tspin_lock(&buffer_mapping->i_private_lock);\n-\t\tlist_del_init(&bh->b_assoc_buffers);\n-\t\tbh->b_assoc_map = NULL;\n-\t\tspin_unlock(&buffer_mapping->i_private_lock);\n-\t}\n+\tremove_assoc_queue(bh);\n \t__brelse(bh);\n }\n EXPORT_SYMBOL(__bforget);\n@@ -2810,8 +2803,7 @@ drop_buffers(struct folio *folio, struct buffer_head **buffers_to_free)\n \tdo {\n \t\tstruct buffer_head *next = bh->b_this_page;\n \n-\t\tif (bh->b_assoc_map)\n-\t\t\t__remove_assoc_queue(bh);\n+\t\tremove_assoc_queue(bh);\n \t\tbh = next;\n \t} while (bh != head);\n \t*buffers_to_free = head;\ndiff --git a/fs/inode.c b/fs/inode.c\nindex d5774e627a9c..393f586d050a 100644\n--- a/fs/inode.c\n+++ b/fs/inode.c\n@@ -483,6 +483,8 @@ static void __address_space_init_once(struct address_space *mapping)\n \tinit_rwsem(&mapping->i_mmap_rwsem);\n \tINIT_LIST_HEAD(&mapping->i_private_list);\n \tspin_lock_init(&mapping->i_private_lock);\n+\tspin_lock_init(&mapping->i_metadata_bhs.lock);\n+\tINIT_LIST_HEAD(&mapping->i_metadata_bhs.list);\n \tmapping->i_mmap = RB_ROOT_CACHED;\n }\n \ndiff --git a/include/linux/fs.h b/include/linux/fs.h\nindex d488459396f4..76360b0040e0 100644\n--- a/include/linux/fs.h\n+++ b/include/linux/fs.h\n@@ -445,6 +445,12 @@ struct address_space_operations {\n \n extern const struct address_space_operations empty_aops;\n \n+/* Structure for tracking metadata buffer heads associated with the mapping */\n+struct mapping_metadata_bhs {\n+\tspinlock_t lock;\t/* Lock protecting bh list */\n+\tstruct list_head list;\t/* The list of bhs (b_assoc_buffers) */\n+};\n+\n /**\n * struct address_space - Contents of a cacheable, mappable object.\n * @host: Owner, either the inode or the block_device.\n@@ -484,6 +490,7 @@ struct address_space {\n \terrseq_t\t\twb_err;\n \tspinlock_t\t\ti_private_lock;\n \tstruct list_head\ti_private_list;\n+\tstruct mapping_metadata_bhs i_metadata_bhs;\n \tstruct rw_semaphore\ti_mmap_rwsem;\n } __attribute__((aligned(sizeof(long)))) __randomize_layout;\n \t/*\n", "prefixes": [ "30/42" ] }