From: "Pali Rohár" <pali@kernel.org>
To: Bharath SM <bharathsm.hsk@gmail.com>
Cc: Steve French <sfrench@samba.org>,
Paulo Alcantara <pc@manguebit.com>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cifs: Change translation of STATUS_DELETE_PENDING to -EBUSY
Date: Wed, 30 Oct 2024 19:03:53 +0100 [thread overview]
Message-ID: <20241030180353.w75vgf5uxoh3sid3@pali> (raw)
In-Reply-To: <CAGypqWxRv+3q3gXqGtKH+5rb+pPwNrCz-933xOk29eku38qosg@mail.gmail.com>
On Wednesday 30 October 2024 11:06:30 Bharath SM wrote:
> On Mon, Oct 28, 2024 at 4:12 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > STATUS_DELETE_PENDING error is returned when trying to open a file which is
> > in delete pending state. Linux SMB client currently translates this error
> > to -ENOENT. So Linux application trying to open a file which still exists
> > will receive -ENOENT error. This is confusing as -ENONET means that
> > directory entry does not exist.
> >
> > File on SMB server can be in delete pending state for an indefinite long
> > period. Moreover it does not have to final state before the real deleting,
> > as any SMB client who still have opened handle to such file can revert file
> > from delete pending state back to normal state. And therefore client can
> > cancel any scheduled file removal.
> >
> > So change translation of STATUS_DELETE_PENDING error to -EBUSY. -EBUSY is
> > used also for STATUS_SHARING_VIOLATION error which is similar case, when
> > opening a file was disallowed by server due to concurrent usage.
> >
>
> My worry is that, change in error code mapping might break some
> applications compatibility.
Do you have any specific example in mind where this can happen?
I was thinking about it and I cannot imagine how this change could break
application compatibility. I do not know how can application think that
-ENOENT error from open() or stat() syscall should be handled as file
exists. This is direct contradiction of the -ENOENT meaning.
prev parent reply other threads:[~2024-10-30 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 15:48 [PATCH] cifs: Change translation of STATUS_DELETE_PENDING to -EBUSY Pali Rohár
2024-10-28 10:42 ` [PATCH v2] " Pali Rohár
2024-10-30 5:36 ` Bharath SM
2024-10-30 18:03 ` Pali Rohár [this message]
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=20241030180353.w75vgf5uxoh3sid3@pali \
--to=pali@kernel.org \
--cc=bharathsm.hsk@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.com \
--cc=ronniesahlberg@gmail.com \
--cc=sfrench@samba.org \
/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