From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: Tejun Heo <tj@kernel.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Q. block: check bdev_read_only() from blkdev_get()
Date: Fri, 21 Jan 2011 22:19:39 +0900 [thread overview]
Message-ID: <23846.1295615979@jrobl> (raw)
By the commit 75f1dc0
2010-11-13 block: check bdev_read_only() from blkdev_get()
bdev_read_only() call is added into blkdev_get().
This check makes the loopback block device unable to be mounted as
writable once it is set to readonly, even if the corresponding is
detached and the device becomes free.
We may need to re-initialize the readonly/writable status flag somewhere?
# simple tests with loopback
# mount as writable, succeed
+ sudo mount -o loop ./ext2.img /mnt
+ sudo umount /mnt
# mount as readonly, succeed
+ sudo mount -o ro,loop ./ext2.img /mnt
+ sudo umount /mnt
# mount as writable again, fail
+ sudo mount -o loop ./ext2.img /mnt
/dev/loop0: Permission denied
Now /dev/loop0 is fixed as readonly.
J. R. Okajima
next reply other threads:[~2011-01-21 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 13:19 J. R. Okajima [this message]
2011-01-21 13:28 ` Q. block: check bdev_read_only() from blkdev_get() Tejun Heo
2011-01-22 8:32 ` J. R. Okajima
2011-01-22 11:48 ` Tejun Heo
2011-01-22 14:22 ` [PATCH 1/2] loop: guarantee lo->lo_device availability while fd is bound Tejun Heo
2011-01-22 14:23 ` [PATCH 2/2] block: clear ro on fd detach " Tejun Heo
2011-01-24 1:28 ` J. R. Okajima
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=23846.1295615979@jrobl \
--to=hooanon05@yahoo.co.jp \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tj@kernel.org \
/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