1. 31 7月, 2018 2 次提交
  2. 27 7月, 2018 1 次提交
  3. 20 6月, 2018 7 次提交
  4. 19 6月, 2018 4 次提交
  5. 16 6月, 2018 4 次提交
  6. 15 6月, 2018 22 次提交
    • D
      afs: Optimise callback breaking by not repeating volume lookup · 47ea0f2e
      David Howells 提交于
      At the moment, afs_break_callbacks calls afs_break_one_callback() for each
      separate FID it was given, and the latter looks up the volume individually
      for each one.
      
      However, this is inefficient if two or more FIDs have the same vid as we
      could reuse the volume.  This is complicated by cell aliasing whereby we
      may have multiple cells sharing a volume and can therefore have multiple
      callback interests for any particular volume ID.
      
      At the moment afs_break_one_callback() scans the entire list of volumes
      we're getting from a server and breaks the appropriate callback in every
      matching volume, regardless of cell.  This scan is done for every FID.
      
      Optimise callback breaking by the following means:
      
       (1) Sort the FID list by vid so that all FIDs belonging to the same volume
           are clumped together.
      
           This is done through the use of an indirection table as we cannot do
           an insertion sort on the afs_callback_break array as we decode FIDs
           into it as we subsequently also have to decode callback info into it
           that corresponds by array index only.
      
           We also don't really want to bubblesort afterwards if we can avoid it.
      
       (2) Sort the server->cb_interests array by vid so that all the matching
           volumes are grouped together.  This permits the scan to stop after
           finding a record that has a higher vid.
      
       (3) When breaking FIDs, we try to keep server->cb_break_lock as long as
           possible, caching the start point in the array for that volume group
           as long as possible.
      
           It might make sense to add another layer in that list and have a
           refcounted volume ID anchor that has the matching interests attached
           to it rather than being in the list.  This would allow the lock to be
           dropped without losing the cursor.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      47ea0f2e
    • D
      afs: Display manually added cells in dynamic root mount · 0da0b7fd
      David Howells 提交于
      Alter the dynroot mount so that cells created by manipulation of
      /proc/fs/afs/cells and /proc/fs/afs/rootcell and by specification of a root
      cell as a module parameter will cause directories for those cells to be
      created in the dynamic root superblock for the network namespace[*].
      
      To this end:
      
       (1) Only one dynamic root superblock is now created per network namespace
           and this is shared between all attempts to mount it.  This makes it
           easier to find the superblock to modify.
      
       (2) When a dynamic root superblock is created, the list of cells is walked
           and directories created for each cell already defined.
      
       (3) When a new cell is added, if a dynamic root superblock exists, a
           directory is created for it.
      
       (4) When a cell is destroyed, the directory is removed.
      
       (5) These directories are created by calling lookup_one_len() on the root
           dir which automatically creates them if they don't exist.
      
      [*] Inasmuch as network namespaces are currently supported here.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      0da0b7fd
    • D
      afs: Enable IPv6 DNS lookups · c88d5a7f
      David Howells 提交于
      Remove the restriction on DNS lookup upcalls that prevents ipv6 addresses
      from being looked up.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      c88d5a7f
    • S
      d819d298
    • S
      smb3: do not display empty interface list · 115d5d28
      Steve French 提交于
      If server does not support listing interfaces then do not
      display empty "Server interfaces" line to avoid confusing users.
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      CC: Aurelien Aptel <aaptel@suse.com>
      115d5d28
    • S
      smb3: Fix mode on mkdir on smb311 mounts · bea851b8
      Steve French 提交于
      mkdir was not passing the mode on smb3.11 mounts with posix extensions
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      bea851b8
    • P
      cifs: Fix kernel oops when traceSMB is enabled · 662bf5bc
      Paulo Alcantara 提交于
      When traceSMB is enabled through 'echo 1 > /proc/fs/cifs/traceSMB', after a
      mount, the following oops is triggered:
      
      [   27.137943] BUG: unable to handle kernel paging request at
      ffff8800f80c268b
      [   27.143396] PGD 2c6b067 P4D 2c6b067 PUD 0
      [   27.145386] Oops: 0000 [#1] SMP PTI
      [   27.146186] CPU: 2 PID: 2655 Comm: mount.cifs Not tainted 4.17.0+ #39
      [   27.147174] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
      1.0.0-prebuilt.qemu-project.org 04/01/2014
      [   27.148969] RIP: 0010:hex_dump_to_buffer+0x413/0x4b0
      [   27.149738] Code: 48 8b 44 24 08 31 db 45 31 d2 48 89 6c 24 18 44 89
      6c 24 24 48 c7 c1 78 b5 23 82 4c 89 64 24 10 44 89 d5 41 89 dc 4c 8d 58
      02 <44> 0f b7 00 4d 89 dd eb 1f 83 c5 01 41 01 c4 41 39 ef 0f 84 48 fe
      [   27.152396] RSP: 0018:ffffc9000058f8c0 EFLAGS: 00010246
      [   27.153129] RAX: ffff8800f80c268b RBX: 0000000000000000 RCX:
      ffffffff8223b578
      [   27.153867] RDX: 0000000000000000 RSI: ffffffff81a55496 RDI:
      0000000000000008
      [   27.154612] RBP: 0000000000000000 R08: 0000000000000020 R09:
      0000000000000083
      [   27.155355] R10: 0000000000000000 R11: ffff8800f80c268d R12:
      0000000000000000
      [   27.156101] R13: 0000000000000002 R14: ffffc9000058f94d R15:
      0000000000000008
      [   27.156838] FS:  00007f1693a6b740(0000) GS:ffff88007fd00000(0000)
      knlGS:0000000000000000
      [   27.158354] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   27.159093] CR2: ffff8800f80c268b CR3: 00000000798fa001 CR4:
      0000000000360ee0
      [   27.159892] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
      0000000000000000
      [   27.160661] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
      0000000000000400
      [   27.161464] Call Trace:
      [   27.162123]  print_hex_dump+0xd3/0x160
      [   27.162814] journal-offline (2658) used greatest stack depth: 13144
      bytes left
      [   27.162824]  ? __release_sock+0x60/0xd0
      [   27.165344]  ? tcp_sendmsg+0x31/0x40
      [   27.166177]  dump_smb+0x39/0x40
      [   27.166972]  ? vsnprintf+0x236/0x490
      [   27.167807]  __smb_send_rqst.constprop.12+0x103/0x430
      [   27.168554]  ? apic_timer_interrupt+0xa/0x20
      [   27.169306]  smb_send_rqst+0x48/0xc0
      [   27.169984]  cifs_send_recv+0xda/0x420
      [   27.170639]  SMB2_negotiate+0x23d/0xfa0
      [   27.171301]  ? vsnprintf+0x236/0x490
      [   27.171961]  ? smb2_negotiate+0x19/0x30
      [   27.172586]  smb2_negotiate+0x19/0x30
      [   27.173257]  cifs_negotiate_protocol+0x70/0xd0
      [   27.173935]  ? kstrdup+0x43/0x60
      [   27.174551]  cifs_get_smb_ses+0x295/0xbe0
      [   27.175260]  ? lock_timer_base+0x67/0x80
      [   27.175936]  ? __internal_add_timer+0x1a/0x50
      [   27.176575]  ? add_timer+0x10f/0x230
      [   27.177267]  cifs_mount+0x101/0x1190
      [   27.177940]  ? cifs_smb3_do_mount+0x144/0x5c0
      [   27.178575]  cifs_smb3_do_mount+0x144/0x5c0
      [   27.179270]  mount_fs+0x35/0x150
      [   27.179930]  vfs_kern_mount.part.28+0x54/0xf0
      [   27.180567]  do_mount+0x5ad/0xc40
      [   27.181234]  ? kmem_cache_alloc_trace+0xed/0x1a0
      [   27.181916]  ksys_mount+0x80/0xd0
      [   27.182535]  __x64_sys_mount+0x21/0x30
      [   27.183220]  do_syscall_64+0x4e/0x100
      [   27.183882]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   27.184535] RIP: 0033:0x7f169339055a
      [   27.185192] Code: 48 8b 0d 41 d9 2b 00 f7 d8 64 89 01 48 83 c8 ff c3
      66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f
      05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0e d9 2b 00 f7 d8 64 89 01 48
      [   27.187268] RSP: 002b:00007fff7b44eb58 EFLAGS: 00000202 ORIG_RAX:
      00000000000000a5
      [   27.188515] RAX: ffffffffffffffda RBX: 00007f1693a7e70e RCX:
      00007f169339055a
      [   27.189244] RDX: 000055b9f97f64e5 RSI: 000055b9f97f652c RDI:
      00007fff7b45074f
      [   27.189974] RBP: 000055b9fb8c9260 R08: 000055b9fb8ca8f0 R09:
      0000000000000000
      [   27.190721] R10: 0000000000000000 R11: 0000000000000202 R12:
      000055b9fb8ca8f0
      [   27.191429] R13: 0000000000000000 R14: 00007f1693a7c000 R15:
      00007f1693a7e91d
      [   27.192167] Modules linked in:
      [   27.192797] CR2: ffff8800f80c268b
      [   27.193435] ---[ end trace 67404c618badf323 ]---
      
      The problem was that dump_smb() had been called with an invalid pointer,
      that is, in __smb_send_rqst(), iov[1] doesn't exist (n_vec == 1).
      
      This patch fixes it by relying on the n_vec value to dump out the smb
      packets.
      Signed-off-by: NPaulo Alcantara <palcantara@suse.de>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      662bf5bc
    • A
      CIFS: dump every session iface info · bc0fe8b2
      Aurelien Aptel 提交于
      Signed-off-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      bc0fe8b2
    • A
      fe856be4
    • A
      CIFS: add iface info to struct cifs_ses · b6f0dd5d
      Aurelien Aptel 提交于
      Signed-off-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      b6f0dd5d
    • A
      bead042c
    • A
      e2292430
    • P
      cifs: Fix encryption/signing · cd2dca60
      Paulo Alcantara 提交于
      Since the rfc1002 generation was moved down to __smb_send_rqst(),
      the transform header is now in rqst->rq_iov[0].
      
      Correctly assign the transform header pointer in crypt_message().
      Signed-off-by: NPaulo Alcantara <palcantara@suse.de>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      cd2dca60
    • R
    • R
      cifs: remove smb2_send_recv() · 40eff45b
      Ronnie Sahlberg 提交于
      Now that we have the plumbing to pass request without an rfc1002
      header all the way down to the point we write to the socket we no
      longer need the smb2_send_recv() function.
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      40eff45b
    • R
      cifs: push rfc1002 generation down the stack · c713c877
      Ronnie Sahlberg 提交于
      Move the generation of the 4 byte length field down the stack and
      generate it immediately before we start writing the data to the socket.
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c713c877
    • S
      smb3: increase initial number of credits requested to allow write · d409014e
      Steve French 提交于
      Compared to other clients the Linux smb3 client ramps up
      credits very slowly, taking more than 128 operations before a
      maximum size write could be sent (since the number of credits
      requested is only 2 per small operation, causing the credit
      limit to grow very slowly).
      
      This lack of credits initially would impact large i/o performance,
      when large i/o is tried early before enough credits are built up.
      Signed-off-by: NSteve French <stfrench@gmail.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      d409014e
    • R
      cifs: add lease tracking to the cached root fid · a93864d9
      Ronnie Sahlberg 提交于
      Use a read lease for the cached root fid so that we can detect
      when the content of the directory changes (via a break) at which time
      we close the handle. On next access to the root the handle will be reopened
      and cached again.
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      a93864d9
    • S
    • D
      afs: Show all of a server's addresses in /proc/fs/afs/servers · 0aac4bce
      David Howells 提交于
      Show all of a server's addresses in /proc/fs/afs/servers, placing the
      second plus addresses on padded lines of their own.  The current address is
      marked with a star.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      0aac4bce
    • D
      afs: Handle CONFIG_PROC_FS=n · b6cfbeca
      David Howells 提交于
      The AFS filesystem depends at the moment on /proc for configuration and
      also presents information that way - however, this causes a compilation
      failure if procfs is disabled.
      
      Fix it so that the procfs bits aren't compiled in if procfs is disabled.
      
      This means that you can't configure the AFS filesystem directly, but it is
      still usable provided that an up-to-date keyutils is installed to look up
      cells by SRV or AFSDB DNS records.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      b6cfbeca
    • D
      proc: Make inline name size calculation automatic · 24074a35
      David Howells 提交于
      Make calculation of the size of the inline name in struct proc_dir_entry
      automatic, rather than having to manually encode the numbers and failing to
      allow for lockdep.
      
      Require a minimum inline name size of 33+1 to allow for names that look
      like two hex numbers with a dash between.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      24074a35