1. 27 6月, 2013 6 次提交
    • J
      revalidate directories instiantiated via FIND_* in order to handle DFS referrals · 2a2c41c0
      Jeff Layton 提交于
      We've had a long-standing problem with DFS referral points. CIFS servers
      generally try to make them look like directories in FIND_FIRST/NEXT
      responses. When you go to try to do a FIND_FIRST on them though, the
      server will then (correctly) return STATUS_PATH_NOT_COVERED. Mostly this
      manifests as spurious EREMOTE errors back to userland.
      
      This patch attempts to fix this by marking directories that are
      discovered via FIND_FIRST/NEXT for revaldiation. When the lookup code
      runs across them again, we'll reissue a QPathInfo against them and that
      will make it chase the referral properly.
      
      There is some performance penalty involved here and no I haven't
      measured it -- it'll be highly dependent upon the workload and contents
      of the mounted share. To try and mitigate that though, the code only
      marks the inode for revalidation when it's possible to run across a DFS
      referral. i.e.: when the kernel has DFS support built in and the share
      is "in DFS"
      
      [At the Microsoft plugfest we noted that usually the DFS links had
      the REPARSE attribute tag enabled - DFS junctions are reparse points
      after all - so I just added a check for that flag too so the
      performance impact should be smaller - Steve]
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2a2c41c0
    • S
      SMB2 FSCTL and IOCTL worker function · 4a72dafa
      Steve French 提交于
      This worker function is needed to send SMB2 fsctl
      (and ioctl) requests including:
      
      validating negotiation info (secure negotiate)
      querying the servers network interfaces
      copy offload (refcopy)
      
      Followon patches for the above three will use this.
      This patch also does general validation of the response.
      
      In the future, as David Disseldorp notes, for the copychunk ioctl
      case, we will want to enhance the response processing to allow
      returning the chunk request limits to the caller (even
      though the server returns an error, in that case we would
      return data that the caller could use - see 2.2.32.1).
      
      See MS-SMB2 Section 2.2.31 for more details on format of fsctl.
      Acked-by: NPavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      4a72dafa
    • S
      Charge at least one credit, if server says that it supports multicredit · 2b80d049
      Steve French 提交于
      In SMB2.1 and later the server will usually set the large MTU flag, and
      we need to charge at least one credit, if server says that since
      it supports multicredit.  Windows seems to let us get away with putting
      a zero there, but they confirmed that it is wrong and the spec says
      to put one there (if the request is under 64K and the CAP_LARGE_MTU
      was returned during protocol negotiation by the server.
      
      CC: Pavel Shilovsky <piastry@etersoft.ru>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2b80d049
    • S
      Remove typo · 7f653858
      Steve French 提交于
      Cut and paste likely introduced accidentally inserted spurious #define
      in d60622eb causes no harm but looks weird
      Signed-off-by: NSteve French <smfrench@gmail.com>
      7f653858
    • S
      Some missing share flags · c8664730
      Steve French 提交于
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c8664730
    • Z
      cifs: using strlcpy instead of strncpy · 46b51d08
      Zhao Hongjiang 提交于
      for NUL terminated string, need alway set '\0' in the end.
      Signed-off-by: NZhao Hongjiang <zhaohongjiang@huawei.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      46b51d08
  2. 24 6月, 2013 26 次提交
  3. 23 6月, 2013 8 次提交