<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/fs/ocfs2/localalloc.c, branch v4.4.4</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2015-09-04T23:54:41+00:00</updated>
<entry>
<title>ocfs2: neaten do_error, ocfs2_error and ocfs2_abort</title>
<updated>2015-09-04T23:54:41+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-09-04T22:44:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=7ecef14ab1db961545354fa443749aeda2ea1b75'/>
<id>urn:sha1:7ecef14ab1db961545354fa443749aeda2ea1b75</id>
<content type='text'>
These uses sometimes do and sometimes don't have '\n' terminations.  Make
the uses consistently use '\n' terminations and remove the newline from
the functions.

Miscellanea:

o Coalesce formats
o Realign arguments

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reviewed-by: 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: fix possible uninitialized variable access</title>
<updated>2015-04-14T23:48:58+00:00</updated>
<author>
<name>Joseph Qi</name>
<email>joseph.qi@huawei.com</email>
</author>
<published>2015-04-14T22:43:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=023d4ea358494ccfeb37abfe5b0fd01b45a6051c'/>
<id>urn:sha1:023d4ea358494ccfeb37abfe5b0fd01b45a6051c</id>
<content type='text'>
In ocfs2_local_alloc_find_clear_bits and ocfs2_get_dentry, variable
numfound and set may be uninitialized and then used in tracepoint.  In
ocfs2_xattr_block_get and ocfs2_delete_xattr_in_bucket, variable block_off
and xv may be uninitialized and then used in the following logic due to
unchecked return value.

This patch fixes these possible issues.

Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.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>ocfs2: fix typo in ocfs2_reserve_local_alloc_bits</title>
<updated>2015-04-14T23:48:57+00:00</updated>
<author>
<name>Joseph Qi</name>
<email>joseph.qi@huawei.com</email>
</author>
<published>2015-04-14T22:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d0ba25b905ba1246d04578cd59df83014e9b9152'/>
<id>urn:sha1:d0ba25b905ba1246d04578cd59df83014e9b9152</id>
<content type='text'>
In ocfs2_reserve_local_alloc_bits, it calls ocfs2_error if local alloc
inode bitmap used bits mismatch, but the log mistakes it as free bits.

Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.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>ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters</title>
<updated>2014-02-06T21:48:51+00:00</updated>
<author>
<name>Zongxun Wang</name>
<email>wangzongxun@huawei.com</email>
</author>
<published>2014-02-06T20:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=fb951eb5e167de9f07973ce0dfff674a2019bfab'/>
<id>urn:sha1:fb951eb5e167de9f07973ce0dfff674a2019bfab</id>
<content type='text'>
Even if using the same jbd2 handle, we cannot rollback a transaction.
So once some error occurs after successfully allocating clusters, the
allocated clusters will never be used and it means they are lost.  For
example, call ocfs2_claim_clusters successfully when expanding a file,
but failed in ocfs2_insert_extent.  So we need free the allocated
clusters if they are not used indeed.

Signed-off-by: Zongxun Wang &lt;wangzongxun@huawei.com&gt;
Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Acked-by: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Li Zefan &lt;lizefan@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: ac_bits_wanted should be local_alloc_bits when returns -ENOSPC</title>
<updated>2013-09-11T22:56:31+00:00</updated>
<author>
<name>Younger Liu</name>
<email>younger.liu@huawei.com</email>
</author>
<published>2013-09-11T21:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=7e9b79370733945b25c24e09d663b07c3936d10c'/>
<id>urn:sha1:7e9b79370733945b25c24e09d663b07c3936d10c</id>
<content type='text'>
There is an issue in reserving and claiming space for localalloc, When
localalloc space is not enough, it would claim space from global_bitmap.
And if there is not enough free space in global_bitmap, the size of
claiming space would set to half of orignal size and retry.

The issue is as follows: osb-&gt;local_alloc_bits is set to half of orignal
size in ocfs2_recalc_la_window(), but ac-&gt;ac_bits_wanted is set to
osb-&gt;local_alloc_default_bits which is not changed.  localalloc always
reserves and claims local_alloc_default_bits space and returns ENOSPC.

So, ac-&gt;ac_bits_wanted should be osb-&gt;local_alloc_bits which would be
changed.

Signed-off-by: Younger Liu &lt;younger.liu@huawei.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Jeff Liu &lt;jeff.liu@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: remove kfree() redundant null checks</title>
<updated>2013-02-22T01:22:19+00:00</updated>
<author>
<name>Tim Gardner</name>
<email>tim.gardner@canonical.com</email>
</author>
<published>2013-02-22T00:42:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d787ab0977c58e2c421b8d0ab49e363893ddb814'/>
<id>urn:sha1:d787ab0977c58e2c421b8d0ab49e363893ddb814</id>
<content type='text'>
smatch analysis indicates a number of redundant NULL checks before
calling kfree(), eg:

  fs/ocfs2/alloc.c:6138 ocfs2_begin_truncate_log_recovery() info:
   redundant null check on *tl_copy calling kfree()

  fs/ocfs2/alloc.c:6755 ocfs2_zero_range_for_truncate() info:
   redundant null check on pages calling kfree()

etc....

[akpm@linux-foundation.org: revert dubious change in ocfs2_begin_truncate_log_recovery()]
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Acked-by: 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: use memweight()</title>
<updated>2012-07-31T00:25:16+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2012-07-30T21:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a75613ec73ec87726a81fe421385a13c25fdcfc4'/>
<id>urn:sha1:a75613ec73ec87726a81fe421385a13c25fdcfc4</id>
<content type='text'>
Use memweight to count the total number of bits set in memory area.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.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>ocfs2: Remove DISK_ALLOC from masklog.</title>
<updated>2011-02-22T00:01:27+00:00</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2011-02-22T00:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=81bad69749623062fae2f94e2d98dd43d95a36f4'/>
<id>urn:sha1:81bad69749623062fae2f94e2d98dd43d95a36f4</id>
<content type='text'>
Since all 4 files, localalloc.c, suballoc.c, alloc.c and
resize.c, which use DISK_ALLOC are changed to trace events,
Remove masklog DISK_ALLOC totally.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Remove mlog(0) from fs/ocfs2/localalloc.c</title>
<updated>2011-02-21T23:56:45+00:00</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2011-02-21T23:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a04733d8afad9cd0bfb8269173e30d28fb96088e'/>
<id>urn:sha1:a04733d8afad9cd0bfb8269173e30d28fb96088e</id>
<content type='text'>
This is the 2nd step to remove the debug info of DISK_ALLOC.

So this patch removes all mlog(0,...) from localalloc.c and adds
the corresponding tracepoints. Different mlogs have different
solutions.
1. Some are replaced with trace event directly.
2. Some are replaced while some new parameters are added.
3. Some are combined into one trace events.
4. Some redundant mlogs are removed.

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='https://git.raptorcs.com/git/talos-op-linux/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>
