<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/ext4, branch v2016.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>fs: ext4: Prevent infinite loop in ext4fs_iterate_dir</title>
<updated>2015-11-23T16:01:52+00:00</updated>
<author>
<name>Thomas Fitzsimmons</name>
<email>fitzsim@cisco.com</email>
</author>
<published>2015-11-18T17:42:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=54d68e9333ff65d135faac68fa01be4276f1371f'/>
<id>54d68e9333ff65d135faac68fa01be4276f1371f</id>
<content type='text'>
If the ext3 journal gets out of sync with what is written on disk, for
example because of an unexpected power cut, ext4fs_read_file can
return an all-zero directory entry.  In that case, ext4fs_iterate_dir
would infinite loop.

This patch detects when a directory entry's direntlen member is 0 and
returns a failure status, which breaks out of the infinite loop.  As a
result, U-Boot will not find files that may subsequently be recovered
when the journal is replayed.

This is better behaviour than hanging in an infinite loop, but as a
further improvement maybe U-Boot could interpret the ext3 journal and
actually find the unsynced entries.

Signed-off-by: Thomas Fitzsimmons &lt;fitzsim@cisco.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the ext3 journal gets out of sync with what is written on disk, for
example because of an unexpected power cut, ext4fs_read_file can
return an all-zero directory entry.  In that case, ext4fs_iterate_dir
would infinite loop.

This patch detects when a directory entry's direntlen member is 0 and
returns a failure status, which breaks out of the infinite loop.  As a
result, U-Boot will not find files that may subsequently be recovered
when the journal is replayed.

This is better behaviour than hanging in an infinite loop, but as a
further improvement maybe U-Boot could interpret the ext3 journal and
actually find the unsynced entries.

Signed-off-by: Thomas Fitzsimmons &lt;fitzsim@cisco.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ext4: fix symlink read function</title>
<updated>2015-09-11T21:15:29+00:00</updated>
<author>
<name>Gary Bisson</name>
<email>gary.bisson@boundarydevices.com</email>
</author>
<published>2015-09-07T09:20:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9d2f6a9ae70d06e4cead539e57f264c980643f53'/>
<id>9d2f6a9ae70d06e4cead539e57f264c980643f53</id>
<content type='text'>
Since last API changes for files &gt;2GB, the read of symlink is broken as
ext4fs_read_file now returns 0 instead of the length of the actual read.

Signed-off-by: Gary Bisson &lt;gary.bisson@boundarydevices.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since last API changes for files &gt;2GB, the read of symlink is broken as
ext4fs_read_file now returns 0 instead of the length of the actual read.

Signed-off-by: Gary Bisson &lt;gary.bisson@boundarydevices.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: fix leak in check_filename()</title>
<updated>2015-09-11T21:15:23+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-09-05T04:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d56b2015e6d5695d009d8e5e3930cbf34c3b5da0'/>
<id>d56b2015e6d5695d009d8e5e3930cbf34c3b5da0</id>
<content type='text'>
root_first_block_buffer should be free()d in all cases, not just when an
error occurs. Fix the success exit path of the function to do this.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
root_first_block_buffer should be free()d in all cases, not just when an
error occurs. Fix the success exit path of the function to do this.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: free allocations by parse_path()</title>
<updated>2015-09-11T21:15:22+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-09-05T04:03:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=934b14f2bb306dfa1947d30f4df90cdc8b710332'/>
<id>934b14f2bb306dfa1947d30f4df90cdc8b710332</id>
<content type='text'>
parse_path() malloc()s the entries in the array it's passed. Those
allocations must be free()d by the caller, ext4fs_get_parent_inode_num().
Add code to do this.

For this to work, all the array entries must be dynamically allocated,
rather than a mix of dynamic and static allocations. Fix parse_path() not
to over-write arr[0] with a pointer to statically allocated data.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
parse_path() malloc()s the entries in the array it's passed. Those
allocations must be free()d by the caller, ext4fs_get_parent_inode_num().
Add code to do this.

