get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216317/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216317,
    "url": "http://patchwork.ozlabs.org/api/patches/2216317/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260326095354.16340-71-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-71-jack@suse.cz>",
    "list_archive_url": null,
    "date": "2026-03-26T09:54:23",
    "name": "[29/42] fs: Fold fsync_buffers_list() into sync_mapping_buffers()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "b50b2d2f527753161d315a3f61254c928d4a261e",
    "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-71-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/2216317/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216317/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=zzUC=B2=vger.kernel.org=linux-ext4+bounces-15424-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=ASU5o0/Y;\n\tdkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG;\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=ASU5o0/Y;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=zzuc=b2=vger.kernel.org=linux-ext4+bounces-15424-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=ASU5o0/Y;\n\tdkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG;\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=ASU5o0/Y;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG;\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-15424-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=\"ASU5o0/Y\";\n\tdkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"pUfVOkmG\";\n\tdkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"ASU5o0/Y\";\n\tdkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=\"pUfVOkmG\"",
            "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\tdkim=pass header.d=suse.cz header.s=susede2_rsa header.b=\"ASU5o0/Y\";\n\tdkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=pUfVOkmG"
        ],
        "Received": [
            "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\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 4fhKDd6vqJz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 21:06:25 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhKDd6T4Tz4w9T\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 21:06:25 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhKDd6PKQz4wB7; Thu, 26 Mar 2026 21:06:25 +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 4fhKDZ2G07z4w9T\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 21:06:22 +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 BA97B30F016F\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 09:59:34 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 5F0183BF698;\n\tThu, 26 Mar 2026 09:57:07 +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 1B1133BFE4D\n\tfor <linux-ext4@vger.kernel.org>; Thu, 26 Mar 2026 09:57:02 +0000 (UTC)",
            "from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104: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 7E0485BDBB;\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 712924A0A6;\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 8rSfG3UCxWntYAAAD6G6ig\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 7C650A0C73; Thu, 26 Mar 2026 10:54:49 +0100 (CET)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774519585; cv=pass;\n\tb=KP5a3vpX16Cvlc6rs201T67vljMiJufxsYm1Yq9MvgrO1WpILYjpitY4+etWYpoNOWpZgkyDJCsLu+CKmYvPmyzaSxD1cFcxZRANpKqNEwej3vWb8xQ9d9wg8AT7afFxZu/1WTmgBejUUIX9eyzvHV2mVpLXj3YezpwBSdNhpxC9DPBjnSkvmd6Z7a/3X38or21vq01L3VVF77Mk5GH5z3Q5jyrJgI0NvR+9/3xTi0Q4Ue8TeVICRL4EwzJ7o7CMQ3ppo7DPlVRUSmj6u/6A3rnVEekWXFCbvCv60I0/+8/dnNgtHCue3uXf/fUiJisye2/hdjulZmphCDjmmuDc7g==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774519026; cv=none;\n b=U5dsgPPVtapGesaIQ0bAF9v/JVAjaXwGzYtscuKGEHVYES/TGu7K1uEjeDprxCXejP4eIIeZWGRRc25X6oJ3JV8Hf/V0P2h6sNmXbVo6qvtm8YgoC0o1oiXumzP3v0ih3NHJiqOripC8I9dj5U3JhBTUe4uiznq2LrX8zRvGbAY="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774519585; c=relaxed/relaxed;\n\tbh=byWU+6eyDTGDwPUjgaBLCOfLPFKdylFnJfWF0eWyWuE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Qsv4IuLPTRDw6+4Ek2qGdG1C20blN7f31LaL0FStUv9OgS1Zp6n/R/Co9gddidKY2rCtwX/gGpX7OrT7bj1Sf2NxtbixXmwFr/fXN+O3/XSINSKJvE5aZPaiHeS+sm9jLED+ZxBSaWjmUStceO51pszpw3fr/7JmYzBBNGSBKzjQEsYRkYEP7/PlKcIxSZdIuQTicEKQUQtpoiCv9ll/+xmamUGHCj/aHQnWkvs8XsaV+EEtYw7rNZa5acbThUqwSI3zOgMNr0nmEPnEFDeC3gq6nOcDm4qgNGoXCOSl4fvyP/nluPOV8IveWZiAYdhr5nBqCYRhq1RpCB4Q5O1baw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774519026; c=relaxed/simple;\n\tbh=f6izt04fZCFJQSkSrf7dTi/3Cbur8ValvknA2hTJ8Bo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=ZUqGNZGfwyNiURaIZikDB+Gy2a8FfJ/s5dgG3gejFTziwQIDV63kvIHawicmN0rPc+PDRDwrXb0A2WDA9LGWksF6t9XknK7wQ4P6iRb5GrcEaW5k3C9dudikKywym5zM+VaYduX/AWydQerKUwnr3Ryo2E5fByPACk6y7syGygk="
        ],
        "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=ASU5o0/Y;\n dkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG;\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=ASU5o0/Y;\n dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=pUfVOkmG; dkim-atps=neutral;\n spf=pass (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15424-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=ASU5o0/Y;\n dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=pUfVOkmG;\n dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=ASU5o0/Y;\n dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz\n header.b=pUfVOkmG; 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=byWU+6eyDTGDwPUjgaBLCOfLPFKdylFnJfWF0eWyWuE=;\n\tb=ASU5o0/YYWXbVR26pgaXFebCL3930P3+EUIlfiuWBRdfhgqtM2Qjg7UaRPJJzW4ZreAFxR\n\tGT1Y6RIvQKE4QxCDaEVPmm1NH7AYvZWQJAD4VNO7SJye5TunzbhZMbuykOWifh1qSZCCcP\n\tgZXucSGJrLv1j2Bf6MCLIIBAQUa8+gY=",
            "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=byWU+6eyDTGDwPUjgaBLCOfLPFKdylFnJfWF0eWyWuE=;\n\tb=pUfVOkmG7lb1lIZtjgEhqeCJUz6PcAJezbQNUrhi0HJ2Cy6ieRhpb3OcVwB5qVh8RDLep3\n\tmSsVjQWUchYWvQDQ==",
            "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=byWU+6eyDTGDwPUjgaBLCOfLPFKdylFnJfWF0eWyWuE=;\n\tb=ASU5o0/YYWXbVR26pgaXFebCL3930P3+EUIlfiuWBRdfhgqtM2Qjg7UaRPJJzW4ZreAFxR\n\tGT1Y6RIvQKE4QxCDaEVPmm1NH7AYvZWQJAD4VNO7SJye5TunzbhZMbuykOWifh1qSZCCcP\n\tgZXucSGJrLv1j2Bf6MCLIIBAQUa8+gY=",
            "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=byWU+6eyDTGDwPUjgaBLCOfLPFKdylFnJfWF0eWyWuE=;\n\tb=pUfVOkmG7lb1lIZtjgEhqeCJUz6PcAJezbQNUrhi0HJ2Cy6ieRhpb3OcVwB5qVh8RDLep3\n\tmSsVjQWUchYWvQDQ=="
        ],
        "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 29/42] fs: Fold fsync_buffers_list() into\n sync_mapping_buffers()",
        "Date": "Thu, 26 Mar 2026 10:54:23 +0100",
        "Message-ID": "<20260326095354.16340-71-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=7567; i=jack@suse.cz;\n h=from:subject; bh=f6izt04fZCFJQSkSrf7dTi/3Cbur8ValvknA2hTJ8Bo=;\n b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBpxQJLlQqRFKEeG5RqvmZU02Tl0MdB1/bLQi5a0\n XfukSttZ9yJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCacUCSwAKCRCcnaoHP2RA\n 2UhsCADJWf4qvR904MZ1Xs38Xnpv48CssgT5ZAAeT7048r9JjF3XKdrMqvfzxCMuDzpsYW2/TVJ\n zvp1pyOmzdfjFtAe5JJOvE3lm1DbibJ092f9I6J3V2DHMf/0cggTc4flNIyaL4QuIepoKD0Upwu\n Ubpc3wJiKVNBzCmPZbFHlMJLvCwdfk14YCirMSwn22iEAXxQAwCVZz+i3VZRI+gA04oQCCmBEF0\n SKC/ZcSUoPTPYuVp9YTQZEoAycs64RrnYdN2yy5HO1vW7mrjWFz1Mq6JVmFlWps30mM9tmCQcej\n XpVTUVLDxz1snBUc37I2ZAmOttVFWGkWJvzF2RHIb7gUJkgU",
        "X-Developer-Key": "i=jack@suse.cz; a=openpgp;\n fpr=93C6099A142276A28BBE35D815BC833443038D8C",
        "Content-Transfer-Encoding": "8bit",
        "X-Rspamd-Action": "no action",
        "X-Rspamd-Server": "rspamd2.dmz-prg2.suse.org",
        "X-Spamd-Result": "default: False [-1.51 / 50.00];\n\tBAYES_HAM(-3.00)[100.00%];\n\tSUSPICIOUS_RECIPS(1.50)[];\n\tMID_CONTAINS_FROM(1.00)[];\n\tNEURAL_HAM_LONG(-1.00)[-1.000];\n\tR_MISSING_CHARSET(0.50)[];\n\tNEURAL_HAM_SHORT(-0.20)[-1.000];\n\tR_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n\tMIME_GOOD(-0.10)[text/plain];\n\tMX_GOOD(-0.01)[];\n\tDBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns];\n\tRCVD_COUNT_THREE(0.00)[3];\n\tDKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n\tRBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n\tFUZZY_RATELIMITED(0.00)[rspamd.com];\n\tMIME_TRACE(0.00)[0:+];\n\tARC_NA(0.00)[];\n\tRCPT_COUNT_TWELVE(0.00)[17];\n\tRCVD_TLS_LAST(0.00)[];\n\tTO_MATCH_ENVRCPT_ALL(0.00)[];\n\tFROM_HAS_DN(0.00)[];\n\tRCVD_VIA_SMTP_AUTH(0.00)[];\n\tTAGGED_RCPT(0.00)[];\n\tRECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];\n\tSPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n\tR_RATELIMIT(0.00)[to_ip_from(RLhafujjw6m7bafrsz8p45s31g),to(RLpnp1psq57oqao6ocwdpbxen9)];\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\tDKIM_TRACE(0.00)[suse.cz:+];\n\tFROM_EQ_ENVFROM(0.00)[];\n\tTO_DN_SOME(0.00)[];\n\tFREEMAIL_ENVRCPT(0.00)[gmail.com]",
        "X-Rspamd-Queue-Id": "7E0485BDBB",
        "X-Spam-Score": "-1.51",
        "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": "There's only single caller of fsync_buffers_list() so untangle the code\na bit by folding fsync_buffers_list() into sync_mapping_buffers(). Also\nmerge the comments and update them to reflect current state of code.\n\nReviewed-by: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Jan Kara <jack@suse.cz>\n---\n fs/buffer.c | 180 +++++++++++++++++++++++-----------------------------\n 1 file changed, 80 insertions(+), 100 deletions(-)",
    "diff": "diff --git a/fs/buffer.c b/fs/buffer.c\nindex 1c0e7c81a38b..fa3d84084adf 100644\n--- a/fs/buffer.c\n+++ b/fs/buffer.c\n@@ -54,7 +54,6 @@\n \n #include \"internal.h\"\n \n-static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);\n static void submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh,\n \t\t\t  enum rw_hint hint, struct writeback_control *wbc);\n \n@@ -531,22 +530,96 @@ EXPORT_SYMBOL_GPL(inode_has_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- * that I/O.\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  *\n- * Basically, this is a convenience function for fsync().\n- * @mapping is a file or directory which needs those buffers to be written for\n- * a successful fsync().\n+ * We have conflicting pressures: we want to make sure that all\n+ * initially dirty buffers get waited on, but that any subsequently\n+ * dirtied buffers don't.  After all, we don't want fsync to last\n+ * forever if somebody is actively writing to the file.\n+ *\n+ * Do this in two main stages: first we copy dirty buffers to a\n+ * temporary inode list, queueing the writes as we go. Then we clean\n+ * up, waiting for those writes to complete. mark_buffer_dirty_inode()\n+ * doesn't touch b_assoc_buffers list if b_assoc_map is not NULL so we\n+ * are sure the buffer stays on our list until IO completes (at which point\n+ * it can be reaped).\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 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 \t\treturn 0;\n \n-\treturn fsync_buffers_list(&buffer_mapping->i_private_lock,\n-\t\t\t\t\t&mapping->i_private_list);\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+\t\tWARN_ON_ONCE(bh->b_assoc_map != mapping);\n+\t\t__remove_assoc_queue(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) || buffer_locked(bh)) {\n+\t\t\tlist_add(&bh->b_assoc_buffers, &tmp);\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\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+\t\t\t\t * current contents - it is a noop if I/O is\n+\t\t\t\t * still in flight on potentially older\n+\t\t\t\t * contents.\n+\t\t\t\t */\n+\t\t\t\twrite_dirty_buffer(bh, REQ_SYNC);\n+\n+\t\t\t\t/*\n+\t\t\t\t * Kick off IO for the previous mapping. Note\n+\t\t\t\t * that we will not run the very last mapping,\n+\t\t\t\t * wait_on_buffer() will do that for us\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}\n+\t\t}\n+\t}\n+\n+\tspin_unlock(&buffer_mapping->i_private_lock);\n+\tblk_finish_plug(&plug);\n+\tspin_lock(&buffer_mapping->i_private_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/* 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\tbh->b_assoc_map = mapping;\n+\t\t}\n+\t\tspin_unlock(&buffer_mapping->i_private_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}\n+\tspin_unlock(&buffer_mapping->i_private_lock);\n+\treturn err;\n }\n EXPORT_SYMBOL(sync_mapping_buffers);\n \n@@ -719,99 +792,6 @@ bool block_dirty_folio(struct address_space *mapping, struct folio *folio)\n }\n EXPORT_SYMBOL(block_dirty_folio);\n \n-/*\n- * Write out and wait upon a list of buffers.\n- *\n- * We have conflicting pressures: we want to make sure that all\n- * initially dirty buffers get waited on, but that any subsequently\n- * dirtied buffers don't.  After all, we don't want fsync to last\n- * forever if somebody is actively writing to the file.\n- *\n- * Do this in two main stages: first we copy dirty buffers to a\n- * temporary inode list, queueing the writes as we go.  Then we clean\n- * up, waiting for those writes to complete.\n- * \n- * During this second stage, any subsequent updates to the file may end\n- * up refiling the buffer on the original inode's dirty list again, so\n- * there is a chance we will end up with a buffer queued for write but\n- * not yet completed on that list.  So, as a final cleanup we go through\n- * the osync code to catch these locked, dirty buffers without requeuing\n- * any newly dirty buffers for write.\n- */\n-static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)\n-{\n-\tstruct buffer_head *bh;\n-\tstruct address_space *mapping;\n-\tint err = 0;\n-\tstruct blk_plug plug;\n-\tLIST_HEAD(tmp);\n-\n-\tblk_start_plug(&plug);\n-\n-\tspin_lock(lock);\n-\twhile (!list_empty(list)) {\n-\t\tbh = BH_ENTRY(list->next);\n-\t\tmapping = bh->b_assoc_map;\n-\t\t__remove_assoc_queue(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) || buffer_locked(bh)) {\n-\t\t\tlist_add(&bh->b_assoc_buffers, &tmp);\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(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-\t\t\t\t * current contents - it is a noop if I/O is\n-\t\t\t\t * still in flight on potentially older\n-\t\t\t\t * contents.\n-\t\t\t\t */\n-\t\t\t\twrite_dirty_buffer(bh, REQ_SYNC);\n-\n-\t\t\t\t/*\n-\t\t\t\t * Kick off IO for the previous mapping. Note\n-\t\t\t\t * that we will not run the very last mapping,\n-\t\t\t\t * wait_on_buffer() will do that for us\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(lock);\n-\t\t\t}\n-\t\t}\n-\t}\n-\n-\tspin_unlock(lock);\n-\tblk_finish_plug(&plug);\n-\tspin_lock(lock);\n-\n-\twhile (!list_empty(&tmp)) {\n-\t\tbh = BH_ENTRY(tmp.prev);\n-\t\tget_bh(bh);\n-\t\tmapping = bh->b_assoc_map;\n-\t\t__remove_assoc_queue(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\tbh->b_assoc_map = mapping;\n-\t\t}\n-\t\tspin_unlock(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(lock);\n-\t}\n-\t\n-\tspin_unlock(lock);\n-\treturn err;\n-}\n-\n /*\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",
    "prefixes": [
        "29/42"
    ]
}