All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH] ext4: do not try to write superblock on journal-less readonly remount
Date: Thu, 25 Oct 2012 21:38:20 +0400	[thread overview]
Message-ID: <5089790C.8080606@msgid.tls.msk.ru> (raw)
In-Reply-To: <alpine.LFD.2.00.1210251438530.24674@dhcp-1-104.brq.redhat.com>

On 25.10.2012 16:43, Lukáš Czerner wrote:
> On Thu, 25 Oct 2012, Michael Tokarev wrote:
> 
>> Date: Thu, 25 Oct 2012 12:39:57 +0400
>> From: Michael Tokarev <mjt@tls.msk.ru>
>> To: linux-ext4@vger.kernel.org
>> Cc: sandeen@redhat.com, Michael Tokarev <mjt@tls.msk.ru>
>> Subject: [PATCH] ext4: do not try to write superblock on journal-less readonly
>>      remount
>>
>> When a journal-less ext4 filesystem is mounted on a read-only block
>> device (blockdev --setro will do), each remount (for other, unrelated,
>> flags, like suid=>nosuid etc) results in a series of scary messages
>> from kernel telling about I/O errors on the device.
> 
> Hi Michael,
> 
> I am not able to reproduce the problem you're seeing:
> 
> mkfs.ext4 /dev/sdd1
> tune2fs -O ^has_journal /dev/sdd1
> blockdev --setro /dev/sdd1
> mount /dev/sdd1 /mnt/test
> 
> and then
> 
> mount -o remount,suid /dev/sdd1
> mount -o remount,nosuid /dev/sdd1
> mount -o remount,noatime /dev/sdd1
> mount -o remount,relatime /dev/sdd1
> mount -o remount,relatime,commit=20 /dev/sdd1
> 
> just does not produce any errors. Both /var/log/messages and dmesg
> are clear.

Interesting.

Actual situation where I observed this issue was when the device
really was read-only.  In my case it was a virtual machine (kvm)
with a read-only virtio drive (-drive file=foo,if=virtio,readonly=on).
I played with a "live CD"-type system.

Now when I look at it, I'm not sure if I were really able to
reproduce it with regular /dev/sdNN and blockdev --setro.  I
*think* it was reproducible, but actually I can't.  So it looks
like blockdev --setro does not do what it claims to do -- the
actual device isn't really set read-only.

The errors produced at remount are real, when the device in question
really dislikes (reject) writes.  Apparently --setro isn't enough --
somewhere at kernel level write for such device are actually succeeded
instead of being errored out, when the device itself does not reject
writes.  So the impact is even less severe when I initially thought.

Thanks,

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-10-25 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25  8:39 [PATCH] ext4: do not try to write superblock on journal-less readonly remount Michael Tokarev
2012-10-25 12:43 ` Lukáš Czerner
2012-10-25 17:38   ` Michael Tokarev [this message]
2012-12-18  8:14 ` Michael Tokarev
2012-12-18 15:20   ` Eric Sandeen
2012-12-20  9:24     ` Michael Tokarev
2012-12-25 19:09       ` Theodore Ts'o

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=5089790C.8080606@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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 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.