<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/fs/ocfs2/slot_map.c, branch docs-4.14</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-4.14</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-4.14'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2016-05-20T02:12:14+00:00</updated>
<entry>
<title>ocfs2: clean up an unneeded goto in ocfs2_put_slot()</title>
<updated>2016-05-20T02:12:14+00:00</updated>
<author>
<name>Guozhonghua</name>
<email>guozhonghua@h3c.com</email>
</author>
<published>2016-05-20T00:09:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8f9b1802c20ace68a7d6603e1fd82a44fedb4078'/>
<id>urn:sha1:8f9b1802c20ace68a7d6603e1fd82a44fedb4078</id>
<content type='text'>
The goto is not useful in ocfs2_put_slot(), so delete it.

Signed-off-by: Guozhonghua &lt;guozhonghua@h3c.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Cc: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: fix slot overwritten if storage link down during mount</title>
<updated>2016-01-15T00:00:49+00:00</updated>
<author>
<name>jiangyiwen</name>
<email>jiangyiwen@huawei.com</email>
</author>
<published>2016-01-14T23:17:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1247017f43a93eae3d64b7c25f3637dc545f5a47'/>
<id>urn:sha1:1247017f43a93eae3d64b7c25f3637dc545f5a47</id>
<content type='text'>
The following case will lead to slot overwritten.

N1                               N2
mount ocfs2 volume, find and
allocate slot 0, then set
osb-&gt;slot_num to 0, begin to
write slot info to disk
                                 mount ocfs2 volume, wait for super lock
write block fail because of
storage link down, unlock
super lock
                                 got super lock and also allocate slot 0
                                 then unlock super lock

mount fail and then dismount,
since osb-&gt;slot_num is 0, try to
put invalid slot to disk. And it
will succeed if storage link
restores.
                                 N2 slot info is now overwritten

Once another node say N3 mount, it will find and allocate slot 0 again,
which will lead to mount hung because journal has already been locked by
N2.  so when write slot info failed, invalidate slot in advance to avoid
overwrite slot.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Reviewed-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: clean up redundant NULL check before iput</title>
<updated>2016-01-15T00:00:49+00:00</updated>
<author>
<name>Joseph Qi</name>
<email>joseph.qi@huawei.com</email>
</author>
<published>2016-01-14T23:17:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=72865d92300a6ad20a8851887aeac4f41fd2c579'/>
<id>urn:sha1:72865d92300a6ad20a8851887aeac4f41fd2c579</id>
<content type='text'>
Since iput will take care the NULL check itself, NULL check before
calling it is redundant.  So clean them up.

Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: one function call less in ocfs2_init_slot_info() after error detection</title>
<updated>2015-04-14T23:48:57+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2015-04-14T22:42:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bb34ed21bce54a900c034089a6b1fde8c09f6a6d'/>
<id>urn:sha1:bb34ed21bce54a900c034089a6b1fde8c09f6a6d</id>
<content type='text'>
__ocfs2_free_slot_info() was called by ocfs2_init_slot_info() even if a
call of the kzalloc() function failed.

Return from this implementation directly after corresponding
exception handling.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: delete unnecessary checks before three function calls</title>
<updated>2015-04-14T23:48:56+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2015-04-14T22:42:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fd90d4dfb94a8c0d626c0c85ca7dcfb905f81a65'/>
<id>urn:sha1:fd90d4dfb94a8c0d626c0c85ca7dcfb905f81a65</id>
<content type='text'>
kfree(), ocfs2_free_path() and __ocfs2_free_slot_info() test whether their
argument is NULL and then return immediately.  Thus the test around their
calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: fix an off-by-one BUG_ON() statement</title>
<updated>2014-12-11T01:41:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-12-10T23:41:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=519a286175b6422e13694ebb73aefee0b5749443'/>
<id>urn:sha1:519a286175b6422e13694ebb73aefee0b5749443</id>
<content type='text'>
The -&gt;si_slots[] array is allocated in ocfs2_init_slot_info() it has
"-&gt;max_slots" number of elements so this test should be &gt;= instead of &gt;.

Static checker work.  Compile tested only.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs/ocfs2/slot_map.c: replace count*size kzalloc by kcalloc</title>
<updated>2014-08-07T01:01:13+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-08-06T23:04:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1b7f8ba603d3bb2f5bbb65df981ae0d0abb80ee2'/>
<id>urn:sha1:1b7f8ba603d3bb2f5bbb65df981ae0d0abb80ee2</id>
<content type='text'>
kcalloc manages count*sizeof overflow.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: Clean up messages in the fs</title>
<updated>2011-07-24T17:34:54+00:00</updated>
<author>
<name>Sunil Mushran</name>
<email>sunil.mushran@oracle.com</email>
</author>
<published>2011-07-24T17:34:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=619c200de144b44f5e405305241bcd7edbb8c6cf'/>
<id>urn:sha1:619c200de144b44f5e405305241bcd7edbb8c6cf</id>
<content type='text'>
Convert useful messages from ML_NOTICE to KERN_NOTICE to improve readability.

Signed-off-by: Sunil Mushran &lt;sunil.mushran@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Remove mlog(0) from fs/ocfs2/slot_map.c</title>
<updated>2011-02-22T14:29:08+00:00</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2011-02-22T14:29:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a8731086eff053b430cddbf5783654dfd700ea06'/>
<id>urn:sha1:a8731086eff053b430cddbf5783654dfd700ea06</id>
<content type='text'>
This is the 1st step to remove the debug info of SUPER.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Remove EXIT from masklog.</title>
<updated>2011-03-07T08:43:21+00:00</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2011-03-07T08:43:21+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c1e8d35ef5ffb393b94a192034b5e3541e005d75'/>
<id>urn:sha1:c1e8d35ef5ffb393b94a192034b5e3541e005d75</id>
<content type='text'>
mlog_exit is used to record the exit status of a function.
But because it is added in so many functions, if we enable it,
the system logs get filled up quickly and cause too much I/O.
So actually no one can open it for a production system or even
for a test.

This patch just try to remove it or change it. So:
1. if all the error paths already use mlog_errno, it is just removed.
   Otherwise, it will be replaced by mlog_errno.
2. if it is used to print some return value, it is replaced with
   mlog(0,...).
mlog_exit_ptr is changed to mlog(0.
All those mlog(0,...) will be replaced with trace events later.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
</content>
</entry>
</feed>
