Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 1/3] smb: minor cleanup to remove unused function declaration
@ 2025-03-17 10:27 Bharath SM
  2025-03-17 10:27 ` [PATCH 2/3] smb: mark the new channel addition log as informational log with cifs_info Bharath SM
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bharath SM @ 2025-03-17 10:27 UTC (permalink / raw)
  To: linux-cifs, smfrench, sprasad, pc; +Cc: Bharath SM

remove cifs_writev_complete declaration from header file

Signed-off-by: Bharath SM <bharathsm@microsoft.com>
---
 fs/smb/client/cifsproto.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h
index 81680001944d..39322b4931da 100644
--- a/fs/smb/client/cifsproto.h
+++ b/fs/smb/client/cifsproto.h
@@ -592,7 +592,6 @@ int cifs_async_readv(struct cifs_io_subrequest *rdata);
 int cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid);
 
 void cifs_async_writev(struct cifs_io_subrequest *wdata);
-void cifs_writev_complete(struct work_struct *work);
 int cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 			  struct cifs_sb_info *cifs_sb,
 			  const unsigned char *path, char *pbuf,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] smb: mark the new channel addition log as informational log with cifs_info
  2025-03-17 10:27 [PATCH 1/3] smb: minor cleanup to remove unused function declaration Bharath SM
@ 2025-03-17 10:27 ` Bharath SM
  2025-03-17 10:27 ` [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels Bharath SM
  2025-03-18  4:01 ` [PATCH 1/3] smb: minor cleanup to remove unused function declaration Steve French
  2 siblings, 0 replies; 6+ messages in thread
From: Bharath SM @ 2025-03-17 10:27 UTC (permalink / raw)
  To: linux-cifs, smfrench, sprasad, pc; +Cc: Bharath SM

For multichannel mounts, when a new channel is successfully opened
we currently log 'successfully opened new channel on iface: <>' as
cifs_dbg(VFS..)  which is eventually translated into a pr_err log.
Marking these informational logs as error logs may lead to confusion
for users so they will now be logged as info logs instead.

Signed-off-by: Bharath SM <bharathsm@microsoft.com>
---
 fs/smb/client/sess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index faa80e7d54a6..b45b46b1b792 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -242,7 +242,7 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
 
 			iface->num_channels++;
 			iface->weight_fulfilled++;
-			cifs_dbg(VFS, "successfully opened new channel on iface:%pIS\n",
+			cifs_info("successfully opened new channel on iface:%pIS\n",
 				 &iface->sockaddr);
 			break;
 		}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
  2025-03-17 10:27 [PATCH 1/3] smb: minor cleanup to remove unused function declaration Bharath SM
  2025-03-17 10:27 ` [PATCH 2/3] smb: mark the new channel addition log as informational log with cifs_info Bharath SM
@ 2025-03-17 10:27 ` Bharath SM
  2025-06-17 11:04   ` Shyam Prasad N
  2025-03-18  4:01 ` [PATCH 1/3] smb: minor cleanup to remove unused function declaration Steve French
  2 siblings, 1 reply; 6+ messages in thread
From: Bharath SM @ 2025-03-17 10:27 UTC (permalink / raw)
  To: linux-cifs, smfrench, sprasad, pc; +Cc: Bharath SM, xfuren

When mounting a share with kerberos authentication with multichannel
support, share mounts correctly, but fails to create secondary
channels. This occurs because the hostname is not populated when
adding the channels. The hostname is necessary for the userspace
cifs.upcall program to retrieve the required credentials and pass
it back to kernel, without hostname secondary channels fails
establish.

Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Reported-by: xfuren <xfuren@gmail.com>
Link: https://bugzilla.samba.org/show_bug.cgi?id=15824
---
 fs/smb/client/sess.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index b45b46b1b792..f2ab8513c3ed 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
 	ctx->domainauto = ses->domainAuto;
 	ctx->domainname = ses->domainName;
 
-	/* no hostname for extra channels */
-	ctx->server_hostname = "";
+	ctx->server_hostname = ses->server->hostname;
 
 	ctx->username = ses->user_name;
 	ctx->password = ses->password;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] smb: minor cleanup to remove unused function declaration
  2025-03-17 10:27 [PATCH 1/3] smb: minor cleanup to remove unused function declaration Bharath SM
  2025-03-17 10:27 ` [PATCH 2/3] smb: mark the new channel addition log as informational log with cifs_info Bharath SM
  2025-03-17 10:27 ` [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels Bharath SM
@ 2025-03-18  4:01 ` Steve French
  2 siblings, 0 replies; 6+ messages in thread
From: Steve French @ 2025-03-18  4:01 UTC (permalink / raw)
  To: Bharath SM; +Cc: linux-cifs, sprasad, pc, Bharath SM

merged all three patches to cifs-2.6.git for-next pending additional
review/testing (added Paulo Reviewed-by)

On Mon, Mar 17, 2025 at 5:27 AM Bharath SM <bharathsm.hsk@gmail.com> wrote:
>
> remove cifs_writev_complete declaration from header file
>
> Signed-off-by: Bharath SM <bharathsm@microsoft.com>
> ---
>  fs/smb/client/cifsproto.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h
> index 81680001944d..39322b4931da 100644
> --- a/fs/smb/client/cifsproto.h
> +++ b/fs/smb/client/cifsproto.h
> @@ -592,7 +592,6 @@ int cifs_async_readv(struct cifs_io_subrequest *rdata);
>  int cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid);
>
>  void cifs_async_writev(struct cifs_io_subrequest *wdata);
> -void cifs_writev_complete(struct work_struct *work);
>  int cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
>                           struct cifs_sb_info *cifs_sb,
>                           const unsigned char *path, char *pbuf,
> --
> 2.43.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
  2025-03-17 10:27 ` [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels Bharath SM
@ 2025-06-17 11:04   ` Shyam Prasad N
  2025-06-17 13:19     ` Steve French
  0 siblings, 1 reply; 6+ messages in thread
From: Shyam Prasad N @ 2025-06-17 11:04 UTC (permalink / raw)
  To: Bharath SM; +Cc: linux-cifs, smfrench, sprasad, pc, Bharath SM, xfuren

On Mon, Mar 17, 2025 at 4:04 PM Bharath SM <bharathsm.hsk@gmail.com> wrote:
>
> When mounting a share with kerberos authentication with multichannel
> support, share mounts correctly, but fails to create secondary
> channels. This occurs because the hostname is not populated when
> adding the channels. The hostname is necessary for the userspace
> cifs.upcall program to retrieve the required credentials and pass
> it back to kernel, without hostname secondary channels fails
> establish.
>
> Signed-off-by: Bharath SM <bharathsm@microsoft.com>
> Reported-by: xfuren <xfuren@gmail.com>
> Link: https://bugzilla.samba.org/show_bug.cgi?id=15824
> ---
>  fs/smb/client/sess.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
> index b45b46b1b792..f2ab8513c3ed 100644
> --- a/fs/smb/client/sess.c
> +++ b/fs/smb/client/sess.c
> @@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
>         ctx->domainauto = ses->domainAuto;
>         ctx->domainname = ses->domainName;
>
> -       /* no hostname for extra channels */
> -       ctx->server_hostname = "";
> +       ctx->server_hostname = ses->server->hostname;
>
>         ctx->username = ses->user_name;
>         ctx->password = ses->password;
> --
> 2.43.0
>
>
Looks good to me.
This one depends on one of the patches I submitted recently:
"cifs: dns resolution is needed only for primary channel"

-- 
Regards,
Shyam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
  2025-06-17 11:04   ` Shyam Prasad N
@ 2025-06-17 13:19     ` Steve French
  0 siblings, 0 replies; 6+ messages in thread
From: Steve French @ 2025-06-17 13:19 UTC (permalink / raw)
  To: Shyam Prasad N; +Cc: Bharath SM, linux-cifs, sprasad, pc, Bharath SM, xfuren

added to cifs-2.6.git for-next

On Tue, Jun 17, 2025 at 6:05 AM Shyam Prasad N <nspmangalore@gmail.com> wrote:
>
> On Mon, Mar 17, 2025 at 4:04 PM Bharath SM <bharathsm.hsk@gmail.com> wrote:
> >
> > When mounting a share with kerberos authentication with multichannel
> > support, share mounts correctly, but fails to create secondary
> > channels. This occurs because the hostname is not populated when
> > adding the channels. The hostname is necessary for the userspace
> > cifs.upcall program to retrieve the required credentials and pass
> > it back to kernel, without hostname secondary channels fails
> > establish.
> >
> > Signed-off-by: Bharath SM <bharathsm@microsoft.com>
> > Reported-by: xfuren <xfuren@gmail.com>
> > Link: https://bugzilla.samba.org/show_bug.cgi?id=15824
> > ---
> >  fs/smb/client/sess.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
> > index b45b46b1b792..f2ab8513c3ed 100644
> > --- a/fs/smb/client/sess.c
> > +++ b/fs/smb/client/sess.c
> > @@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
> >         ctx->domainauto = ses->domainAuto;
> >         ctx->domainname = ses->domainName;
> >
> > -       /* no hostname for extra channels */
> > -       ctx->server_hostname = "";
> > +       ctx->server_hostname = ses->server->hostname;
> >
> >         ctx->username = ses->user_name;
> >         ctx->password = ses->password;
> > --
> > 2.43.0
> >
> >
> Looks good to me.
> This one depends on one of the patches I submitted recently:
> "cifs: dns resolution is needed only for primary channel"
>
> --
> Regards,
> Shyam



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-17 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 10:27 [PATCH 1/3] smb: minor cleanup to remove unused function declaration Bharath SM
2025-03-17 10:27 ` [PATCH 2/3] smb: mark the new channel addition log as informational log with cifs_info Bharath SM
2025-03-17 10:27 ` [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels Bharath SM
2025-06-17 11:04   ` Shyam Prasad N
2025-06-17 13:19     ` Steve French
2025-03-18  4:01 ` [PATCH 1/3] smb: minor cleanup to remove unused function declaration Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox