From: Maxim Devaev <mdevaev@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, balbi@kernel.org,
gregkh@linuxfoundation.org, caihuoqing@baidu.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: gadget: f_mass_storage: forced_eject attribute
Date: Thu, 7 Jul 2022 20:10:06 +0300 [thread overview]
Message-ID: <20220707201006.746d4696@reki> (raw)
In-Reply-To: <Ysb0ZiEveXvmrC2f@rowland.harvard.edu>
В Thu, 7 Jul 2022 10:57:42 -0400
Alan Stern <stern@rowland.harvard.edu> wrote:
> On Wed, Jul 06, 2022 at 09:59:37PM +0300, Maxim Devaev wrote:
> > It allows to reset prevent_medium_removal flag and "eject" the image.
> >
> > The patch is a completely alternative implementation of the previously
> > proposed [1], the idea of which was born after the mentioned discussion.
>
> Generally quite good, but the documentation needs some improvement.
Thanks for your help, I've fixed it and submitted v3 patch.
> By the way, what does happen if someone writes to this attribute file
> before the function is active? Have you tested this?
Yes. This simply detaches the backing file, as if you had written an empty
string to the "file" attribute. This is literally the same code, just
resetting a flag that, with an inactive configuration, cannot even be set.
> Doesn't a zero-byte write also work?
No, the same as with the rest of the configfs attributes.
prev parent reply other threads:[~2022-07-07 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 18:59 [PATCH v2] usb: gadget: f_mass_storage: forced_eject attribute Maxim Devaev
2022-07-07 8:07 ` Greg KH
2022-07-07 14:57 ` Alan Stern
2022-07-07 17:10 ` Maxim Devaev [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=20220707201006.746d4696@reki \
--to=mdevaev@gmail.com \
--cc=balbi@kernel.org \
--cc=caihuoqing@baidu.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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