Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] CIFS: Add match_port check during looking for an existing connection (try #2)
Date: Tue, 16 Nov 2010 14:29:50 -0500	[thread overview]
Message-ID: <20101116142950.733d538e@corrin.poochiereds.net> (raw)
In-Reply-To: <AANLkTimS_nUbk3PMZf8QdZN1gXCUMGQFWSXFyXHBT0h=@mail.gmail.com>

On Tue, 16 Nov 2010 22:22:40 +0300
Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> 2010/11/16 Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>:
> 
> >
> > Now, to be pedantic...the code that Pavel proposed still isn't 100%
> > compliant with the description. If someone specifies port=139 and the
> > server is also listening on 445, a second mount with no port= option
> > will end up using the socket on 139. Still, I think his patches are
> > good enough here and that corner case really isn't worth sweating over
> > too much.
> 
> Jeff, I think it fully follow the description I proposed today:
> 
> "port=arg
> 
> sets the port number on the server to attempt to contact to negotiate
> CIFS support. If this value is specified, looking for an existing
> connection with this port and try to connect if no such a connection.
> Return an error if it fails.
> 
> If this value isn't specified, looking for an existing connection with
> 445 or 139 port. If no such a connection, try to connect with 445 port
> and if it fails - with 139 port. Return an error if both fail."
> 
> So, in your case the second mount without port specifying will end up
> with 139 and this is 100% compiliant with "If this value isn't
> specified, looking for an existing connection with 445 or 139 port".
> 
> So, it means that servers on 445 and 139 ports can't live together on
> the same host:)
> 

True. That manpage change would fully describe the behavior with your
patch in place. FWIW, it's common for servers to listen on both
ports.

The thing you won't be able to expect is to autonegotiate to 445
once you've got a socket connected to 139 on the same server. It
wouldn't be too hard to make that happen, but it's probably not worth
it.


Cheers,
-- 
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

  reply	other threads:[~2010-11-16 19:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16  7:48 [PATCH 1/2] CIFS: Simplify ipv*_connect functions into one (try #2) Pavel Shilovsky
     [not found] ` <1289893710-7352-1-git-send-email-piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-16  7:48   ` [PATCH 2/2] CIFS: Add match_port check during looking for an existing connection " Pavel Shilovsky
     [not found]     ` <1289893710-7352-2-git-send-email-piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-16 18:19       ` Jeff Layton
2010-11-16 18:47       ` Steve French
     [not found]         ` <AANLkTinX6o59YD2EAL4ahJoD1PBLNUCF-MXUss9yhZnd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-16 18:57           ` Jeff Layton
     [not found]             ` <20101116135714.358d6b10-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-11-16 19:02               ` Steve French
     [not found]                 ` <AANLkTimUVphDeWti-mid5jS2g-sF1jDVU7rMuyaPExUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-16 19:21                   ` Jeff Layton
2010-11-16 19:22               ` Pavel Shilovsky
2010-11-16 19:29                 ` Jeff Layton [this message]
2010-11-16 19:13           ` Pavel Shilovsky
2010-11-16 18:17   ` [PATCH 1/2] CIFS: Simplify ipv*_connect functions into one " Jeff Layton
     [not found]     ` <20101116131755.37043f53-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-11-16 18:25       ` Jeff Layton
     [not found]         ` <20101116132500.7865f16b-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-11-16 19:28           ` Pavel Shilovsky
2010-11-22 17:01   ` Jeff Layton
     [not found]     ` <20101122120145.20989d38-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-11-22 19:26       ` Pavel Shilovsky
     [not found]         ` <AANLkTi=V89tV62iyD+_DeSjwDBBVTfyfHMJ6t1mtBrCD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-22 19:51           ` Jeff Layton

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=20101116142950.733d538e@corrin.poochiereds.net \
    --to=jlayton-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox