From: Milan Broz <gmazyland@gmail.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
axboe@kernel.dk, jack@suse.cz
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] loop: remember whether sysfs_create_group() succeeded
Date: Sat, 5 May 2018 12:46:15 +0200 [thread overview]
Message-ID: <7fec4767-64c5-5b3b-4a85-6c7d97d6b0b7@gmail.com> (raw)
In-Reply-To: <201805042340.AIB51569.HOFQOJLFtVFSMO@I-love.SAKURA.ne.jp>
On 05/04/2018 04:40 PM, Tetsuo Handa wrote:
> The loop module ignores sysfs_create_group() failure and pretends that
> LOOP_SET_FD request succeeded. I guess that the author of commit
> ee86273062cbb310 ("loop: add some basic read-only sysfs attributes")
> assumed that it is not a fatal error enough to abort LOOP_SET_FD request.
IIRC we added sysfs attributes to easily access loop info for a regular user
in lsblk command (and perhaps even in udev rules).
The ioctl interface was still controlling the loop device, so the failure
here was not meant to be fatal. TBH I think was not a great idea.
> Do we want to abort LOOP_SET_FD request if sysfs_create_group() failed?
I would prefer failure - there are several utilities that expects attributes in
sysfs to be valid (for example I print info from here in cryptsetup status
if the backing image is an image), so ignoring failure put the system
in inconsistent state.
Thanks for fixing this,
Milan
next prev parent reply other threads:[~2018-05-05 10:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <001a113ed2fa7bedfe055c8316a5@google.com>
[not found] ` <94eb2c030882b2b1b505610813df@google.com>
[not found] ` <55ff5960-eaab-5a36-5605-4e2230b77607@I-love.SAKURA.ne.jp>
[not found] ` <20180502142434.GA10928@kroah.com>
2018-05-04 11:47 ` [PATCH] loop: remember whether sysfs_create_group() succeeded Tetsuo Handa
2018-05-04 14:15 ` Jens Axboe
2018-05-04 14:27 ` Tetsuo Handa
2018-05-04 14:30 ` Jens Axboe
2018-05-04 14:40 ` Tetsuo Handa
2018-05-04 14:43 ` Jens Axboe
2018-05-04 16:14 ` [PATCH v2] " Tetsuo Handa
2018-05-04 16:27 ` Jens Axboe
2018-05-04 16:47 ` Tetsuo Handa
2018-05-05 10:46 ` Milan Broz [this message]
2018-05-05 11:49 ` [PATCH] " Tetsuo Handa
2018-05-08 9:02 ` Milan Broz
2018-05-09 12:31 ` Jan Kara
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=7fec4767-64c5-5b3b-4a85-6c7d97d6b0b7@gmail.com \
--to=gmazyland@gmail.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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