linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* UBIFS is not remounted read-only from within do_emergency_remount
@ 2012-07-31 11:24 Alexander Stein
  2012-08-24  7:22 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2012-07-31 11:24 UTC (permalink / raw)
  To: linux-mtd, linux-fsdevel

Hello,

upon testing do_emergency_remount from a power fail interrupt (using the 
workqueue of course), we noticed UBIFS is not remounted read-only afterwards.
The current code in do_emergency_remount checks if the kernel actually needs 
to remount a filesystem using the following code:
> if (sb->s_root && sb->s_bdev && (sb->s_flags & MS_BORN) &&
>     !(sb->s_flags & MS_RDONLY)) {
>         /*
>          * What lock protects sb->s_flags??
>          */
>         do_remount_sb(sb, MS_RDONLY, NULL, 1);
> }

I'm not in the details of this part of the kernel, but I suspect that sb-
>s_bdev is NULL for UBIFS as it has no block device, but the character device 
/dev/ubiX_Y instead. I have the information from a collegue that removing the 
check for testing purposes for sb->s_bdev mounts UBIFS read-only.
Any comments/ideas how to remount UBIFS as read-only from 
do_emergency_remount?

Best regards,
Alexander


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-27  7:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 11:24 UBIFS is not remounted read-only from within do_emergency_remount Alexander Stein
2012-08-24  7:22 ` Artem Bityutskiy
2012-08-27  7:16   ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).