ext3/4: BUGS in changing journal mode in flight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jan and Ted,

Both ext3 and ext4 have an attribute 'j', thus users can change
journal mode of a file in flight.  However, neither ext3 or ext4
supports the feature rightly, specifically file systems will be
mounted RO due to I/O error in journal.  The error happens like this:
when the journal mode of a file is changed from ordered to journaled,
then data blocks will be revoked in truncate, if the revoked block was
allocated as meta blocks last time, then its revoked flag is not
cleared, so revoke on a revoked buffer happens, then journal report an
I/O error.

Now revoked flag is cleared in get_access, actually it can be cleared
immediately after the transaction is closed(non-current transaction).

I can think of 3 solutions addressing the problem.

1. clear revoked flag on a buffer when allocating a block.
    This solution introduces overhead to ordered mode, because we have
to look up dev's buffer every time. So I think the solution can be
ignored.

2. clear revoked flag in commit_call_back function.
   This solution has some overhead too.  in ext3 commit_call_back is
not used at all, so changing to ext3 is not trivial.

3. clear revoked flag in write_revoke_table.
   IMHO, this solution is the best one.  We just need to add a field
in in-memory journal super block pointing to the super block of host
file system.

What's your opinions?

There are some other problems in ext4 when changing journal mode, such
as allocating dealloc blocks, but they can be addressed easily.

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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux