Accessing CIFS DFS link for the first time

View: New views
3 Messages — Rating Filter:   Alert me  

Accessing CIFS DFS link for the first time

by Suresh Jayaraman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

The first access to a DFS link fails with -EREMOTE on a 2.6.27 based
kernel (haven't tested on the recent one, but looking at the code it
appears that the code in question has not changed).

#mount -t cifs -o username=administrator, domain=foo.dom.com
\\\\<ipaddress>\\DFSROOT /mnt/
(mount succeeds)
#cd /mnt
#cd DFS-test/ (DFS-test is a dfs link)
# ls
returns -EREMOTE

Looking at the cFYI information and code, it looks like cifs_readdir()
doesn't follow dfs links. Is it not supported, yet?

Possible handle -EREMOTE from FindFirst() in initiate_cifs_search() and
calling cifs_dfs_follow_mountpoint() would help fixing this?

Are there more details involved that I'm missing?

Thanks,

--
Suresh Jayaraman
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

Re: Accessing CIFS DFS link for the first time

by Steve French-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 7, 2009 at 7:39 AM, Suresh Jayaraman <sjayaraman@...> wrote:

> Hi all,
>
> The first access to a DFS link fails with -EREMOTE on a 2.6.27 based
> kernel (haven't tested on the recent one, but looking at the code it
> appears that the code in question has not changed).
>
> #mount -t cifs -o username=administrator, domain=foo.dom.com
> \\\\<ipaddress>\\DFSROOT /mnt/
> (mount succeeds)
> #cd /mnt
> #cd DFS-test/   (DFS-test is a dfs link)
> # ls
> returns -EREMOTE
>
> Looking at the cFYI information and code, it looks like cifs_readdir()
> doesn't follow dfs links. Is it not supported, yet?
>
> Possible handle -EREMOTE from FindFirst() in initiate_cifs_search() and
> calling cifs_dfs_follow_mountpoint() would help fixing this?

The lookup (QueryPathInfo) should get the EREMOTE before you even
get to readdir

> Are there more details involved that I'm missing?




--
Thanks,

Steve
_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client

Re: Accessing CIFS DFS link for the first time

by Q (Igor Mammedov) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Suresh Jayaraman wrote:
> Hi all,
>
> The first access to a DFS link fails with -EREMOTE on a 2.6.27 based
> kernel (haven't tested on the recent one, but looking at the code it
> appears that the code in question has not changed).

More or less complete DFS support appeared in cifs branch with
 1bfe73c258addc388b90fe8c2c6bbc0f0c9c10dd
Before it only dfs submounts were supported and the dfs root had to be
a regular share.

Since then there were several fixes to it.
And it looks like the last merge by Linus with a DFS related fix is
 6cdb5930a6fa0e35b236f4aa0e056001fe1384b4


>
> #mount -t cifs -o username=administrator, domain=foo.dom.com
> \\\\<ipaddress>\\DFSROOT /mnt/
> (mount succeeds)
> #cd /mnt
> #cd DFS-test/ (DFS-test is a dfs link)
> # ls
> returns -EREMOTE
>
> Looking at the cFYI information and code, it looks like cifs_readdir()
> doesn't follow dfs links. Is it not supported, yet?
>
> Possible handle -EREMOTE from FindFirst() in initiate_cifs_search() and
> calling cifs_dfs_follow_mountpoint() would help fixing this?
>
> Are there more details involved that I'm missing?
>
> Thanks,
>

--

Best regards,

-------------------------
Igor Mammedov,
niallain "at" gmail.com




_______________________________________________
linux-cifs-client mailing list
linux-cifs-client@...
https://lists.samba.org/mailman/listinfo/linux-cifs-client