linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* query fs info level 0x100
@ 2024-04-28 23:27 Steve French
  2024-04-29  5:31 ` Ralph Boehme
  0 siblings, 1 reply; 7+ messages in thread
From: Steve French @ 2024-04-28 23:27 UTC (permalink / raw)
  To: Ralph Böhme, samba-technical; +Cc: Volker.Lendecke, Jeremy Allison, CIFS

Trying some xfstests to current Samba (master branch, Samba 4.21),
they fail because query fs info (level 0x100) is returning
STATUS_INVALID_INFO_CLASS) - this works to ksmbd and I thought it used
to work to Samba.   I do see the SMB3.1.1 opens with the POSIX open
context works - but the query fs info failing causes xfstests to fail.

Is that missing rom current mainline Samba?

-- 
Thanks,

Steve

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

* Re: query fs info level 0x100
  2024-04-28 23:27 query fs info level 0x100 Steve French
@ 2024-04-29  5:31 ` Ralph Boehme
  2024-04-29 16:13   ` Steve French
  0 siblings, 1 reply; 7+ messages in thread
From: Ralph Boehme @ 2024-04-29  5:31 UTC (permalink / raw)
  To: Steve French, samba-technical; +Cc: Volker.Lendecke, Jeremy Allison, CIFS


[-- Attachment #1.1: Type: text/plain, Size: 533 bytes --]

On 4/29/24 1:27 AM, Steve French wrote:
> Trying some xfstests to current Samba (master branch, Samba 4.21),
> they fail because query fs info (level 0x100) is returning
> STATUS_INVALID_INFO_CLASS) - this works to ksmbd and I thought it used
> to work to Samba.   I do see the SMB3.1.1 opens with the POSIX open
> context works - but the query fs info failing causes xfstests to fail.
> 
> Is that missing rom current mainline Samba?

have you enabled SMB3 UNIX Extensions?

smb3 unix extensions = yes

Cheers!
-slow

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

* Re: query fs info level 0x100
  2024-04-29  5:31 ` Ralph Boehme
@ 2024-04-29 16:13   ` Steve French
  2024-04-29 16:37     ` Stefan Metzmacher
  2024-04-29 16:44     ` Ralph Boehme
  0 siblings, 2 replies; 7+ messages in thread
From: Steve French @ 2024-04-29 16:13 UTC (permalink / raw)
  To: Ralph Boehme; +Cc: samba-technical, Volker.Lendecke, Jeremy Allison, CIFS

On Mon, Apr 29, 2024 at 12:31 AM Ralph Boehme <slow@samba.org> wrote:
>
> On 4/29/24 1:27 AM, Steve French wrote:
> > Trying some xfstests to current Samba (master branch, Samba 4.21),
> > they fail because query fs info (level 0x100) is returning
> > STATUS_INVALID_INFO_CLASS) - this works to ksmbd and I thought it used
> > to work to Samba.   I do see the SMB3.1.1 opens with the POSIX open
> > context works - but the query fs info failing causes xfstests to fail.
> >
> > Is that missing rom current mainline Samba?
>
> have you enabled SMB3 UNIX Extensions?
>
> smb3 unix extensions = yes

Yes - it is set to yes in the smb.conf for both the global section and
the per share section

I also see that POSIX extensions in:
1) the server returns posix negotiation context in the SMB3.1.1
negotiate protocol response
2) the server returns the level 100 (FILE_POSIX_INFO) query info responses

But the (current Samba) server fails the level 100 (level 0x64 in hex)
FS_POSIX_INFO with "STATUS_INVALID_ERROR_CLASS"
which causes all xfstests to break since they can't verify the mount
(e.g. with "stat -f").
Nothing related to this on the client has changed, and ksmbd has
always supported this so works fine there.


-- 
Thanks,

Steve

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

* Re: query fs info level 0x100
  2024-04-29 16:13   ` Steve French
@ 2024-04-29 16:37     ` Stefan Metzmacher
  2024-04-29 16:44     ` Ralph Boehme
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Metzmacher @ 2024-04-29 16:37 UTC (permalink / raw)
  To: Steve French, Ralph Boehme
  Cc: CIFS, Volker.Lendecke, samba-technical, Jeremy Allison

Am 29.04.24 um 18:13 schrieb Steve French via samba-technical:
> On Mon, Apr 29, 2024 at 12:31 AM Ralph Boehme <slow@samba.org> wrote:
>>
>> On 4/29/24 1:27 AM, Steve French wrote:
>>> Trying some xfstests to current Samba (master branch, Samba 4.21),
>>> they fail because query fs info (level 0x100) is returning
>>> STATUS_INVALID_INFO_CLASS) - this works to ksmbd and I thought it used
>>> to work to Samba.   I do see the SMB3.1.1 opens with the POSIX open
>>> context works - but the query fs info failing causes xfstests to fail.
>>>
>>> Is that missing rom current mainline Samba?
>>
>> have you enabled SMB3 UNIX Extensions?
>>
>> smb3 unix extensions = yes
> 
> Yes - it is set to yes in the smb.conf for both the global section and
> the per share section
> 
> I also see that POSIX extensions in:
> 1) the server returns posix negotiation context in the SMB3.1.1
> negotiate protocol response
> 2) the server returns the level 100 (FILE_POSIX_INFO) query info responses
> 
> But the (current Samba) server fails the level 100 (level 0x64 in hex)
> FS_POSIX_INFO with "STATUS_INVALID_ERROR_CLASS"
> which causes all xfstests to break since they can't verify the mount
> (e.g. with "stat -f").
> Nothing related to this on the client has changed, and ksmbd has
> always supported this so works fine there.

I guess fsinfo_unix_valid_level() needs
fsp->posix_flags & FSP_POSIX_FLAGS_OPEN
instead of
fsp->posix_flags == FSP_POSIX_FLAGS_OPEN

In smbd_do_qfilepathinfo() we do the check with '&' instead of '=='.

metze

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

* Re: query fs info level 0x100
  2024-04-29 16:13   ` Steve French
  2024-04-29 16:37     ` Stefan Metzmacher
@ 2024-04-29 16:44     ` Ralph Boehme
  2024-04-29 17:11       ` Jeremy Allison
  1 sibling, 1 reply; 7+ messages in thread
From: Ralph Boehme @ 2024-04-29 16:44 UTC (permalink / raw)
  To: Steve French; +Cc: samba-technical, Jeremy Allison, CIFS


[-- Attachment #1.1.1: Type: text/plain, Size: 445 bytes --]

On 4/29/24 6:13 PM, Steve French wrote:
> But the (current Samba) server fails the level 100 (level 0x64 in hex)
> FS_POSIX_INFO with "STATUS_INVALID_ERROR_CLASS"
> which causes all xfstests to break since they can't verify the mount
> (e.g. with "stat -f").
> Nothing related to this on the client has changed, and ksmbd has
> always supported this so works fine there.

ah, I broke it. Fix attached. Really embarrassing...

-slow


[-- Attachment #1.1.2: bug15639-master.patch --]
[-- Type: text/x-patch, Size: 989 bytes --]

From 3862563582683f86a1fd5d25422b3137f1b05141 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow@samba.org>
Date: Mon, 29 Apr 2024 18:38:10 +0200
Subject: [PATCH] smbd: SMB3 POSIX Extensions statfs() is broken

Regression introduced by 55d98b29eb294542cc4947573f233e0d5e6966cb. D'oh!

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15639

Signed-off-by: Ralph Boehme <slow@samba.org>
---
 source3/smbd/smb2_trans2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c
index 5198a04a74c6..8e122025d283 100644
--- a/source3/smbd/smb2_trans2.c
+++ b/source3/smbd/smb2_trans2.c
@@ -1991,7 +1991,7 @@ static bool fsinfo_unix_valid_level(connection_struct *conn,
 				    uint16_t info_level)
 {
 	if (conn_using_smb2(conn->sconn) &&
-	    fsp->posix_flags == FSP_POSIX_FLAGS_OPEN &&
+	    (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) &&
 	    info_level == SMB2_FS_POSIX_INFORMATION_INTERNAL)
 	{
 		return true;
-- 
2.44.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

* Re: query fs info level 0x100
  2024-04-29 16:44     ` Ralph Boehme
@ 2024-04-29 17:11       ` Jeremy Allison
  2024-04-30  3:30         ` Steve French
  0 siblings, 1 reply; 7+ messages in thread
From: Jeremy Allison @ 2024-04-29 17:11 UTC (permalink / raw)
  To: Ralph Boehme; +Cc: Steve French, samba-technical, CIFS

On Mon, Apr 29, 2024 at 06:44:39PM +0200, Ralph Boehme wrote:
>On 4/29/24 6:13 PM, Steve French wrote:
>>But the (current Samba) server fails the level 100 (level 0x64 in hex)
>>FS_POSIX_INFO with "STATUS_INVALID_ERROR_CLASS"
>>which causes all xfstests to break since they can't verify the mount
>>(e.g. with "stat -f").
>>Nothing related to this on the client has changed, and ksmbd has
>>always supported this so works fine there.
>
>ah, I broke it. Fix attached. Really embarrassing...

Double embarrassing, I +1 reviewed it. So sorry for the bug :-(.

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

* Re: query fs info level 0x100
  2024-04-29 17:11       ` Jeremy Allison
@ 2024-04-30  3:30         ` Steve French
  0 siblings, 0 replies; 7+ messages in thread
From: Steve French @ 2024-04-30  3:30 UTC (permalink / raw)
  To: Jeremy Allison; +Cc: Ralph Boehme, samba-technical, CIFS

Worked for me.  You can add my Reviewed-by and Tested-by if you want.

On Mon, Apr 29, 2024 at 12:11 PM Jeremy Allison <jra@samba.org> wrote:
>
> On Mon, Apr 29, 2024 at 06:44:39PM +0200, Ralph Boehme wrote:
> >On 4/29/24 6:13 PM, Steve French wrote:
> >>But the (current Samba) server fails the level 100 (level 0x64 in hex)
> >>FS_POSIX_INFO with "STATUS_INVALID_ERROR_CLASS"
> >>which causes all xfstests to break since they can't verify the mount
> >>(e.g. with "stat -f").
> >>Nothing related to this on the client has changed, and ksmbd has
> >>always supported this so works fine there.
> >
> >ah, I broke it. Fix attached. Really embarrassing...
>
> Double embarrassing, I +1 reviewed it. So sorry for the bug :-(.



-- 
Thanks,

Steve

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

end of thread, other threads:[~2024-04-30  3:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 23:27 query fs info level 0x100 Steve French
2024-04-29  5:31 ` Ralph Boehme
2024-04-29 16:13   ` Steve French
2024-04-29 16:37     ` Stefan Metzmacher
2024-04-29 16:44     ` Ralph Boehme
2024-04-29 17:11       ` Jeremy Allison
2024-04-30  3:30         ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).