1. 01 Jun, 2018 9 commits
  2. 31 May, 2018 1 commit
    • Steve French's avatar
      smb3: add tracepoints for smb2/smb3 open · 28d59363
      Steve French authored
      add two tracepoints for open completion. One for error one for completion (open_done).
      Sample output below
      
                  TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
                     | |       |   ||||       |         |
                  bash-15348 [007] .... 42441.027492: smb3_enter: 	cifs_lookup: xid=45
                  bash-15348 [007] .... 42441.028214: smb3_cmd_err: 	sid=0x6173e4ce tid=0xa05150e6 cmd=5 mid=105 status=0xc0000034 rc=-2
                  bash-15348 [007] .... 42441.028219: smb3_open_err: xid=45 sid=0x6173e4ce tid=0xa05150e6 cr_opts=0x0 des_access=0x80 rc=-2
                  bash-15348 [007] .... 42441.028225: smb3_exit_done: 	cifs_lookup: xid=45
                fop777-24560 [002] .... 42442.627617: smb3_enter: 	cifs_revalidate_dentry_attr: xid=46
                fop777-24560 [003] .... 42442.628301: smb3_cmd_err: 	sid=0x6173e4ce tid=0xa05150e6 cmd=5 mid=106 status=0xc0000034 rc=-2
                fop777-24560 [003] .... 42442.628319: smb3_open_err: xid=46 sid=0x6173e4ce tid=0xa05150e6 cr_opts=0x0 des_access=0x80 rc=-2
                fop777-24560 [003] .... 42442.628335: smb3_enter: 	cifs_atomic_open: xid=47
                fop777-24560 [003] .... 42442.629587: smb3_cmd_done: 	sid=0x6173e4ce tid=0xa05150e6 cmd=5 mid=107
                fop777-24560 [003] .... 42442.629592: smb3_open_done: xid=47 sid=0x6173e4ce tid=0xa05150e6 fid=0xb8a0984d cr_opts=0x40 des_access=0x40000080
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      28d59363
  3. 30 May, 2018 15 commits
  4. 27 May, 2018 11 commits
    • Steve French's avatar
      smb3: Add ftrace tracepoints for improved SMB3 debugging · eccb4422
      Steve French authored
      Although dmesg logs and wireshark network traces can be
      helpful, being able to dynamically enable/disable tracepoints
      (in this case via the kernel ftrace mechanism) can also be
      helpful in more quickly debugging problems, and more
      selectively tracing the events related to the bug report.
      
      This patch adds 12 ftrace tracepoints to cifs.ko for SMB3 events
      in some obvious locations.  Subsequent patches will add more
      as needed.
      
      Example use:
         trace-cmd record -e cifs
         <run test case>
         trace-cmd show
      
      Various trace events can be filtered. See:
             trace-cmd list | grep cifs
      for the current list of cifs tracepoints.
      
      Sample output (from mount and writing to a file):
      
      root@smf:/sys/kernel/debug/tracing/events/cifs# trace-cmd show
      <snip>
            mount.cifs-6633  [006] ....  7246.936461: smb3_cmd_done: pid=6633 tid=0x0 sid=0x0 cmd=0 mid=0
            mount.cifs-6633  [006] ....  7246.936701: smb3_cmd_err:  pid=6633 tid=0x0 sid=0x3d9cf8e5 cmd=1 mid=1 status=0xc0000016 rc=-5
            mount.cifs-6633  [006] ....  7246.943055: smb3_cmd_done: pid=6633 tid=0x0 sid=0x3d9cf8e5 cmd=1 mid=2
            mount.cifs-6633  [006] ....  7246.943298: smb3_cmd_done: pid=6633 tid=0xf9447636 sid=0x3d9cf8e5 cmd=3 mid=3
            mount.cifs-6633  [006] ....  7246.943446: smb3_cmd_done: pid=6633 tid=0xf9447636 sid=0x3d9cf8e5 cmd=11 mid=4
            mount.cifs-6633  [006] ....  7246.943659: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=3 mid=5
            mount.cifs-6633  [006] ....  7246.943766: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=11 mid=6
            mount.cifs-6633  [006] ....  7246.943937: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=5 mid=7
            mount.cifs-6633  [006] ....  7246.944020: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=16 mid=8
            mount.cifs-6633  [006] ....  7246.944091: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=16 mid=9
            mount.cifs-6633  [006] ....  7246.944163: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=16 mid=10
            mount.cifs-6633  [006] ....  7246.944218: smb3_cmd_err:  pid=6633 tid=0xf9447636 sid=0x3d9cf8e5 cmd=11 mid=11 status=0xc0000225 rc=-2
            mount.cifs-6633  [006] ....  7246.944219: smb3_fsctl_err: xid=0 fid=0xffffffffffffffff tid=0xf9447636 sid=0x3d9cf8e5 class=0 type=393620 rc=-2
            mount.cifs-6633  [007] ....  7246.944353: smb3_cmd_done: pid=6633 tid=0xe1b781a sid=0x3d9cf8e5 cmd=16 mid=12
                  bash-2071  [000] ....  7256.903844: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=5 mid=13
                  bash-2071  [000] ....  7256.904172: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=16 mid=14
                  bash-2071  [000] ....  7256.904471: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=17 mid=15
                  bash-2071  [000] ....  7256.904950: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=5 mid=16
                  bash-2071  [000] ....  7256.905305: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=17 mid=17
                  bash-2071  [000] ....  7256.905688: smb3_cmd_done: pid=2071 tid=0xe1b781a sid=0x3d9cf8e5 cmd=6 mid=18
                  bash-2071  [000] ....  7256.905809: smb3_write_done: xid=0 fid=0xd628f511 tid=0xe1b781a sid=0x3d9cf8e5 offset=0x0 len=0x1b
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Acked-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      eccb4422
    • Steve French's avatar
    • Steve French's avatar
    • Ronnie Sahlberg's avatar
      cifs: add a new SMB2_close_flags function · 97ca1762
      Ronnie Sahlberg authored
      And make SMB2_close just a wrapper for SMB2_close_flags.
      We need this as we will start to send SMB2_CLOSE pdus using special
      flags.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      97ca1762
    • Ronnie Sahlberg's avatar
      cifs: store the leaseKey in the fid on SMB2_open · 96164ab2
      Ronnie Sahlberg authored
      In SMB2_open(), if we got a lease we need to store this in the fid structure
      or else we will never be able to map a lease break back to which file/fid
      it applies to.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      96164ab2
    • Steve French's avatar
      cifs: fix build break when CONFIG_CIFS_DEBUG2 enabled · 71992e62
      Steve French authored
      Previous patches "cifs: update calc_size to take a server argument"
      and
        "cifs: add server argument to the dump_detail method"
      were broken if CONFIG_CIFS_DEBUG2 enabled
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      CC: Ronnie Sahlberg <lsahlber@redhat.com>
      71992e62
    • Ronnie Sahlberg's avatar
      cifs: update calc_size to take a server argument · 9ec672bd
      Ronnie Sahlberg authored
      and change the smb2 version to take heder_preamble_size into account
      instead of hardcoding it as 4 bytes.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      9ec672bd
    • Ronnie Sahlberg's avatar
      cifs: add server argument to the dump_detail method · 14547f7d
      Ronnie Sahlberg authored
      We need a struct TCP_Server_Info *server to this method as it calls
      calc_size. The calc_size method will soon be changed to also
      take a server argument.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      14547f7d
    • Steve French's avatar
      smb3: fix redundant opens on root · 3d4ef9a1
      Steve French authored
      In SMB2/SMB3 unlike in cifs we unnecessarily open the root of the share
      over and over again in various places during mount and path revalidation
      and also in statfs.  This patch cuts redundant traffic (opens and closes)
      by simply keeping the directory handle for the root around (and reopening
      it as needed on reconnect), so query calls don't require three round
      trips to copmlete - just one, and eases load on network, client and
      server (on mount alone, cuts network traffic by more than a third).
      
      Also add a new cifs mount parm "nohandlecache" to allow users whose
      servers might have resource constraints (eg in case they have a server
      with so many users connecting to it that this extra handle per mount
      could possibly be a resource concern).
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      3d4ef9a1
    • Linus Torvalds's avatar
      Linux 4.17-rc7 · b04e2177
      Linus Torvalds authored
      b04e2177
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.17-2' of... · 861d9dd3
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull more Kbuild fixes from Masahiro Yamada:
      
       - enable '-fno-tree-loop-im' only when supported
      
       - add '-fno-PIE' option before the asm-goto test
      
      * tag 'kbuild-fixes-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        Makefile: disable PIE before testing asm goto
        kbuild: gcov: enable -fno-tree-loop-im if supported
      861d9dd3
  5. 26 May, 2018 4 commits