get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220011,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2220011/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260405195007.1306-5-DefendTheDisabled@gmail.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260405195007.1306-5-DefendTheDisabled@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-05T19:50:00",
    "name": "[4/6] ext4: add dedicated ptime field alongside i_crtime",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "68e5919f5a4a84fd6e85b6059d12508e8c938a22",
    "submitter": {
        "id": 93064,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/93064/?format=api",
        "name": "Sean Smith",
        "email": "defendthedisabled@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260405195007.1306-5-DefendTheDisabled@gmail.com/mbox/",
    "series": [
        {
            "id": 498804,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/498804/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=498804",
            "date": "2026-04-05T19:49:56",
            "name": "provenance_time (ptime): a new settable timestamp for cross-filesystem provenance",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498804/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220011/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220011/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=ls9y=CE=vger.kernel.org=linux-ext4+bounces-15646-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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=MFGd3Z38;\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=ls9y=ce=vger.kernel.org=linux-ext4+bounces-15646-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c04:e001:36c::12fc:5321\"\n arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=MFGd3Z38;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15646-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"MFGd3Z38\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.167.182",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "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 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpjln4wx6z1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 05:52:05 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fpjln4RtFz4wCm\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 05:52:05 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fpjln4Mx5z4wG6; Mon, 06 Apr 2026 05:52:05 +1000 (AEST)",
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\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 4fpjlk1GGWz4wCm\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 06 Apr 2026 05:52:02 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 9C72B301BEC4\n\tfor <patchwork-incoming@ozlabs.org>; Sun,  5 Apr 2026 19:50:50 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9ED92382285;\n\tSun,  5 Apr 2026 19:50:43 +0000 (UTC)",
            "from mail-oi1-f182.google.com (mail-oi1-f182.google.com\n [209.85.167.182])\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 151A0381AE1\n\tfor <linux-ext4@vger.kernel.org>; Sun,  5 Apr 2026 19:50:42 +0000 (UTC)",
            "by mail-oi1-f182.google.com with SMTP id\n 5614622812f47-46eca92a297so1675760b6e.0\n        for <linux-ext4@vger.kernel.org>;\n Sun, 05 Apr 2026 12:50:41 -0700 (PDT)",
            "from localhost.localdomain (c-73-5-99-191.hsd1.la.comcast.net.\n [73.5.99.191])\n        by smtp.gmail.com with ESMTPSA id\n 5614622812f47-46f46160155sm4547428b6e.17.2026.04.05.12.50.39\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sun, 05 Apr 2026 12:50:39 -0700 (PDT)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1775418725; cv=pass;\n\tb=xyshVfnVuPAlIMAElonEz1PpEuBF6SeFge6/HEVByUzxK0zWWKCcJlzO7m7U9d+U5WpSXc9AMKPx8D1QXgeU8FVyPnySTGNH/ZiKc7PPQPU5KX8vtK0/wDjKz4gLR6aOU4R8RKvaZuQpjmcTMZXKP4APYAtov5DmRDkr/pKrXL5O/kKZQG4M5gyFIDlLZ9fjHYrxTKY9tvfa0oem/+a7TWvF8aN6O1+SVmAA4/F/EA+bZXKR/fNjgYVqaClYoso5VL5oUlvE3sVvDarKmDDAeI4RpvjnSj6NyNKlXVvCYJLLdUaD5HxJBM6inropdHA5U9/HgR8zyDH9WQ/pxtfKuw==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775418643; cv=none;\n b=Oz9OMN3hWnRGyB5G0l4N4FBMgLqACYP7MsuPA297GbdWJWgy3baumPc1TUbTZv/Ggk9W/eRqAN6ZwQXk4tWjnHN4n9lefRBne2XvWttA1tcOjCPTWRhE3q0V5zwpKovsUT/0Tc/0puqrnKXjtNkqwXeo4APxAB0sXRfp8wi4HpE="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1775418725; c=relaxed/relaxed;\n\tbh=NEusXoSwED78w0vyJyU5i030iDxdLxYwqTLGcdoyW1Q=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=NJVut0tdcQFNft2SjrvMOJk9870jgH0m5Ua3FkEu0mt3YVsfJZeURHMV3o0JSY2meQYdaQNe7B2ydoexeDqemCgYq35oDZLjgzuMujv/wzwN1XCppHlsQ9AFpqh1+mHutguLDPyufYQTIOvR9oGcgPnHAElhF4RKlYK4RzGVDlBByooQfNoPImOCxa8YiknloQBBa1G5uOSdnvfIGP49KpyMdRpObCcm1utwI1YH9/5RODMOxOkqwb6sxC+cPu+2AJgmH8sFmJlv0gHcSw6JtEM4IJCg9ZnZxZjX1fk82I6G5bvb/J3ZBEmm1sH3cECk/n7lCch8jbcxKrP7HP+HRg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775418643; c=relaxed/simple;\n\tbh=M3Pjhbze6h8AbWBgQKGzzirkBeW7ABl2/2UM8BAwgDs=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=BMHfp9dIj99m/0D2Qj1xROfFXiHr5HpLv1iJTIONi+lIO5lxAw5VymT7Ju9R87YzvOHvvdc89dK9R5g/5TdkYo/2NncPhkKQhGZv1ufzkZc1rmEHycS80vh+4+/dQvFXZ1wGoTg47Lis0S4C9P44k2IA1mla1laJhbTfEiossio="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=MFGd3Z38; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15646-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=MFGd3Z38; arc=none smtp.client-ip=209.85.167.182"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775418641; x=1776023441;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=NEusXoSwED78w0vyJyU5i030iDxdLxYwqTLGcdoyW1Q=;\n        b=MFGd3Z38AU/J7a2O6oIPMttJmmmN9rttQChMC6sOmnGQshaIseiIvJ0AU67UDhSlWb\n         I2RLPiBpqVWhTTFZWGDBzI8bqhEMtCIQROjUWIzUmDBPFcThCyNEbelT0+5u4KDc+cfD\n         YPc+JDCf9vTKTz3xjyUo7PW6X2t5EaTjRTQzH6qVgMRlwVbzeN0VBepiCNUzHB46JwcJ\n         ppFBSMKNPLNXCO0oA5mRNinVThyOYF9vELDMQjmBEyWPP1edyOiz0O/UB4QX5xu5nrUJ\n         UJOVxxzjQzd2P+1kH80hFE2RummrWZoczwBNN3kBsXLRepADMjd5XARKmyBA6DZgY5MC\n         CWtQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775418641; x=1776023441;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=NEusXoSwED78w0vyJyU5i030iDxdLxYwqTLGcdoyW1Q=;\n        b=qMcuBsEsfh87tflIUg0XW2nFB2a7pyvNZJ9JQyrXJ+GUVB1f5Z8bL1YpDVwOZUGevi\n         CAzFW8EhtT7ZSjrggbl9DEV9sFhifPQAHE7U/ECnT+ZWKk6k+U1DAeNMmzizZhaLOh3W\n         lJ3poW7CjUBEmq0lzxGVHazxx3zVhGJxEEaz3v6rQBR5nUdg+TwVgg05sBWInTjDNE4A\n         uINp8KJT5mwRTFWk/fniGntiFCFRJoERJVGqHg7SLntAqnMCcFVlo/9nx3WsZKc3e5bQ\n         wPUKXmHqUc5aCy9B2jTnsZbOSaWk0N/PNXdgYg860GQFx/l/GJhFSprPbJGmyzn5y5+8\n         /qWg==",
        "X-Gm-Message-State": "AOJu0Yy3DAcQUyJ211n5rbjWgo+Cy1jGIHNtrMPI3onPRfrgg/tLDt6u\n\tqlBHh1eUou6/8VqzxREVRnHwUmxqWMoWBAa85KDpG7hDwQ3MlYx2LrfU",
        "X-Gm-Gg": "AeBDiet9aRJRJutsCHvuIEnvymkAoSM8BM0XQenlOVJFZV2IP2u60dLn46+k27Z2qK/\n\tWiubi/0RaxQLQOQdKHYeoD/VqI3v3H0+Zxj7yhkUI45DTzhNoBZGzUOZyjuzWcHT+Dq0e4MF5c5\n\tjV2AuVOxH0sYl7FKuT/Wnw0oK5oToU5Kek/eNfKisv4UUI7WxOv5vOLA9rgLjFK7zxS4MO/QDhF\n\tGsmIAR3D4sfz85jLYeErLqo9H9W3vIjvxfnvySQ9a2sGeeNegnHzF7CUo6m/HAfVdw5GLN49H+G\n\tok3+o6xgp7vrp5iC0jWb34UcF1QVu0R3CE4GrUry86j498r1eJ2jVXbEsQO3RV7GXID9eTSnRBI\n\t8EyjEDMr0MDaFloRsr97i9TwXeMYkeG5vxTtIyekutnIhoBDFqGtk/o7xbRcTWmXSVfTbNJmYuy\n\tLNZp0cFHcLB0ph2NepW1Gr/CC7m7i0eIq38y4r5EfflABr6hmhld4zyDVFLjKkSQE74Tl3XJXz3\n\tQfsMxBa4TgagA+VIYxmEx7bvQ==",
        "X-Received": "by 2002:a05:6808:5088:b0:468:1574:4cc1 with SMTP id\n 5614622812f47-46ef8d5bf29mr5189492b6e.3.1775418641053;\n        Sun, 05 Apr 2026 12:50:41 -0700 (PDT)",
        "From": "Sean Smith <defendthedisabled@gmail.com>",
        "X-Google-Original-From": "Sean Smith <DefendTheDisabled@gmail.com>",
        "To": "linux-fsdevel@vger.kernel.org",
        "Cc": "linux-ext4@vger.kernel.org,\n\tlinux-btrfs@vger.kernel.org,\n\ttytso@mit.edu,\n\tdsterba@suse.com,\n\tdavid@fromorbit.com,\n\tbrauner@kernel.org,\n\tosandov@osandov.com,\n\talmaz@kernel.org,\n\thirofumi@mail.parknet.co.jp,\n\tlinkinjeon@kernel.org,\n\tSean Smith <DefendTheDisabled@gmail.com>",
        "Subject": "[PATCH 4/6] ext4: add dedicated ptime field alongside i_crtime",
        "Date": "Sun,  5 Apr 2026 14:50:00 -0500",
        "Message-ID": "<20260405195007.1306-5-DefendTheDisabled@gmail.com>",
        "X-Mailer": "git-send-email 2.51.0.windows.1",
        "In-Reply-To": "<20260405195007.1306-1-DefendTheDisabled@gmail.com>",
        "References": "<20260405195007.1306-1-DefendTheDisabled@gmail.com>",
        "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",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tFREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "Add i_ptime (__le32) and i_ptime_extra (__le32) to the ext4 on-disk\ninode structure after i_projid. Total: 8 bytes in the extended inode\narea. i_crtime remains untouched as immutable birth time.\n\nThis is a native-ptime implementation: ptime and btime are separate\nfields. On 256-byte inodes (modern default), both fit easily. On\n128-byte inodes, ptime is silently unavailable (same graceful\ndegradation as i_crtime via EXT4_FITS_IN_INODE).\n\nUses existing EXT4_EINODE_GET_XTIME/SET_XTIME macros for read/write.\nRename-over: when a file with ptime=0 replaces a file with ptime set,\ninherit target ptime (same zero-sentinel logic as Btrfs).\n\nSigned-off-by: Sean Smith <DefendTheDisabled@gmail.com>\n---\n fs/ext4/ext4.h  |  3 +++\n fs/ext4/inode.c | 14 ++++++++++++++\n fs/ext4/namei.c | 13 +++++++++++++\n 3 files changed, 30 insertions(+)",
    "diff": "diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex f1c476303..5c2812637 100644\n--- a/fs/ext4/ext4.h\n+++ b/fs/ext4/ext4.h\n@@ -860,6 +860,8 @@ struct ext4_inode {\n \t__le32  i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */\n \t__le32  i_version_hi;\t/* high 32 bits for 64-bit version */\n \t__le32\ti_projid;\t/* Project ID */\n+\t__le32\ti_ptime;\t\t/* Provenance time */\n+\t__le32\ti_ptime_extra;\t/* extra Provenance time (nsec << 2 | epoch) */\n };\n \n #define EXT4_EPOCH_BITS 2\n@@ -1136,6 +1138,7 @@ struct ext4_inode_info {\n \t * struct timespec64 i_{a,c,m}time in the generic inode.\n \t */\n \tstruct timespec64 i_crtime;\n+\tstruct timespec64 i_ptime;\n \n \t/* mballoc */\n \tatomic_t i_prealloc_active;\ndiff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 625cfbf61..15b6b6dc6 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -4753,6 +4753,7 @@ static int ext4_fill_raw_inode(struct inode *inode, struct ext4_inode *raw_inode\n \tEXT4_INODE_SET_MTIME(inode, raw_inode);\n \tEXT4_INODE_SET_ATIME(inode, raw_inode);\n \tEXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);\n+\tEXT4_EINODE_SET_XTIME(i_ptime, ei, raw_inode);\n \n \traw_inode->i_dtime = cpu_to_le32(ei->i_dtime);\n \traw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);\n@@ -5409,6 +5410,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,\n \tEXT4_INODE_GET_ATIME(inode, raw_inode);\n \tEXT4_INODE_GET_MTIME(inode, raw_inode);\n \tEXT4_EINODE_GET_XTIME(i_crtime, ei, raw_inode);\n+\tEXT4_EINODE_GET_XTIME(i_ptime, ei, raw_inode);\n \n \tif (likely(!test_opt2(inode->i_sb, HURD_COMPAT))) {\n \t\tu64 ivers = le32_to_cpu(raw_inode->i_disk_version);\n@@ -6061,6 +6063,9 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \tif (!error) {\n \t\tif (inc_ivers)\n \t\t\tinode_inc_iversion(inode);\n+\t\tif (attr->ia_valid & ATTR_PTIME)\n+\t\t\tEXT4_I(inode)->i_ptime = attr->ia_ptime;\n+\n \t\tsetattr_copy(idmap, inode, attr);\n \t\tmark_inode_dirty(inode);\n \t}\n@@ -6114,6 +6119,15 @@ int ext4_getattr(struct mnt_idmap *idmap, const struct path *path,\n \t\tstat->btime.tv_nsec = ei->i_crtime.tv_nsec;\n \t}\n \n+\t/* Report ptime from dedicated field, not crtime */\n+\tif ((request_mask & STATX_PTIME) &&\n+\t    EXT4_FITS_IN_INODE(raw_inode, ei, i_ptime) &&\n+\t    (ei->i_ptime.tv_sec || ei->i_ptime.tv_nsec)) {\n+\t\tstat->result_mask |= STATX_PTIME;\n+\t\tstat->ptime.tv_sec = ei->i_ptime.tv_sec;\n+\t\tstat->ptime.tv_nsec = ei->i_ptime.tv_nsec;\n+\t}\n+\n \t/*\n \t * Return the DIO alignment restrictions if requested.  We only return\n \t * this information when requested, since on encrypted files it might\ndiff --git a/fs/ext4/namei.c b/fs/ext4/namei.c\nindex c4b5e252a..1bfe4df24 100644\n--- a/fs/ext4/namei.c\n+++ b/fs/ext4/namei.c\n@@ -3942,6 +3942,19 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir,\n \t * rename.\n \t */\n \tinode_set_ctime_current(old.inode);\n+\n+\t/* ptime rename-over: preserve ptime across atomic saves */\n+\tif (new.inode && S_ISREG(old.inode->i_mode) &&\n+\t    S_ISREG(new.inode->i_mode) && old.inode->i_nlink == 1 &&\n+\t    !(flags & RENAME_WHITEOUT)) {\n+\t\tstruct ext4_inode_info *old_ei = EXT4_I(old.inode);\n+\t\tstruct ext4_inode_info *new_ei = EXT4_I(new.inode);\n+\n+\t\tif (!old_ei->i_ptime.tv_sec && !old_ei->i_ptime.tv_nsec &&\n+\t\t    (new_ei->i_ptime.tv_sec || new_ei->i_ptime.tv_nsec))\n+\t\t\told_ei->i_ptime = new_ei->i_ptime;\n+\t}\n+\n \tretval = ext4_mark_inode_dirty(handle, old.inode);\n \tif (unlikely(retval))\n \t\tgoto end_rename;\n",
    "prefixes": [
        "4/6"
    ]
}