Re: [PATCH v2] ksmbd-tools: add max connections parameter to global section

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

 



On (22/12/30 23:24), Namjae Jeon wrote:
[..]
> @@ -548,6 +548,16 @@ static gboolean global_group_kv(gpointer _k, gpointer _v, gpointer user_data)
>  		return TRUE;
>  	}
>  
> +	if (!cp_key_cmp(_k, "max connections")) {
> +		global_conf.max_connections = memparse(_v);
> +		if (global_conf.max_connections > KSMBD_CONF_MAX_CONNECTIONS) {
> +			pr_info("Limits exceeding the maximum simultaneous connections(%d)\n",
> +				KSMBD_CONF_MAX_CONNECTIONS);
> +			global_conf.max_connections = KSMBD_CONF_MAX_CONNECTIONS;
> +		}
> +		return TRUE;
> +	}

A quick question: do you want "max connections = 0" to be possible or
should ksmb never permit unlimited connections?

> +	global_conf.max_connections = 512;
>  }
[..]
> +	share->max_connections = 512;

A nit: may be have a define for default limit instead?



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

  Powered by Linux