Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Henrique Carvalho <henrique.carvalho@suse.com>
To: Steve French <smfrench@gmail.com>
Cc: ematsumiya@suse.de, linux-cifs@vger.kernel.org
Subject: Re: [PATCH] smb: client: skip cifs_lookup on mkdir
Date: Wed, 10 Sep 2025 18:09:51 -0300	[thread overview]
Message-ID: <bdfb29eb-35ab-473c-be08-1e0857c3c96b@suse.com> (raw)
In-Reply-To: <CAH2r5muyRvOn_OgKimn05V8o-XDt8SVdDzVU7peRmT_KGNzdkQ@mail.gmail.com>

Hi Steve,

On 9/10/25 5:28 PM, Steve French wrote:
> Henrique, I can repro the failure in generic/005 with your patches,
> but am fascinated that one of your patches may have worked around the
> generic/637 problem at least in some cases, but am having difficulty
> bisecting this.

I had not seen the failures in generic/005, but I also had not tested
with smb 2.1.

I will run more tests and dig into both generic/637 and the other
failing cases.

I will get back to you once I have something more concrete.

> 
> On Wed, Sep 10, 2025 at 12:50 PM Steve French <smfrench@gmail.com> wrote:
>>
>> Interesting that running with three of your patches, I no longer see
>> the failure in generic/637 (dir lease related file contents bug) but I
>> do see two unexpected failures in generic/005 and generic/586:
>>
>> http://smb311-linux-testing.southcentralus.cloudapp.azure.com/#/builders/5/builds/116
>>
>> e.g.
>>
>> generic/005 5s ... - output mismatch (see
>> /data/xfstests-dev/results//smb21/generic/005.out.bad)
>>     --- tests/generic/005.out 2024-05-15 02:56:10.033955659 -0500
>>     +++ /data/xfstests-dev/results//smb21/generic/005.out.bad
>> 2025-09-10 08:33:45.271123450 -0500
>>     @@ -1,8 +1,51 @@
>>      QA output created by 005
>>     +ln: failed to create symbolic link 'symlink_00': No such file or directory
>>     +ln: failed to create symbolic link 'symlink_01': No such file or directory
>>     +ln: failed to create symbolic link 'symlink_02': No such file or directory
>>     +ln: failed to create symbolic link 'symlink_03': No such file or directory
>>     +ln: failed to create symbolic link 'symlink_04': No such file or directory
>>     +ln: failed to create symbolic link 'symlink_05': No such file or directory
>>
>> Do you also see these test failures?
>>
>> On Tue, Sep 9, 2025 at 3:30 PM Henrique Carvalho
>> <henrique.carvalho@suse.com> wrote:
>>>
>>> For mkdir the final component is looked up with LOOKUP_CREATE |
>>> LOOKUP_EXCL.
>>>
>>> We don't need an existence check in mkdir; return NULL and let mkdir
>>> create or fail with -EEXIST (on STATUS_OBJECT_NAME_COLLISION).
>>>
>>> Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
>>> ---
>>>  fs/smb/client/dir.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/fs/smb/client/dir.c b/fs/smb/client/dir.c
>>> index 5223edf6d11a..d26a14ba6d9b 100644
>>> --- a/fs/smb/client/dir.c
>>> +++ b/fs/smb/client/dir.c
>>> @@ -684,6 +684,10 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
>>>         void *page;
>>>         int retry_count = 0;
>>>
>>> +       /* if in mkdir, let create path handle it */
>>> +       if (flags == (LOOKUP_CREATE | LOOKUP_EXCL))
>>> +               return NULL;
>>> +
>>>         xid = get_xid();
>>>
>>>         cifs_dbg(FYI, "parent inode = 0x%p name is: %pd and dentry = 0x%p\n",
>>> --
>>> 2.50.1
>>>
>>
>>
>> --
>> Thanks,
>>
>> Steve
> 
> 
> 

-- 
Henrique
SUSE Labs

  reply	other threads:[~2025-09-10 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 20:27 [PATCH] smb: client: skip cifs_lookup on mkdir Henrique Carvalho
2025-09-10 17:50 ` Steve French
2025-09-10 20:28   ` Steve French
2025-09-10 21:09     ` Henrique Carvalho [this message]
2025-09-11 13:55       ` Stefan Metzmacher
2025-09-12  2:54         ` Steve French
2025-09-12 12:29           ` Henrique Carvalho

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=bdfb29eb-35ab-473c-be08-1e0857c3c96b@suse.com \
    --to=henrique.carvalho@suse.com \
    --cc=ematsumiya@suse.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /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