[linux-cifs-client] Re: [PATCH 3/3] [CIFS] Enable dfs submounts to
handle remote referrals.
Igor Mammedov
niallain at gmail.com
Thu Apr 2 16:10:20 GMT 2009
Steve French wrote:
> I merged your updated patch 2 (patch 1 was merged earlier), but was
> not clear in the following patch (patch 3) why we no longer need to
> check flags for DFSREF_STORAGE_SERVER, are other types (both
> DFSREF_REFERRAL_SERVER and DFSREF_TARGET_FAILBACK) now ok and do not
> require special handling (I wasn't sure about what TARGET_FAILBACK
> does).
Now cifs supports only V3 style referrals only and by ms docs
TARGET_FAILBACK should be ignored by a client except for V4 referrals.
So we could ignore it for a while till we decide to add support for
V4 referrals.
>
> On Fri, Mar 27, 2009 at 11:43 AM, Jeff Layton <jlayton at redhat.com> wrote:
>> On Tue, 17 Mar 2009 19:44:32 +0300
>> Igor Mammedov <niallain at gmail.com> wrote:
>>
>>> From 73352e0f001d32812f9b18ae85aec35026b7a194 Mon Sep 17 00:00:00 2001
>>> From: Igor Mammedov <niallain at gmail.com>
>>> Date: Tue, 17 Mar 2009 19:00:30 +0300
>>> Subject: [PATCH 3/3] [CIFS] Enable dfs submounts to handle remote referrals.
>>>
>>> Having remote dfs root support in cifs_mount, we can
>>> afford to pass into it UNC that is remote.
>>>
>>> Signed-off-by: Igor Mammedov <niallain at gmail.com>
>>> ---
>>> fs/cifs/cifs_dfs_ref.c | 32 ++++++++++++++------------------
>>> 1 files changed, 14 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
>>> index 5fdbf8a..896b08f 100644
>>> --- a/fs/cifs/cifs_dfs_ref.c
>>> +++ b/fs/cifs/cifs_dfs_ref.c
>>> @@ -341,27 +341,23 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
>>>
>>> for (i = 0; i < num_referrals; i++) {
>>> dump_referral(referrals+i);
>>> - /* connect to a storage node */
>>> - if (referrals[i].flags & DFSREF_STORAGE_SERVER) {
>>> - int len;
>>> - len = strlen(referrals[i].node_name);
>>> - if (len < 2) {
>>> - cERROR(1, ("%s: Net Address path too short: %s",
>>> + /* connect to a node */
>>> + int len;
>>> + len = strlen(referrals[i].node_name);
>>> + if (len < 2) {
>>> + cERROR(1, ("%s: Net Address path too short: %s",
>>> __func__, referrals[i].node_name));
>>> - rc = -EINVAL;
>>> - goto out_err;
>>> - }
>>> - mnt = cifs_dfs_do_refmount(nd->path.mnt,
>>> - nd->path.dentry,
>>> - referrals + i);
>>> - cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p",
>>> - __func__,
>>> + rc = -EINVAL;
>>> + goto out_err;
>>> + }
>>> + mnt = cifs_dfs_do_refmount(nd->path.mnt,
>>> + nd->path.dentry, referrals + i);
>>> + cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__,
>>> referrals[i].node_name, mnt));
>>>
>>> - /* complete mount procedure if we accured submount */
>>> - if (!IS_ERR(mnt))
>>> - break;
>>> - }
>>> + /* complete mount procedure if we accured submount */
>>> + if (!IS_ERR(mnt))
>>> + break;
>>> }
>>>
>>> /* we need it cause for() above could exit without valid submount */
>>
>> Looks fine, though obviously patch #2 needs to go in first.
>>
>> --
>> Jeff Layton <jlayton at redhat.com>
>>
>
>
>
--
Best regards,
-------------------------
Igor Mammedov,
niallain "at" gmail.com
More information about the linux-cifs-client
mailing list