Re: Does smbfs use 1 socket per target?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 15, 2018 at 11:58 AM, Matthew DeLoera <mmdeloera@xxxxxxxxx> wrote:
> I'm sorry if this is a vague question, but I hope someone can correct
> or affirm my understanding of smbfs socket behavior.

presumably you mean cifs.ko (CIFS/SMB3 kernel driver for Linux).  "smbfs"
is the name of the Mac (not Linux) driver (there was a much older
smbfs 20 years ago for Linux that predated cifs.ko)


> I read in the mount.cifs manpage for the "port=" option that it will
> use an existing connection to that port. So does this mean that
> regardless of how many files might be concurrently open on a single
> share, regardless how many processes are executing I/O requests, smbfs
> multiplexes all associated I/O blocks through the same single TCP
> connection?

Unlike Windows (which will use multiple connections to the same ip
address depending on what the server reports about its network
adapter), cifs.ko will only establish one socket connection to each
distinct ip address that it is mounted to.   In the future, as SMB3
"multi-channel" support progresses, you will see cases where multiple
connections are made for a mount from one client to one server
(depending on what the server reports as its available adapters).

> Is it a persistent connection for as long as the mount exists? (i.e.
> I'm using an fstab entry) Granted I know how to use netstat, but
> hoping someone might note something authoritative.

The server can (and will if no open files) sometimes disconnect the socket
(client reconnects automatically).  In addition, if the server is unresponsive
(does not respond to periodic SMB3 "echo" requests) the client will
drop the connection and reconnect.

> Can I infer that if I have 5 fstab entries to unique hosts, and mount
> -a, I'll have 5 outbound TCP connections?

Yes

-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux