01 Jun, 2020

1 commit

  • Use pr_fmt to standardize all logging for fs/cifs.

    Some logging output had no CIFS: specific prefix.

    Now all output has one of three prefixes:

    o CIFS:
    o CIFS: VFS:
    o Root-CIFS:

    Miscellanea:

    o Convert printks to pr_
    o Neaten macro definitions
    o Remove embedded CIFS: prefixes from formats
    o Convert "illegal" to "invalid"
    o Coalesce formats
    o Add missing '\n' format terminations
    o Consolidate multiple cifs_dbg continuations into single calls
    o More consistent use of upper case first word output logging
    o Multiline statement argument alignment and wrapping

    Signed-off-by: Joe Perches
    Signed-off-by: Steve French

    Joe Perches
     

08 Apr, 2020

5 commits


30 Mar, 2020

2 commits


25 Nov, 2019

4 commits


05 Aug, 2019

1 commit

  • Send and Receive completion is handled on a single CPU selected at
    the time each Completion Queue is allocated. Typically this is when
    an initiator instantiates an RDMA transport, or when a target
    accepts an RDMA connection.

    Some ULPs cannot open a connection per CPU to spread completion
    workload across available CPUs and MSI vectors. For such ULPs,
    provide an API that allows the RDMA core to select a completion
    vector based on the device's complement of available comp_vecs.

    ULPs that invoke ib_alloc_cq() with only comp_vector 0 are converted
    to use the new API so that their completion workloads interfere less
    with each other.

    Suggested-by: Håkon Bugge
    Signed-off-by: Chuck Lever
    Reviewed-by: Leon Romanovsky
    Cc:
    Cc:
    Link: https://lore.kernel.org/r/20190729171923.13428.52555.stgit@manet.1015granger.net
    Signed-off-by: Doug Ledford

    Chuck Lever
     

31 May, 2019

1 commit

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

15 May, 2019

1 commit


08 May, 2019

5 commits

  • To support compounding, __smb_send_rqst() now sends an array of requests to
    the transport layer.
    Change smbd_send() to take an array of requests, and send them in as few
    packets as possible.

    Signed-off-by: Long Li
    Signed-off-by: Steve French
    CC: Stable

    Long Li
     
  • Failure to send a packet doesn't mean it's a permanent failure, it can't be
    returned to user process. This I/O should be retried or failed based on
    server packet response and transport health. This logic is handled by the
    upper layer.

    Give this decision to upper layer.

    Signed-off-by: Long Li
    Signed-off-by: Steve French

    Long Li
     
  • When packets are waiting for outbound I/O and interrupted, return the
    proper error code to user process.

    Signed-off-by: Long Li
    Signed-off-by: Steve French

    Long Li
     
  • Now upper layer is handling the transport shutdown and reconnect, remove
    the code that handling transport shutdown on RDMA disconnect.

    Signed-off-by: Long Li
    Signed-off-by: Steve French

    Long Li
     
  • On transport recoonect, upper layer CIFS code destroys the current
    transport and then recoonect. This code path is not used by SMBD, in that
    SMBD destroys its transport on RDMA disconnect notification independent of
    CIFS upper layer behavior.

    This approach adds some costs to SMBD layer to handle transport shutdown
    and restart, and to deal with several racing conditions on reconnecting
    transport.

    Re-work this code path by introducing a new smbd_destroy. This function is
    called form upper layer to ask SMBD to destroy the transport. SMBD will no
    longer need to destroy the transport by itself while worrying about data
    transfer is in progress. The upper layer guarantees the transport is
    locked.

    change log:
    v2: fix build errors when CONFIG_CIFS_SMB_DIRECT is not configured

    Signed-off-by: Long Li
    Signed-off-by: Steve French

    Long Li
     

05 Mar, 2019

1 commit

  • a trivial patch that replaces all use of snprintf with scnprintf.
    scnprintf() is generally seen as a safer function to use than
    snprintf for many use cases.

    In our case, there is no actual difference between the two since we never
    look at the return value. Thus we did not have any of the bugs that
    scnprintf protects against and the patch does nothing.

    However, for people reading our code it will be a receipt that we
    have done our due dilligence and checked our code for this type of bugs.

    See the presentation "Making C Less Dangerous In The Linux Kernel"
    at this years LCA

    Signed-off-by: Ronnie Sahlberg
    Signed-off-by: Steve French

    Ronnie Sahlberg
     

12 Dec, 2018

1 commit


02 Nov, 2018

1 commit

  • Pull AFS updates from Al Viro:
    "AFS series, with some iov_iter bits included"

    * 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
    missing bits of "iov_iter: Separate type from direction and use accessor functions"
    afs: Probe multiple fileservers simultaneously
    afs: Fix callback handling
    afs: Eliminate the address pointer from the address list cursor
    afs: Allow dumping of server cursor on operation failure
    afs: Implement YFS support in the fs client
    afs: Expand data structure fields to support YFS
    afs: Get the target vnode in afs_rmdir() and get a callback on it
    afs: Calc callback expiry in op reply delivery
    afs: Fix FS.FetchStatus delivery from updating wrong vnode
    afs: Implement the YFS cache manager service
    afs: Remove callback details from afs_callback_break struct
    afs: Commit the status on a new file/dir/symlink
    afs: Increase to 64-bit volume ID and 96-bit vnode ID for YFS
    afs: Don't invoke the server to read data beyond EOF
    afs: Add a couple of tracepoints to log I/O errors
    afs: Handle EIO from delivery function
    afs: Fix TTL on VL server and address lists
    afs: Implement VL server rotation
    afs: Improve FS server rotation error handling
    ...

    Linus Torvalds
     

24 Oct, 2018

2 commits


17 Aug, 2018

1 commit

  • Resolve merge conflicts from the -rc cycle against the rdma.git tree:

    Conflicts:
    drivers/infiniband/core/uverbs_cmd.c
    - New ifs added to ib_uverbs_ex_create_flow in -rc and for-next
    - Merge removal of file->ucontext in for-next with new code in -rc
    drivers/infiniband/core/uverbs_main.c
    - for-next removed code from ib_uverbs_write() that was modified
    in for-rc

    Signed-off-by: Jason Gunthorpe

    Jason Gunthorpe
     

25 Jul, 2018

1 commit


06 Jul, 2018

1 commit

  • SMB1 mounting broke in commit 35e2cc1ba755
    ("cifs: Use correct packet length in SMB2_TRANSFORM header")
    Fix it and also rename smb2_rqst_len to smb_rqst_len
    to make it less unobvious that the function is also called from
    CIFS/SMB1

    Good job by Paulo reviewing and cleaning up Ronnie's original patch.

    Signed-off-by: Ronnie Sahlberg
    Reviewed-by: Paulo Alcantara
    Signed-off-by: Steve French

    Ronnie Sahlberg
     

19 Jun, 2018

1 commit

  • This patch replaces the ib_device_attr.max_sge with max_send_sge and
    max_recv_sge. It allows ulps to take advantage of devices that have very
    different send and recv sge depths. For example cxgb4 has a max_recv_sge
    of 4, yet a max_send_sge of 16. Splitting out these attributes allows
    much more efficient use of the SQ for cxgb4 with ulps that use the RDMA_RW
    API. Consider a large RDMA WRITE that has 16 scattergather entries.
    With max_sge of 4, the ulp would send 4 WRITE WRs, but with max_sge of
    16, it can be done with 1 WRITE WR.

    Acked-by: Sagi Grimberg
    Acked-by: Christoph Hellwig
    Acked-by: Selvin Xavier
    Acked-by: Shiraz Saleem
    Acked-by: Dennis Dalessandro
    Signed-off-by: Steve Wise
    Signed-off-by: Jason Gunthorpe

    Steve Wise
     

16 Jun, 2018

1 commit

  • In smb3_init_transform_rq(), 'orig_len' was only counting the request
    length, but forgot to count any data pages in the request.

    Writing or creating files with the 'seal' mount option was broken.

    In addition, do some code refactoring by exporting smb2_rqst_len() to
    calculate the appropriate packet size and avoid duplicating the same
    calculation all over the code.

    The start of the io vector is either the rfc1002 length (4 bytes) or a
    SMB2 header which is always > 4. Use this fact to check and skip the
    rfc1002 length if requested.

    Signed-off-by: Paulo Alcantara
    Reviewed-by: Aurelien Aptel
    Signed-off-by: Steve French

    Paulo Alcantara
     

06 Jun, 2018

3 commits


26 Apr, 2018

1 commit

  • It's not necessary to allocate another iov when going through the buffers
    in smbd_send() through RDMA send.

    Remove it to reduce stack size.

    Thanks to Matt for spotting a printk typo in the earlier version of this.

    CC: Matt Redfearn
    Signed-off-by: Long Li
    Acked-by: Ronnie Sahlberg
    Cc: stable@vger.kernel.org
    Signed-off-by: Steve French

    Long Li
     

21 Apr, 2018

1 commit


19 Apr, 2018

1 commit

  • When sending the last iov that breaks into smaller buffers to fit the
    transfer size, it's necessary to check if this is the last iov.

    If this is the latest iov, stop and proceed to send pages.

    Signed-off-by: Long Li
    Cc: stable@vger.kernel.org
    Signed-off-by: Steve French
    Reviewed-by: Ronnie Sahlberg

    Long Li
     

02 Apr, 2018

3 commits

  • On RDMA errors, transport should disconnect the RDMA CM connection. This
    will notify the upper layer, and it will attempt transport reconnect.

    Signed-off-by: Long Li
    Signed-off-by: Steve French
    Reviewed-by: Ronnie Sahlberg
    CC: Stable

    Long Li
     
  • During transport reconnect, other processes may have registered memory
    and blocked on transport. This creates a deadlock situation because the
    transport resources can't be freed, and reconnect is blocked.

    Fix this by returning to upper layer on timeout. Before returning,
    transport status is set to reconnecting so other processes will release
    memory registration resources.

    Upper layer will retry the reconnect. This is not in fast I/O path so
    setting the timeout to 5 seconds.

    Signed-off-by: Long Li
    Signed-off-by: Steve French
    Reviewed-by: Ronnie Sahlberg
    CC: Stable

    Long Li
     
  • Trivial fix to spelling mistake in log_rdma_send and log_rdma_mr
    message text.

    Signed-off-by: Colin Ian King
    Signed-off-by: Steve French
    Reviewed-by: Aurelien Aptel

    Colin Ian King
     

07 Feb, 2018

1 commit