From: Bart Van Assche <bvanassche@acm.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Brian Foster <bfoster@redhat.com>,
Damien Le Moal <dlemoal@kernel.org>,
Hillf Danton <hdanton@sina.com>,
Markus Elfring <Markus.Elfring@web.de>,
Ming Lei <tom.leiming@gmail.com>, Qu Wenruo <wqu@suse.com>,
Tao Cui <cui.tao@linux.dev>, kernel test robot <lkp@intel.com>,
linux-block <linux-block@vger.kernel.org>,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 1/2] block: Add post_release() operation
Date: Fri, 11 Sep 2026 17:31:36 -0700 [thread overview]
Message-ID: <a863d8ea-d72e-48b4-862f-1a7439cb255c@acm.org> (raw)
In-Reply-To: <f00a7749-c59a-4c96-bc41-b34c80a40aef@I-love.SAKURA.ne.jp>
On 9/11/26 3:34 PM, Tetsuo Handa wrote:
> On 2026/09/12 4:54, Bart Van Assche wrote:
>> On 9/9/26 3:48 AM, Tetsuo Handa wrote:
>>> int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);
>>> + /*
>>> + * Called after disk->open_mutex is released in the bdev_release() path.
>>> + * Used by loop devices that need to perform synchronization without
>>> + * holding disk->open_mutex. This operation has to be idempotent.
>>> + */
>>> + void (*post_release)(struct gendisk *disk);
>>
>> Instead of referring to bdev_release(), which is not in the public API,
>> the above comment should mention that .post_release() is called after .release().
>
> Such change is not accurate. The .release() is also called if something went wrong after
> the .open() succeeded. The reason I emphasis bdev_release() is that the .post_release()
> is not called if something went wrong after the .open() succeeded.
Please integrate the above text in the comment above .post_release().
>> The above comment should also mention that .post_release()
>> implementations may sleep.
>
> Such change is fine.
>
>>
>> Additionally, why is .post_release() added at the end instead of just
>> under .release()?
>
> Because I consider the .post_release() is categorized to
>
> /*
> * Special callback for probing GPT entry at a given sector.
> * Needed by Android devices, used by GPT scanner and MMC blk
> * driver.
> */
> int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);
>
> hook.
Are you claiming that .post_release() is Android-specific? I don't think
that's correct.
Bart.
next prev parent reply other threads:[~2026-09-12 0:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 10:48 [PATCH 1/2] block: Add post_release() operation Tetsuo Handa
2026-09-09 10:49 ` [PATCH 2/2] loop: Perform __loop_clr_fd() after disk->open_mutex is dropped Tetsuo Handa
2026-09-09 19:33 ` Bart Van Assche
2026-09-10 9:44 ` Tetsuo Handa
2026-09-11 20:03 ` Bart Van Assche
2026-09-11 22:18 ` Tetsuo Handa
2026-09-12 1:02 ` Bart Van Assche
2026-09-12 1:22 ` Tetsuo Handa
2026-09-10 11:53 ` [PATCH 1/2] block: Add post_release() operation Gary Guo
2026-09-10 12:14 ` Tetsuo Handa
2026-09-11 19:54 ` Bart Van Assche
2026-09-11 22:34 ` Tetsuo Handa
2026-09-12 0:31 ` Bart Van Assche [this message]
2026-09-12 1:43 ` Tetsuo Handa
-- strict thread matches above, loose matches on Subject: below --
2021-12-22 12:02 Tetsuo Handa
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=a863d8ea-d72e-48b4-862f-1a7439cb255c@acm.org \
--to=bvanassche@acm.org \
--cc=Markus.Elfring@web.de \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bfoster@redhat.com \
--cc=cui.tao@linux.dev \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=hdanton@sina.com \
--cc=linux-block@vger.kernel.org \
--cc=lkp@intel.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rust-for-linux@vger.kernel.org \
--cc=tom.leiming@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=wqu@suse.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