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: 1055089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nvENbqSN"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44JQXl1s3Jz9s6w for ; Tue, 12 Mar 2019 17:48:22 +1100 (AEDT) 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 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