From: Jens Axboe <axboe@kernel.dk>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
jack@suse.cz, gmazyland@gmail.com
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH v2] loop: remember whether sysfs_create_group() succeeded
Date: Fri, 4 May 2018 10:27:57 -0600 [thread overview]
Message-ID: <2a75e5fb-7f29-d372-b87d-a69820fb750c@kernel.dk> (raw)
In-Reply-To: <201805050114.GDF05771.JVtFOQMLOSFFHO@I-love.SAKURA.ne.jp>
On 5/4/18 10:14 AM, Tetsuo Handa wrote:
> Jens Axboe 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.
>>>
>>> Do we want to abort LOOP_SET_FD request if sysfs_create_group() failed?
>>
>> Probably safer to retain that behavior.
>
> OK.
>
>>
>>>> If that's not easily done, then my next suggestion would be to
>>>> use a loop flag for it, LO_FLAGS_SYSFS_SETUP or something like that.
>>>
>>> Yes, that would be possible.
>>
>> Let's make that change.
>
> Since LO_FLAGS_* are defined in include/uapi/linux/loop.h as userspace visible
> flags, I feel that using "struct loop_device"->lo_flags for recording whether
> sysfs entry exists might be strange... Anyway, updated patch is shown below.
Hmm yes, I forgot about that, I guess that makes the flags approach
pretty much useless. Let's just go with your v1 in that case.
--
Jens Axboe
next prev parent reply other threads:[~2018-05-04 16:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <001a113ed2fa7bedfe055c8316a5@google.com>
2017-10-27 8:43 ` WARNING in sysfs_remove_group Greg KH
2017-10-27 9:10 ` Dmitry Vyukov
2017-10-27 9:23 ` Greg KH
2017-10-27 9:30 ` Dmitry Vyukov
2017-12-23 20:50 ` syzbot
2018-05-02 14:11 ` Tetsuo Handa
2018-05-02 14:24 ` Greg KH
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 [this message]
2018-05-04 16:47 ` Tetsuo Handa
2018-05-05 10:46 ` [PATCH] " Milan Broz
2018-05-05 11:49 ` 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=2a75e5fb-7f29-d372-b87d-a69820fb750c@kernel.dk \
--to=axboe@kernel.dk \
--cc=gmazyland@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.