<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ext4/mmp.c, branch v3.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ext4: Convert to new freezing mechanism</title>
<updated>2012-07-31T05:45:48+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-06-12T14:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8e8ad8a57c75f3bda2d03a4c4396a9a7024ad275'/>
<id>8e8ad8a57c75f3bda2d03a4c4396a9a7024ad275</id>
<content type='text'>
We remove most of frozen checks since upper layer takes care of blocking all
writes. We have to handle protection in ext4_page_mkwrite() in a special way
because we cannot use generic block_page_mkwrite(). Also we add a freeze
protection to ext4_evict_inode() so that iput() of unlinked inode cannot modify
a frozen filesystem (we cannot easily instrument ext4_journal_start() /
ext4_journal_stop() with freeze protection because we are missing the
superblock pointer in ext4_journal_stop() in nojournal mode).

CC: linux-ext4@vger.kernel.org
CC: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
BugLink: https://bugs.launchpad.net/bugs/897421
Tested-by: Kamal Mostafa &lt;kamal@canonical.com&gt;
Tested-by: Peter M. Petrakis &lt;peter.petrakis@canonical.com&gt;
Tested-by: Dann Frazier &lt;dann.frazier@canonical.com&gt;
Tested-by: Massimo Morana &lt;massimo.morana@canonical.com&gt;
Acked-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We remove most of frozen checks since upper layer takes care of blocking all
writes. We have to handle protection in ext4_page_mkwrite() in a special way
because we cannot use generic block_page_mkwrite(). Also we add a freeze
protection to ext4_evict_inode() so that iput() of unlinked inode cannot modify
a frozen filesystem (we cannot easily instrument ext4_journal_start() /
ext4_journal_stop() with freeze protection because we are missing the
superblock pointer in ext4_journal_stop() in nojournal mode).

CC: linux-ext4@vger.kernel.org
CC: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
BugLink: https://bugs.launchpad.net/bugs/897421
Tested-by: Kamal Mostafa &lt;kamal@canonical.com&gt;
Tested-by: Peter M. Petrakis &lt;peter.petrakis@canonical.com&gt;
Tested-by: Dann Frazier &lt;dann.frazier@canonical.com&gt;
Tested-by: Massimo Morana &lt;massimo.morana@canonical.com&gt;
Acked-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: add checksums to the MMP block</title>
<updated>2012-04-29T22:47:10+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>djwong@us.ibm.com</email>
</author>
<published>2012-04-29T22:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c359a47e7d999a0ea7f397da2c15590d0a82815'/>
<id>5c359a47e7d999a0ea7f397da2c15590d0a82815</id>
<content type='text'>
Compute and verify a checksum for the MMP block.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compute and verify a checksum for the MMP block.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Fix endianness bug when reading the MMP block</title>
<updated>2012-02-27T06:09:03+00:00</updated>
<author>
<name>Santosh Nayak</name>
<email>santoshprasadnayak@gmail.com</email>
</author>
<published>2012-02-27T06:09:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85d216501a7c2aa3e19d71c70430395c864a2ee5'/>
<id>85d216501a7c2aa3e19d71c70430395c864a2ee5</id>
<content type='text'>
Sparse complained about this endian bug in fs/ext4/mmp.c.

Signed-off-by: Santosh Nayak &lt;santoshprasadnayak@gmail.com&gt;
Reviewed-by: Johann Lombardi &lt;johann@whamcloud.com&gt;
Reviewed-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sparse complained about this endian bug in fs/ext4/mmp.c.

Signed-off-by: Santosh Nayak &lt;santoshprasadnayak@gmail.com&gt;
Reviewed-by: Johann Lombardi &lt;johann@whamcloud.com&gt;
Reviewed-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Fix comparison endianness problem in MMP initialization</title>
<updated>2011-10-18T14:53:51+00:00</updated>
<author>
<name>Darrick J. Wong</name>
<email>djwong@us.ibm.com</email>
</author>
<published>2011-10-18T14:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f6f96fdb8c2779f9bd8ed7b0b08405b4439c982b'/>
<id>f6f96fdb8c2779f9bd8ed7b0b08405b4439c982b</id>
<content type='text'>
As part of startup, the MMP initialization code does this:

mmp-&gt;mmp_seq = seq = cpu_to_le32(mmp_new_seq());

Next, mmp-&gt;mmp_seq is written out to disk, a delay happens, and then
the MMP block is read back in and the sequence value is tested:

if (seq != le32_to_cpu(mmp-&gt;mmp_seq)) {
	/* fail the mount */

On a LE system such as x86, the *le32* functions do nothing and this
works.  Unfortunately, on a BE system such as ppc64, this comparison
becomes:

if (cpu_to_le32(new_seq) != le32_to_cpu(cpu_to_le32(new_seq)) {
	/* fail the mount */

Except for a few palindromic sequence numbers, this test always causes
the mount to fail, which makes MMP filesystems generally unmountable
on ppc64.  The attached patch fixes this situation.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of startup, the MMP initialization code does this:

mmp-&gt;mmp_seq = seq = cpu_to_le32(mmp_new_seq());

Next, mmp-&gt;mmp_seq is written out to disk, a delay happens, and then
the MMP block is read back in and the sequence value is tested:

if (seq != le32_to_cpu(mmp-&gt;mmp_seq)) {
	/* fail the mount */

On a LE system such as x86, the *le32* functions do nothing and this
works.  Unfortunately, on a BE system such as ppc64, this comparison
becomes:

if (cpu_to_le32(new_seq) != le32_to_cpu(cpu_to_le32(new_seq)) {
	/* fail the mount */

Except for a few palindromic sequence numbers, this test always causes
the mount to fail, which makes MMP filesystems generally unmountable
on ppc64.  The attached patch fixes this situation.

Signed-off-by: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: MMP: fix error message rate-limiting logic in kmmpd</title>
<updated>2011-10-18T14:51:51+00:00</updated>
<author>
<name>Nikitas Angelinas</name>
<email>nikitasangelinas@gmail.com</email>
</author>
<published>2011-10-18T14:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bdfc230f33a9dab316dcb6be4696ae59e1562e3c'/>
<id>bdfc230f33a9dab316dcb6be4696ae59e1562e3c</id>
<content type='text'>
Current logic would print an error message only once, and then
'failed_writes' would stay at 1.  Rework the loop to increment
'failed_writes' and print the error message every
s_mmp_update_interval * 60 seconds, as intended according to the
comment.

Signed-off-by: Nikitas Angelinas &lt;nikitas_angelinas@xyratex.com&gt;
Signed-off-by: Andrew Perepechko &lt;andrew_perepechko@xyratex.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Acked-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current logic would print an error message only once, and then
'failed_writes' would stay at 1.  Rework the loop to increment
'failed_writes' and print the error message every
s_mmp_update_interval * 60 seconds, as intended according to the
comment.

Signed-off-by: Nikitas Angelinas &lt;nikitas_angelinas@xyratex.com&gt;
Signed-off-by: Andrew Perepechko &lt;andrew_perepechko@xyratex.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Acked-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: MMP: kmmpd should use nodename from init_uts_ns.name, not sysname</title>
<updated>2011-10-18T14:49:51+00:00</updated>
<author>
<name>Nikitas Angelinas</name>
<email>nikitasangelinas@gmail.com</email>
</author>
<published>2011-10-18T14:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=215fc6af739d2dfdcad5496248d0d6302eb8a604'/>
<id>215fc6af739d2dfdcad5496248d0d6302eb8a604</id>
<content type='text'>
sysname holds "Linux" by default, i.e. what appears when doing a "uname
-s"; nodename should be used to print the machine's hostname, i.e. what
is returned when doing a "uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to notify the
administrator of the node which is contending to mount the filesystem.

Acked-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Signed-off-by: Nikitas Angelinas &lt;nikitas_angelinas@xyratex.com&gt;
Signed-off-by: Andrew Perepechko &lt;andrew_perepechko@xyratex.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sysname holds "Linux" by default, i.e. what appears when doing a "uname
-s"; nodename should be used to print the machine's hostname, i.e. what
is returned when doing a "uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to notify the
administrator of the node which is contending to mount the filesystem.

Acked-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Signed-off-by: Nikitas Angelinas &lt;nikitas_angelinas@xyratex.com&gt;
Signed-off-by: Andrew Perepechko &lt;andrew_perepechko@xyratex.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: add support for multiple mount protection</title>
<updated>2011-05-24T22:31:25+00:00</updated>
<author>
<name>Johann Lombardi</name>
<email>johann@whamcloud.com</email>
</author>
<published>2011-05-24T22:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c5e06d101aaf72f1f2192a661414459775e9bd74'/>
<id>c5e06d101aaf72f1f2192a661414459775e9bd74</id>
<content type='text'>
Prevent an ext4 filesystem from being mounted multiple times.
A sequence number is stored on disk and is periodically updated (every 5
seconds by default) by a mounted filesystem.
At mount time, we now wait for s_mmp_update_interval seconds to make sure
that the MMP sequence does not change.
In case of failure, the nodename, bdevname and the time at which the MMP
block was last updated is displayed.

Signed-off-by: Andreas Dilger &lt;adilger@whamcloud.com&gt;
Signed-off-by: Johann Lombardi &lt;johann@whamcloud.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent an ext4 filesystem from being mounted multiple times.
A sequence number is stored on disk and is periodically updated (every 5
seconds by default) by a mounted filesystem.
At mount time, we now wait for s_mmp_update_interval seconds to make sure
that the MMP sequence does not change.
In case of failure, the nodename, bdevname and the time at which the MMP
block was last updated is displayed.

Signed-off-by: Andreas Dilger &lt;adilger@whamcloud.com&gt;
Signed-off-by: Johann Lombardi &lt;johann@whamcloud.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
</feed>
