<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ocfs2/alloc.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-02-11T00:01:43Z</updated>
<entry>
<title>ocfs2: fix issue that ocfs2_setattr() does not deal with new_i_size==i_size</title>
<updated>2014-02-11T00:01:43Z</updated>
<author>
<name>Younger Liu</name>
</author>
<published>2014-02-10T22:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d62e74be1270c89fbaf7aada8218bfdf62d00a58'/>
<id>urn:sha1:d62e74be1270c89fbaf7aada8218bfdf62d00a58</id>
<content type='text'>
The issue scenario is as following:

- Create a small file and fallocate a large disk space for a file with
  FALLOC_FL_KEEP_SIZE option.

- ftruncate the file back to the original size again.  but the disk free
  space is not changed back.  This is a real bug that be fixed in this
  patch.

In order to solve the issue above, we modified ocfs2_setattr(), if
attr-&gt;ia_size != i_size_read(inode), It calls ocfs2_truncate_file(), and
truncate disk space to attr-&gt;ia_size.

Signed-off-by: Younger Liu &lt;younger.liu@huawei.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Tested-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Sunil Mushran &lt;sunil.mushran@gmail.com&gt;
Reviewed-by: Jensen &lt;shencanquan@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: free allocated clusters if error occurs after ocfs2_claim_clusters</title>
<updated>2014-02-06T21:48:51Z</updated>
<author>
<name>Zongxun Wang</name>
</author>
<published>2014-02-06T20:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: return EINVAL if the given range to discard is less than block size</title>
<updated>2014-01-22T00:19:42Z</updated>
<author>
<name>Jie Liu</name>
</author>
<published>2014-01-21T23:48:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa89762c54800208d5afdcd8e6bf124818f17fe0'/>
<id>urn:sha1:aa89762c54800208d5afdcd8e6bf124818f17fe0</id>
<content type='text'>
For FITRIM ioctl(2), we should not keep silence if the given range
length ls less than a block size as there is no data blocks would be
discareded.  Hence it should return EINVAL instead.  This issue can be
verified via xfstests/generic/288 which is used for FITRIM argument
handling tests.

Signed-off-by: Jie Liu &lt;jeff.liu@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>ocfs2: return ENOMEM when sb_getblk() fails</title>
<updated>2013-11-13T03:09:00Z</updated>
<author>
<name>Rui Xiang</name>
</author>
<published>2013-11-12T23:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7391a294b861bf2c3b762dfdcf61b9c5f1bffa1f'/>
<id>urn:sha1:7391a294b861bf2c3b762dfdcf61b9c5f1bffa1f</id>
<content type='text'>
The only reason for sb_getblk() failing is if it can't allocate the
buffer_head.  So return ENOMEM instead when it fails.

[joseph.qi@huawei.com: ocfs2_symlink_get_block() and ocfs2_read_blocks_sync() and ocfs2_read_blocks() need the same change]
Signed-off-by: Rui Xiang &lt;rui.xiang@huawei.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&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 mutex_unlock and possible memory leak in ocfs2_remove_btree_range</title>
<updated>2013-07-03T23:07:23Z</updated>
<author>
<name>Joseph Qi</name>
</author>
<published>2013-07-03T22:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33add0e3a09a62c7796ea9838243c1cd933d8543'/>
<id>urn:sha1:33add0e3a09a62c7796ea9838243c1cd933d8543</id>
<content type='text'>
In ocfs2_remove_btree_range, when calling ocfs2_lock_refcount_tree and
ocfs2_prepare_refcount_change_for_del failed, it goes to out and then
tries to call mutex_unlock without mutex_lock before.  And when calling
ocfs2_reserve_blocks_for_rec_trunc failed, it should free ref_tree
before return.

Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Reviewed-by: Jie Liu &lt;jeff.liu@oracle.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.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:19Z</updated>
<author>
<name>Tim Gardner</name>
</author>
<published>2013-02-22T00:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: -&gt;l_next_free_req breakage on big-endian</title>
<updated>2012-04-13T16:31:37Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2012-04-13T16:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a251f04fe97c3d335b745c98e4b377e3c3899f2'/>
<id>urn:sha1:3a251f04fe97c3d335b745c98e4b377e3c3899f2</id>
<content type='text'>
It's le16, not le32...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ocfs2: Commit transactions in error cases -v2</title>
<updated>2011-11-17T09:46:47Z</updated>
<author>
<name>Wengang Wang</name>
</author>
<published>2011-10-12T07:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8a0ae579fb8d9b21008ac386be08b9428902455'/>
<id>urn:sha1:b8a0ae579fb8d9b21008ac386be08b9428902455</id>
<content type='text'>
There are three cases found that in error cases, journal transactions are not
committed nor aborted. We should take care of these case by committing the
transactions. Otherwise, there would left a journal handle which will lead to
, in same process context, the comming ocfs2_start_trans() gets wrong credits.

Signed-off-by: Wengang Wang &lt;wen.gang.wang@oracle.com&gt;
Signed-off-by: Joel Becker &lt;jlbec@evilplan.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: Add trace event for trim.</title>
<updated>2011-05-24T06:37:20Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2011-05-23T02:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10fca35ff12ad2a7017bce6567cffe9da443d7a2'/>
<id>urn:sha1:10fca35ff12ad2a7017bce6567cffe9da443d7a2</id>
<content type='text'>
Add the corresponding trace event for trim.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
Signed-off-by: Joel Becker &lt;jlbec@evilplan.org&gt;
</content>
</entry>
<entry>
<title>ocfs2: Add ocfs2_trim_fs for SSD trim support.</title>
<updated>2011-05-24T06:37:18Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2011-05-23T02:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e80de36d8dbff216a384e9204e54d59deeadf344'/>
<id>urn:sha1:e80de36d8dbff216a384e9204e54d59deeadf344</id>
<content type='text'>
Add ocfs2_trim_fs to support trimming freed clusters in the
volume. A range will be given and all the freed clusters greater
than minlen will be discarded to the block layer.

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