From patchwork Tue Mar 12 06:48:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10848623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9F7D1575 for ; Tue, 12 Mar 2019 06:48:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3A5228E82 for ; Tue, 12 Mar 2019 06:48:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9559D2951F; Tue, 12 Mar 2019 06:48:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F50C28E82 for ; Tue, 12 Mar 2019 06:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbfCLGsW (ORCPT ); Tue, 12 Mar 2019 02:48:22 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:43661 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbfCLGsV (ORCPT ); Tue, 12 Mar 2019 02:48:21 -0400 Received: by mail-pf1-f178.google.com with SMTP id q17so1107011pfh.10 for ; Mon, 11 Mar 2019 23:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8m1D54tuRSoZ+icsMp+oG548NnlbDkDou5YNP2pg43Q=; b=nvENbqSNZ2H+EIjWoZvv2vZT0/G0STw02ZsrMZnab6a+oO7vNjou+/NF0IIruAfZv0 X7tukyBQxUXthcsr11UVg9BWtaXM1YkwV3Lc9CzzsQ4Uo1LIHeLavA9NVTT+t/um7l8p LdYspDevIK/+4VUOliRXTK08V4Q7KGtW9+YjaIuQIJ0m+yf3Hf8dRpYbzDGWyfj8gK3l akqwzXVbfXDaas7DE9QQDjPriy5tygo19LhkQfcTLn2LaMiY31+HYUUE4xZ8yTyq1mL1 pr2GRX5yptUDDyWOZaScRyDWVF3seMaLBncw4qxwt9vaB2yzO4I3gGTzpvLUfaj6RMQ6 kwCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8m1D54tuRSoZ+icsMp+oG548NnlbDkDou5YNP2pg43Q=; b=Q/mip5LdcFgH1DI1OUXLh6pAFOM73P+DHlBL5NPf7z5JaRnEeqHt8DsTZ3FtvaNX4W 0RBVPQoxlXbiSWtyAvjl/5Qy+Lhx+AEZQNk1uf99lODOKhOWb/2lOf5hayT3nYR0zATQ EEMatMJt+aK+d63OnSVCoeSZPHFB8+YOnqpy8BuhC2B1zr6PmTvCW11Z/qHJ11thKytw KWd2c5mVDhCFbH7bYcQzRYQD1iErdxJpMDaH5Esv6gNFS5+iYIALYLVjPxJcLAf7jTlu iaVO21cwsYGnUa9fcqyjpjVKbSOsZyjrzhlkE7XA+Lmb5SHB7sSygYN5H1ymuLVrYwk1 prUQ== X-Gm-Message-State: APjAAAWqbT5x4rAQPlWUvT0haZ1wiFJae0+gh496aLhb5gMydbmEuAaq Qn7NmyYtfRPx1XWSpzG5cBXcVso0QP6CY8EQac8MQ5EE X-Google-Smtp-Source: APXvYqwNPG3Xv9DhBYuE5tYOTsssmwz6Hdunl0yTqlAdjTxmWCwz+NMB81V2csky3FWCnhR5Sm1bUd40D8+RBiMiPRQ= X-Received: by 2002:a62:5385:: with SMTP id h127mr36469858pfb.10.1552373300142; Mon, 11 Mar 2019 23:48:20 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 12 Mar 2019 01:48:08 -0500 Message-ID: Subject: [PATCH] smb: Display volume serial number for shares in /proc/fs/cifs/DebugData To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Can be helpful for debugging Add volume serial number to /proc/fs/cifs/DebugData info on each share e.g.: Shares: 0) IPC: \\localhost\IPC$ Mounts: 1 DevInfo: 0x0 Attributes: 0x0 PathComponentMax: 0 Status: 1 type: 0 Serial Number: 0x0 Share Capabilities: None Share Flags: 0x0 tid: 0xf13518ce Maximal Access: 0x1f00a9 1) \\localhost\scratch Mounts: 1 DevInfo: 0x20 Attributes: 0x1006f PathComponentMax: 255 Status: 1 type: DISK Serial Number: 0xd50e5aa0 Share Capabilities: None Aligned, Partition Aligned, Share Flags: 0x0 tid: 0xb792fd24 Optimal sector size: 0x200 Maximal Access: 0x1f01ff From b6f0b10482ac6d2a1b968b736de5c049c60f8291 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 12 Mar 2019 01:29:03 -0500 Subject: [PATCH] smb3: display volume serial number for shares in /proc/fs/cifs/DebugData It can be helpful for debugging. According to MS-FSCC: "A 32-bit unsigned integer that contains the serial number of the volume. The serial number is an opaque value generated by the file system at format time" Signed-off-by: Steve French --- fs/cifs/cifs_debug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index faeb1452cc2d..13c1288b04a7 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -115,6 +115,9 @@ static void cifs_debug_tcon(struct seq_file *m, struct cifs_tcon *tcon) seq_puts(m, " type: CDROM "); else seq_printf(m, " type: %d ", dev_type); + + seq_printf(m, "Serial Number: 0x%x", tcon->vol_serial_number); + if ((tcon->seal) || (tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA)) -- 2.17.1