For this to work, all the array entries must be dynamically allocated,
rather than a mix of dynamic and static allocations. Fix parse_path() not
to over-write arr[0] with a pointer to statically allocated data.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: avoid calling ext4fs_mount() twice, which leaks</title>
<updated>2015-09-11T21:15:22+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-09-05T04:03:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=676505f5ce6c621d8c28958d600dcf92bcf76574'/>
<id>676505f5ce6c621d8c28958d600dcf92bcf76574</id>
<content type='text'>
ext4_write_file() is only called from the "fs" layer, which calls both
ext4fs_mount() and ext4fs_close() before/after calling ext4_write_file().
Fix ext4_write_file() not to call ext4fs_mount() again, since the mount
operation malloc()s some RAM which is leaked when a second mount call
over-writes the pointer to that data, if no intervening close call is
made.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ext4_write_file() is only called from the "fs" layer, which calls both
ext4fs_mount() and ext4fs_close() before/after calling ext4_write_file().
Fix ext4_write_file() not to call ext4fs_mount() again, since the mount
operation malloc()s some RAM which is leaked when a second mount call
over-writes the pointer to that data, if no intervening close call is
made.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header</title>
<updated>2015-09-11T21:15:20+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-09-02T23:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cf92e05c0135bc2b1a1b25a3218e31e6d79bad59'/>
<id>cf92e05c0135bc2b1a1b25a3218e31e6d79bad59</id>
<content type='text'>
Now that we have a new header file for cache-aligned allocation, we should
move the stack-based allocation macro there also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have a new header file for cache-aligned allocation, we should
move the stack-based allocation macro there also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: ext4 write: return file len on success</title>
<updated>2015-03-06T01:49:42+00:00</updated>
<author>
<name>Przemyslaw Marczak</name>
<email>p.marczak@samsung.com</email>
</author>
<published>2015-02-17T14:31:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=22b7509efb35d7bda05260d5730124dbdc3ea9dc'/>
<id>22b7509efb35d7bda05260d5730124dbdc3ea9dc</id>
<content type='text'>
After rework of the file system API, the size of ext4
write was missed. This causes printing unreliable write
size at the end of the file system write operation.

Signed-off-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
Cc: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After rework of the file system API, the size of ext4
write was missed. This causes printing unreliable write
size at the end of the file system write operation.

Signed-off-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
Cc: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/ext4/ext4fs.c, fs/fs.c fs/fat/fat_write.c: Adjust 64bit math methods</title>
<updated>2014-12-01T20:21:57+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@ti.com</email>
</author>
<published>2014-11-24T16:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf'/>
<id>9e374e7b729dc9f68be89cd3e3b1d4d48c768ecf</id>
<content type='text'>
The changes to introduce loff_t into filesize means that we need to do
64bit math on 32bit platforms.  Make sure we use the right wrappers for
these operations.

Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
Tested-by: Pierre Aubert &lt;p.aubert@staubli.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changes to introduce loff_t into filesize means that we need to do
64bit math on 32bit platforms.  Make sure we use the right wrappers for
these operations.

Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
Tested-by: Pierre Aubert &lt;p.aubert@staubli.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: API changes enabling extra parameter to return size of type loff_t</title>
<updated>2014-11-23T11:49:04+00:00</updated>
<author>
<name>Suriyan Ramasami</name>
<email>suriyan.r@gmail.com</email>
</author>
<published>2014-11-17T22:39:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d455d8789d5b35a39a0a179b3af4b423db13bfdd'/>
<id>d455d8789d5b35a39a0a179b3af4b423db13bfdd</id>
<content type='text'>
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files
greater than 2GB. Negative values are returned in such cases.

To handle this, the fs functions have been modified to take an additional
parameter of type "* loff_t" which is then populated. The return value
of the fs functions are used only for error conditions.

Signed-off-by: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Update board/gdsys/p1022/controlcenterd-id.c,
drivers/fpga/zynqpl.c for changes]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files
greater than 2GB. Negative values are returned in such cases.

To handle this, the fs functions have been modified to take an additional
parameter of type "* loff_t" which is then populated. The return value
of the fs functions are used only for error conditions.

Signed-off-by: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Update board/gdsys/p1022/controlcenterd-id.c,
drivers/fpga/zynqpl.c for changes]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Prepare API change for files greater than 2GB</title>
<updated>2014-11-23T11:49:04+00:00</updated>
<author>
<name>Suriyan Ramasami</name>
<email>suriyan.r@gmail.com</email>
</author>
<published>2014-11-17T22:39:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9f12cd0e062614e19734b2ab37842d387457c5e5'/>
<id>9f12cd0e062614e19734b2ab37842d387457c5e5</id>
<content type='text'>
Change the internal EXT4 functions to use loff_t for offsets.

Signed-off-by: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Update common/spl/spl_ext.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the internal EXT4 functions to use loff_t for offsets.

Signed-off-by: Suriyan Ramasami &lt;suriyan.r@gmail.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
[trini: Update common/spl/spl_ext.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
