lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Nov 2011 16:20:21 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	Jan Kara <jack@...e.cz>, "Ted Ts'o" <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: ext3/4: BUGS in changing journal mode in flight

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