linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* orphan cleanup on readonly fs will corrupt future fs!
@ 2011-02-26 18:21 Amir Goldstein
  2011-02-28  5:48 ` Ted Ts'o
  2011-02-28 15:05 ` Eric Sandeen
  0 siblings, 2 replies; 3+ messages in thread
From: Amir Goldstein @ 2011-02-26 18:21 UTC (permalink / raw)
  To: Theodore Tso, Jan Kara, Andreas Dilger, Eric Sandeen; +Cc: Ext4 Developers List

Hi guys,

I have just realized something very disturbing -
that orphan cleanup is not being skipped on readonly mount of ext4/ext3.

I know that journal recovery is done on readonly mount
and there is problem with that, since nothing happens
in the fs level.

But orphan cleanup deletes inodes and frees blocks and that
could be very bad for some RO_COMPAT features, SNAPSHOT
and BIGALLOC to name two.

I am not so sure why orphan cleanup is so important for readonly
mount in the first place?

Now the damage has been done, because current stock kernels will
corrupt future fs with SNAPSHOT and BIGALLOC features
(unless Ted backs up from the decision to make BIGALLOC RO_COMPAT...)

I think that we should skip orphan cleanup on readonly mount ASAP and try
to push this fix to as many stable/maint kernels out there, before the
problem gets worse.

Can anyway see a problem with skipping orphan cleanup?
Maybe there is a problem with later remount read-write?

I would spend time more time to investigate these questions,
but I find this problem too disturbing and urgent to wait until I find
the time to do so...

Amir.

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

* Re: orphan cleanup on readonly fs will corrupt future fs!
  2011-02-26 18:21 orphan cleanup on readonly fs will corrupt future fs! Amir Goldstein
@ 2011-02-28  5:48 ` Ted Ts'o
  2011-02-28 15:05 ` Eric Sandeen
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-02-28  5:48 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Jan Kara, Andreas Dilger, Eric Sandeen, Ext4 Developers List

On Sat, Feb 26, 2011 at 08:21:47PM +0200, Amir Goldstein wrote:
> Hi guys,
> 
> I have just realized something very disturbing -
> that orphan cleanup is not being skipped on readonly mount of ext4/ext3.
> 
> I know that journal recovery is done on readonly mount
> and there is problem with that, since nothing happens
> in the fs level.
> 
> But orphan cleanup deletes inodes and frees blocks and that
> could be very bad for some RO_COMPAT features, SNAPSHOT
> and BIGALLOC to name two.

Yes, good point.  Fortunately it won't be a problem for the BIGALLOC
feature, since other changes in the superblock will cause the kernel's
sanity checks to refuse to mount it until we teach future kernels how
not to freak out when s_blocks_per_group > blocksize * 8, for example.

But yes, this is something we should fix.

						- Ted

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

* Re: orphan cleanup on readonly fs will corrupt future fs!
  2011-02-26 18:21 orphan cleanup on readonly fs will corrupt future fs! Amir Goldstein
  2011-02-28  5:48 ` Ted Ts'o
@ 2011-02-28 15:05 ` Eric Sandeen
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2011-02-28 15:05 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Theodore Tso, Jan Kara, Andreas Dilger, Ext4 Developers List

On 2/26/11 12:21 PM, Amir Goldstein wrote:
> Hi guys,
> 
> I have just realized something very disturbing -
> that orphan cleanup is not being skipped on readonly mount of ext4/ext3.
> 
> I know that journal recovery is done on readonly mount
> and there is problem with that, since nothing happens
> in the fs level.
> 
> But orphan cleanup deletes inodes and frees blocks and that
> could be very bad for some RO_COMPAT features, SNAPSHOT
> and BIGALLOC to name two.

One thing to note is that if the device itself is readonly,
both journal recovery and orphan processing will be skipped,
if I recall...

-Eric

> I am not so sure why orphan cleanup is so important for readonly
> mount in the first place?
> 
> Now the damage has been done, because current stock kernels will
> corrupt future fs with SNAPSHOT and BIGALLOC features
> (unless Ted backs up from the decision to make BIGALLOC RO_COMPAT...)
> 
> I think that we should skip orphan cleanup on readonly mount ASAP and try
> to push this fix to as many stable/maint kernels out there, before the
> problem gets worse.
> 
> Can anyway see a problem with skipping orphan cleanup?
> Maybe there is a problem with later remount read-write?
> 
> I would spend time more time to investigate these questions,
> but I find this problem too disturbing and urgent to wait until I find
> the time to do so...
> 
> Amir.


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

end of thread, other threads:[~2011-02-28 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26 18:21 orphan cleanup on readonly fs will corrupt future fs! Amir Goldstein
2011-02-28  5:48 ` Ted Ts'o
2011-02-28 15:05 ` Eric Sandeen

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).