All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel-IBi9RG/b67k@public.gmane.org>
To: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] Fix regression which breaks DFS mounting
Date: Tue, 06 Sep 2016 20:29:58 +0200	[thread overview]
Message-ID: <mps1t0wswyh.fsf@suse.com> (raw)
In-Reply-To: <1473164554-8062-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]


This is not enough to fix DFS. I believe we also need [1] to handle DFS
links to subdirs.

I have SERVER_A with a DFS link to //SERVER_B/sub/dir.
cifs_are_all_path_accessible() and cifs_get_root() walk along the path
components and do queries on them. But they are not skipping the initial
host + share name on the UNC resulting in failed queries:

  CLIENT_A_____ -> SERVER_B____ SMB Trans2 Request,
      QUERY_PATH_INFO, Query File All Info, Path: //SERVER_B____
  SERVER_B____ -> CLIENT_A_____ SMB Trans2 Response,
      QUERY_PATH_INFO, Error: STATUS_OBJECT_NAME_NOT_FOUND

The QUERY_PATH_INFO request here is using the first path component which
is not a file path but an incomplete UNC path.

That path is made by cifs_build_path_to_root() which only makes a full
UNC path when in a DFS. It is not necessary on the servers I've tested
(cf [1]).

Therefore the fix is to not make a full UNC path in
cifs_build_path_to_root() or to add a flag to its parameters to decide
whether to prefix the host+share or not. I've sent patches for both
solution on the thread [1] (look at all the messages of the thread).

1: http://marc.info/?i=20160801143204.7377b5a4@aaptelpc

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  parent reply	other threads:[~2016-09-06 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 12:22 [PATCH] Fix regression which breaks DFS mounting Sachin Prabhu
     [not found] ` <1473164554-8062-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-06 18:29   ` Aurélien Aptel [this message]
     [not found]     ` <mps1t0wswyh.fsf-IBi9RG/b67k@public.gmane.org>
2016-09-07  9:02       ` Sachin Prabhu
     [not found]         ` <1473238975.3882.39.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-07 16:22           ` Aurélien Aptel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mps1t0wswyh.fsf@suse.com \
    --to=aaptel-ibi9rg/b67k@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.