From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "max.kellermann@ionos.com" <max.kellermann@ionos.com>
Cc: "idryomov@gmail.com" <idryomov@gmail.com>,
Alex Markuze <amarkuze@redhat.com>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Xiubo Li <xiubli@redhat.com>
Subject: RE: [PATCH] fs/ceph/io: make ceph_start_io_*() killable
Date: Mon, 9 Dec 2024 18:59:51 +0000 [thread overview]
Message-ID: <caf3a8455673bc602194c702de9b1013722ce4a2.camel@ibm.com> (raw)
In-Reply-To: <CAKPOu+-AwRayUqOR9fEmZ88bpJkrknMbsZadknjDsBW=jcFL0g@mail.gmail.com>
On Fri, 2024-12-06 at 23:48 +0100, Max Kellermann wrote:
> On Fri, Dec 6, 2024 at 8:11 PM Viacheslav Dubeyko
> <Slava.Dubeyko@ibm.com> wrote:
> > Should be the check of
> > this function's output mandatory? I am not fully sure.
>
> But I am fully sure.
> If you don't check the return value, you don't know whether the inode
> was locked. If you don't know that, you can't decide whether you need
> to unlock it. That being optional now (cancel locking if SIGKILL was
> received) is the sole point of my patch. You MUST check the return
> value. There is no other way. Don't trust my word - just read the
> code.
The down_write_killable() can return -EINTR, currently:
https://elixir.bootlin.com/linux/v6.12.4/source/kernel/locking/rwsem.c#L1593
And -EINTR can imply that client has been killed:
https://elixir.bootlin.com/linux/v6.12.4/source/include/uapi/asm-generic/errno-base.h#L8
It sounds to me that we simply need not to execute the logic. But do we
really need to report
the error to the caller? I am simply trying to double check that
caller's logic is ready
to process the error condition in the correct way.
Thanks,
Slava.
next prev parent reply other threads:[~2024-12-09 19:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 16:50 Max Kellermann
2024-12-06 17:40 ` Viacheslav Dubeyko
2024-12-06 18:58 ` Max Kellermann
2024-12-06 19:11 ` Viacheslav Dubeyko
2024-12-06 22:48 ` Max Kellermann
2024-12-09 18:59 ` Viacheslav Dubeyko [this message]
2025-05-19 10:15 ` Max Kellermann
2025-06-06 17:08 ` Ilya Dryomov
2025-06-06 17:15 ` Viacheslav Dubeyko
2025-06-06 17:34 ` Max Kellermann
2025-06-06 17:42 ` Viacheslav Dubeyko
2025-06-09 13:13 ` Ilya Dryomov
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=caf3a8455673bc602194c702de9b1013722ce4a2.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=max.kellermann@ionos.com \
--cc=xiubli@redhat.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
all inboxes | Powered by JetHome®