get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223184,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223184/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414161805.233686-1-bharathsm@microsoft.com/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/12/?format=api",
        "name": "Linux CIFS Client",
        "link_name": "linux-cifs-client",
        "list_id": "linux-cifs.vger.kernel.org",
        "list_email": "linux-cifs@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260414161805.233686-1-bharathsm@microsoft.com>",
    "date": "2026-04-14T16:18:02",
    "name": "[1/4] smb: client: add tracepoints for lock operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9f059f64218fef4783961d46d7f4695f75634205",
    "submitter": {
        "id": 86063,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/86063/?format=api",
        "name": "Bharath SM",
        "email": "bharathsm.hsk@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260414161805.233686-1-bharathsm@microsoft.com/mbox/",
    "series": [
        {
            "id": 499868,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499868/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=499868",
            "date": "2026-04-14T16:18:03",
            "name": "[1/4] smb: client: add tracepoints for lock operations",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499868/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223184/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223184/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10812-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-cifs@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.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=A4bTi5Yy;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10812-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"A4bTi5Yy\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.170",
            "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 sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw8hc1fSxz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 02:23:12 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 20F0E3053DFF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 16:18:14 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7758E3E5ECA;\n\tTue, 14 Apr 2026 16:18:13 +0000 (UTC)",
            "from mail-pf1-f170.google.com (mail-pf1-f170.google.com\n [209.85.210.170])\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 262511DFFD\n\tfor <linux-cifs@vger.kernel.org>; Tue, 14 Apr 2026 16:18:11 +0000 (UTC)",
            "by mail-pf1-f170.google.com with SMTP id\n d2e1a72fcca58-82f37c09352so1712539b3a.0\n        for <linux-cifs@vger.kernel.org>;\n Tue, 14 Apr 2026 09:18:11 -0700 (PDT)",
            "from bharathsm-Virtual-Machine.. ([167.220.110.101])\n        by smtp.googlemail.com with ESMTPSA id\n d2e1a72fcca58-82f0c30ee59sm15298585b3a.1.2026.04.14.09.18.10\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 14 Apr 2026 09:18:10 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776183493; cv=none;\n b=B18dRKQ3k2saxKH89DmOTfCbjxf1ytlCl3675Z6c7ny5eU4xx833U4zRykVg4eduyfzpRqnHJ+82UO0XG+6t1cXypauHJOsuwmKRFQpGOA/6LIQ+Fr40JB76fiRdW2ebCqhN5U5RGxjUfOo9QDwljaB/D3ytfeO2B5cnAOt0qmQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776183493; c=relaxed/simple;\n\tbh=nVJ+EzzCzMonFjaNwYvhzGXta/u8E0ZomWSlFMYf7zI=;\n\th=From:To:Subject:Date:Message-ID:MIME-Version;\n b=Pa4bW0uP2R6fu2SVLpwLUqE2vGi6hgjMzwI/CNrvn2FQ9e74I+6mRGYpZMpzdft4fBOUFauyp5G1kAahpi3oe0stjBUaWAVDInBM3rIGB7rgqNxPCTFm1TzLbKK6fjws8Koqb8XdERjZhTj0Zv4d6cGay5bXZ3r2cN8Nr+kGbr8=",
        "ARC-Authentication-Results": "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=A4bTi5Yy; arc=none smtp.client-ip=209.85.210.170",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776183491; x=1776788291;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:to\n         :from:from:to:cc:subject:date:message-id:reply-to;\n        bh=TUnElORk1CylRbeSfxzFXUT14s2LHPojbvEYU1HbPrQ=;\n        b=A4bTi5YyxKWtlxNzuN8D1lInbZBPl5+akwGQ8dvQqx8jbpBLcqQnYOq3i0iV4/I+1v\n         NjJx4ymmt5ZhXBR9FfXejVR3Fs6u/Q1QU8ErcIKur3SYjLGz+HreCVVAOoIZl0As4cGG\n         nGg9KBayp7yYAL5dwiXKIjNnyL7cRy/IftjcE65mro88dUjuSU3kmORMwZ7MMdq/6uVZ\n         0Xge33UYV0ptF62KLm28A5bxNJioWXS24Y2ILI1IrpWd3scE646yx/w51WuZ8ToQ7Me7\n         qJU3ARIHB7CnJjpJjmhwtl6yl/snZLbVGvQ16RBgo6xeKQcKChTFB1eyBI+ZnVlRhh+i\n         Kdrw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776183491; x=1776788291;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:to\n         :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=TUnElORk1CylRbeSfxzFXUT14s2LHPojbvEYU1HbPrQ=;\n        b=VXBIwOLh3mh0ojVbH1ndx7b9E34MW47f3tZi4SGils636g/mMtcPLjJm0aLBEOBSMX\n         07TnXedJuMWa2Buo1JDpDnWxE02uULITurCJ9IJ8HW2Zmwo/9SF7DIZ0pZ6cDU3zZShr\n         zLa5ntT+ZYg84+3j4UiNCg0yUkB+3bl7gP/hR0sGmhIHW/Xi2rOExyT42Yz67ljJK01d\n         QxPWkIuYj4aZxf2FOGnENwqZ7PKJBa1c4qP9mSTlacSDQ/GFMEbRbI1AnrW7cmLWpGpJ\n         hLgEvqQyNsf++UXHiAiKrLgMZZLTMnEqUQ+0XILpEw6NvswnjwC/soBeUaGlyqRsardo\n         QIZA==",
        "X-Gm-Message-State": "AOJu0YysiG2MdOUTy2dItPZ8cg3AvRig+jneUZq8Idmmuan8AtQbCB8d\n\tKf5f+0FG/1syQ/wbJHFXz7plZfFjS64SWE+iOQbAqUeQQXGGDtRPWJuPqHjtrygC",
        "X-Gm-Gg": "AeBDievJScx6K56UNOGyOlmbJYDaWHGYL1FEi3yDxEgbA6Gq8kiW/EZfkWk91nWm1Z+\n\tCHc1vBZ6/vsE6tkX13CfcJ3DmDwGS3+adJTiUOdt0Ydxr1aTs5TNcj8pTcOwo4V8+I4JOpNWuQp\n\tf+ySEXkfLdBnwjQ5Y6uP7lIdbRYuE+acS+r2JUnRK4epXqRiQOohofatkdG/FOdcX+04KWTUQnI\n\t01nE5vC4/CLhyR7/RboXOCVVntkaUtCSsSlahhfhOVEUgaduFguCtHoV2bjm4kzW5HIhImBpqtD\n\t+VJZgvFSVr3hK1koCDyJhZk3QIcRcj6bU9/dB2bfQVNvZB675+EXRyBaJCUByNv+5vMCbQ1H1dV\n\tgicDlAUB7XQ8iwV0NByFGMAPCAEjh8stG0Bk1+d4O78NB17xIGWmGVuL8pdStxa7aHROJpk3zCh\n\ta8eA8KypRLFibjfxVPfaoY6ErV4bDRWDKwsAVXnQeNQHG6VqEXxf/UXXtObjwC7g==",
        "X-Received": "by 2002:a05:6a00:1250:b0:82f:3017:6157 with SMTP id\n d2e1a72fcca58-82f3017684fmr8797709b3a.7.1776183490923;\n        Tue, 14 Apr 2026 09:18:10 -0700 (PDT)",
        "From": "Bharath SM <bharathsm.hsk@gmail.com>",
        "X-Google-Original-From": "Bharath SM <bharathsm@microsoft.com>",
        "To": "linux-cifs@vger.kernel.org,\n\tsmfrench@gmail.com,\n\tsprasad@microsoft.com,\n\tpc@manguebit.com,\n\tematsumiya@suse.de,\n\thenrique.carvalho@suse.com,\n\tbharathsm@microsoft.com",
        "Subject": "[PATCH 1/4] smb: client: add tracepoints for lock operations",
        "Date": "Tue, 14 Apr 2026 21:48:02 +0530",
        "Message-ID": "<20260414161805.233686-1-bharathsm@microsoft.com>",
        "X-Mailer": "git-send-email 2.48.1",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-cifs@vger.kernel.org",
        "List-Id": "<linux-cifs.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Add tracepoints when lock operations are sent to the\nserver with details including lock offset, length, and flags.\n\nsmb3_lock_enter: before sending lock request\nsmb3_lock_done: lock acquired successfully\nsmb3_lock_err: lock request failed\nsmb3_lock_cached: lock granted from local cache (no server roundtrip)\n\nSigned-off-by: Bharath SM <bharathsm@microsoft.com>\n---\n fs/smb/client/file.c    | 10 +++++--\n fs/smb/client/smb2pdu.c | 15 ++++++++++-\n fs/smb/client/trace.h   | 58 ++++++++++++++++++++++++++++++++++++++++-\n 3 files changed, 79 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c\nindex 5d5b49468aff..66a678a0e89f 100644\n--- a/fs/smb/client/file.c\n+++ b/fs/smb/client/file.c\n@@ -1712,7 +1712,7 @@ cifs_lock_add(struct cifsFileInfo *cfile, struct cifsLockInfo *lock)\n  */\n static int\n cifs_lock_add_if(struct cifsFileInfo *cfile, struct cifsLockInfo *lock,\n-\t\t bool wait)\n+\t\t bool wait, unsigned int xid)\n {\n \tstruct cifsLockInfo *conf_lock;\n \tstruct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry));\n@@ -1727,7 +1727,13 @@ cifs_lock_add_if(struct cifsFileInfo *cfile, struct cifsLockInfo *lock,\n \t\t\t\t\tlock->type, lock->flags, &conf_lock,\n \t\t\t\t\tCIFS_LOCK_OP);\n \tif (!exist && cinode->can_cache_brlcks) {\n+\t\tstruct cifs_tcon *tcon = tlink_tcon(cfile->tlink);\n+\n \t\tlist_add_tail(&lock->llist, &cfile->llist->locks);\n+\t\ttrace_smb3_lock_cached(xid, cfile->fid.persistent_fid,\n+\t\t\t\t       tcon->tid, tcon->ses->Suid,\n+\t\t\t\t       lock->offset, lock->length,\n+\t\t\t\t       lock->type, 1, 0);\n \t\tup_write(&cinode->lock_sem);\n \t\treturn rc;\n \t}\n@@ -2342,7 +2348,7 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,\n \t\tif (!lock)\n \t\t\treturn -ENOMEM;\n \n-\t\trc = cifs_lock_add_if(cfile, lock, wait_flag);\n+\t\trc = cifs_lock_add_if(cfile, lock, wait_flag, xid);\n \t\tif (rc < 0) {\n \t\t\tkfree(lock);\n \t\t\treturn rc;\ndiff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c\nindex 5188218c25be..61bae531959a 100644\n--- a/fs/smb/client/smb2pdu.c\n+++ b/fs/smb/client/smb2pdu.c\n@@ -6277,6 +6277,11 @@ smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,\n \t\tsmb2_set_replay(server, &rqst);\n \t}\n \n+\ttrace_smb3_lock_enter(xid, persist_fid, tcon->tid, tcon->ses->Suid,\n+\t\t\t      le64_to_cpu(buf[0].Offset),\n+\t\t\t      le64_to_cpu(buf[0].Length),\n+\t\t\t      le32_to_cpu(buf[0].Flags), num_lock, 0);\n+\n \trc = cifs_send_recv(xid, tcon->ses, server,\n \t\t\t    &rqst, &resp_buf_type, flags,\n \t\t\t    &rsp_iov);\n@@ -6285,7 +6290,15 @@ smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,\n \t\tcifs_dbg(FYI, \"Send error in smb2_lockv = %d\\n\", rc);\n \t\tcifs_stats_fail_inc(tcon, SMB2_LOCK_HE);\n \t\ttrace_smb3_lock_err(xid, persist_fid, tcon->tid,\n-\t\t\t\t    tcon->ses->Suid, rc);\n+\t\t\t\t    tcon->ses->Suid,\n+\t\t\t\t    le64_to_cpu(buf[0].Offset),\n+\t\t\t\t    le64_to_cpu(buf[0].Length),\n+\t\t\t\t    le32_to_cpu(buf[0].Flags), num_lock, rc);\n+\t} else {\n+\t\ttrace_smb3_lock_done(xid, persist_fid, tcon->tid, tcon->ses->Suid,\n+\t\t\t\t     le64_to_cpu(buf[0].Offset),\n+\t\t\t\t     le64_to_cpu(buf[0].Length),\n+\t\t\t\t     le32_to_cpu(buf[0].Flags), num_lock, 0);\n \t}\n \n \tif (is_replayable_error(rc) &&\ndiff --git a/fs/smb/client/trace.h b/fs/smb/client/trace.h\nindex acfbb63086ea..242c9da0283e 100644\n--- a/fs/smb/client/trace.h\n+++ b/fs/smb/client/trace.h\n@@ -670,9 +670,65 @@ DEFINE_EVENT(smb3_fd_err_class, smb3_##name,    \\\n \tTP_ARGS(xid, fid, tid, sesid, rc))\n \n DEFINE_SMB3_FD_ERR_EVENT(flush_err);\n-DEFINE_SMB3_FD_ERR_EVENT(lock_err);\n DEFINE_SMB3_FD_ERR_EVENT(close_err);\n \n+DECLARE_EVENT_CLASS(smb3_lock_class,\n+\tTP_PROTO(unsigned int xid,\n+\t\t__u64\tfid,\n+\t\t__u32\ttid,\n+\t\t__u64\tsesid,\n+\t\t__u64\toffset,\n+\t\t__u64\tlen,\n+\t\t__u32\tflags,\n+\t\t__u32\tnum_lock,\n+\t\tint\trc),\n+\tTP_ARGS(xid, fid, tid, sesid, offset, len, flags, num_lock, rc),\n+\tTP_STRUCT__entry(\n+\t\t__field(unsigned int, xid)\n+\t\t__field(__u64, fid)\n+\t\t__field(__u32, tid)\n+\t\t__field(__u64, sesid)\n+\t\t__field(__u64, offset)\n+\t\t__field(__u64, len)\n+\t\t__field(__u32, flags)\n+\t\t__field(__u32, num_lock)\n+\t\t__field(int, rc)\n+\t),\n+\tTP_fast_assign(\n+\t\t__entry->xid = xid;\n+\t\t__entry->fid = fid;\n+\t\t__entry->tid = tid;\n+\t\t__entry->sesid = sesid;\n+\t\t__entry->offset = offset;\n+\t\t__entry->len = len;\n+\t\t__entry->flags = flags;\n+\t\t__entry->num_lock = num_lock;\n+\t\t__entry->rc = rc;\n+\t),\n+\tTP_printk(\"xid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx len=0x%llx flags=0x%x num_lock=%u rc=%d\",\n+\t\t__entry->xid, __entry->sesid, __entry->tid, __entry->fid,\n+\t\t__entry->offset, __entry->len, __entry->flags, __entry->num_lock,\n+\t\t__entry->rc)\n+)\n+\n+#define DEFINE_SMB3_LOCK_EVENT(name)          \\\n+DEFINE_EVENT(smb3_lock_class, smb3_##name,    \\\n+\tTP_PROTO(unsigned int xid,\t\t\\\n+\t\t__u64\tfid,\t\t\t\\\n+\t\t__u32\ttid,\t\t\t\\\n+\t\t__u64\tsesid,\t\t\t\\\n+\t\t__u64\toffset,\t\t\t\\\n+\t\t__u64\tlen,\t\t\t\\\n+\t\t__u32\tflags,\t\t\t\\\n+\t\t__u32\tnum_lock,\t\t\\\n+\t\tint\trc),\t\t\t\\\n+\tTP_ARGS(xid, fid, tid, sesid, offset, len, flags, num_lock, rc))\n+\n+DEFINE_SMB3_LOCK_EVENT(lock_enter);\n+DEFINE_SMB3_LOCK_EVENT(lock_done);\n+DEFINE_SMB3_LOCK_EVENT(lock_err);\n+DEFINE_SMB3_LOCK_EVENT(lock_cached);\n+\n /*\n  * For handle based query/set info calls\n  */\n",
    "prefixes": [
        "1/4"
    ]
}