<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.5.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2016-06-08T01:20:47Z</updated>
<entry>
<title>Linux 4.5.7</title>
<updated>2016-06-08T01:20:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-06-08T01:20:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8c596d17b461638be9b12d096e8274b6bd3dd6b6'/>
<id>urn:sha1:8c596d17b461638be9b12d096e8274b6bd3dd6b6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>btrfs: make state preallocation more speculative in __set_extent_bit</title>
<updated>2016-06-08T01:18:56Z</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-04-26T23:03:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c396d335d89fc0fc21032b478ef610fdd0b08906'/>
<id>urn:sha1:c396d335d89fc0fc21032b478ef610fdd0b08906</id>
<content type='text'>
commit 059f791c6bbaba72dc3c1bd6e2657aacc8552849 upstream.

Similar to __clear_extent_bit, do not fail if the state preallocation
fails as we might not need it. One less BUG_ON.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>btrfs: scrub: Set bbio to NULL before calling btrfs_map_block</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Zhao Lei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2016-05-17T09:37:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f8f2b9dd9ccb165fa472855ef98e624e3173f8dd'/>
<id>urn:sha1:f8f2b9dd9ccb165fa472855ef98e624e3173f8dd</id>
<content type='text'>
commit f1fee6534dcfbf468a159789aa202db2bce8c200 upstream.

We usually call btrfs_put_bbio() when btrfs_map_block() failed,
btrfs_put_bbio() works right whether bbio is a valid value, or NULL.

But there is a exception, in some case, btrfs_map_block() will return
fail without touching *bbio(keeping its original value), and if bbio
was not initialized yet, invalid memory accessing will happened.

Above case is in scrub_missing_raid56_pages(), and similar case in
scrub_raid56_parity().

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: fix unexpected return value of fiemap</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2016-05-18T00:21:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=327b1cf89e87607cf1d999a27481245b2610149c'/>
<id>urn:sha1:327b1cf89e87607cf1d999a27481245b2610149c</id>
<content type='text'>
commit 2d324f59f343967a03eeb2690f0ff178304d0687 upstream.

btrfs's fiemap is supposed to return 0 on success and return &lt; 0 on
error. however, ret becomes 1 after looking up the last file extent:

  btrfs_lookup_file_extent -&gt;
    btrfs_search_slot(..., ins_len=0, cow=0)

and if the offset is beyond EOF, we'll get 'path' pointed to the place
of potentail insertion, and ret == 1.

This may confuse applications using ioctl(FIEL_IOC_FIEMAP).

Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: fix empty symlink after creating symlink and fsync parent dir</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2016-04-25T03:45:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ac5414fc59a48c5a9fb7b1f0e98251dbd4f2f0f4'/>
<id>urn:sha1:ac5414fc59a48c5a9fb7b1f0e98251dbd4f2f0f4</id>
<content type='text'>
commit 3f9749f6e9edcf8ec569fb542efc3be35e06e84a upstream.

If we create a symlink, fsync its parent directory, crash/power fail and
mount the filesystem, we end up with an empty symlink, which not only is
useless it's also not allowed in linux (the man page symlink(2) is well
explicit about that).  So we just need to make sure to fully log an inode
if it's a symlink, to ensure its inline extent gets logged, ensuring the
same behaviour as ext3, ext4, xfs, reiserfs, f2fs, nilfs2, etc.

Example reproducer:

  $ mkfs.btrfs -f /dev/sdb
  $ mount /dev/sdb /mnt
  $ mkdir /mnt/testdir
  $ sync
  $ ln -s /mnt/foo /mnt/testdir/bar
  $ xfs_io -c fsync /mnt/testdir
  &lt;power fail&gt;
  $ mount /dev/sdb /mnt
  $ readlink /mnt/testdir/bar
  &lt;empty string&gt;

A test case for fstests follows soon.

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: fix for incorrect directory entries after fsync log replay</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2016-04-06T16:11:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ec450cd597ef50e2ebcf8e11ed12130d8a19fec9'/>
<id>urn:sha1:ec450cd597ef50e2ebcf8e11ed12130d8a19fec9</id>
<content type='text'>
commit 657ed1aa4898c8304500e0d13f240d5a67e8be5f upstream.

If we move a directory to a new parent and later log that parent and don't
explicitly log the old parent, when we replay the log we can end up with
entries for the moved directory in both the old and new parent directories.
Besides being ilegal to have directories with multiple hard links in linux,
it also resulted in the leaving the inode item with a link count of 1.
A similar issue also happens if we move a regular file - after the log tree
is replayed the file has a link in both the old and new parent directories,
when it should be only at the new directory.

Sample reproducer:

  $ mkfs.btrfs -f /dev/sdc
  $ mount /dev/sdc /mnt
  $ mkdir /mnt/x
  $ mkdir /mnt/y
  $ touch /mnt/x/foo
  $ mkdir /mnt/y/z
  $ sync
  $ ln /mnt/x/foo /mnt/x/bar
  $ mv /mnt/y/z /mnt/x/z
  &lt; power fail &gt;
  $ mount /dev/sdc /mnt
  $ ls -1Ri /mnt
  /mnt:
  257 x
  258 y

  /mnt/x:
  259 bar
  259 foo
  260 z

  /mnt/x/z:

  /mnt/y:
  260 z

  /mnt/y/z:

  $ umount /dev/sdc
  $ btrfs check /dev/sdc
  Checking filesystem on /dev/sdc
  UUID: a67e2c4a-a4b4-4fdc-b015-9d9af1e344be
  checking extents
  checking free space cache
  checking fs roots
  root 5 inode 260 errors 2000, link count wrong
        unresolved ref dir 257 index 4 namelen 1 name z filetype 2 errors 0
        unresolved ref dir 258 index 2 namelen 1 name z filetype 2 errors 0
  (...)

Attempting to remove the directory becomes impossible:

  $ mount /dev/sdc /mnt
  $ rmdir /mnt/y/z
  $ ls -lh /mnt/y
  ls: cannot access /mnt/y/z: No such file or directory
  total 0
  d????????? ? ? ? ?            ? z
  $ rmdir /mnt/x/z
  rmdir: failed to remove ‘/mnt/x/z’: Stale file handle
  $ ls -lh /mnt/x
  ls: cannot access /mnt/x/z: Stale file handle
  total 0
  -rw-r--r-- 2 root root 0 Apr  6 18:06 bar
  -rw-r--r-- 2 root root 0 Apr  6 18:06 foo
  d????????? ? ?    ?    ?            ? z

So make sure that on rename we set the last_unlink_trans value for our
inode, even if it's a directory, to the value of the current transaction's
ID and that if the new parent directory is logged that we fallback to a
transaction commit.

A test case for fstests is being submitted as well.

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>btrfs: pass the right error code to the btrfs_std_error</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Anand Jain</name>
<email>anand.jain@oracle.com</email>
</author>
<published>2016-03-10T04:22:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ea5cce51c0a9a22aa016e1c7b7c62452124ae12'/>
<id>urn:sha1:5ea5cce51c0a9a22aa016e1c7b7c62452124ae12</id>
<content type='text'>
commit ad8403df054c9b5dc3175a26c6179571b9cafa4e upstream.

Also drop the newline from the message.

Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>btrfs: fix memory leak during RAID 5/6 device replacement</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Scott Talbert</name>
<email>scott.talbert@hgst.com</email>
</author>
<published>2016-05-09T13:14:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7281989d24e3e286ab745f0f5a75ab8ac761854d'/>
<id>urn:sha1:7281989d24e3e286ab745f0f5a75ab8ac761854d</id>
<content type='text'>
commit 4673272f43ae790ab9ec04e38a7542f82bb8f020 upstream.

A 'struct bio' is allocated in scrub_missing_raid56_pages(), but it was never
freed anywhere.

Signed-off-by: Scott Talbert &lt;scott.talbert@hgst.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Btrfs: fix fspath error deallocation</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Vincent Stehlé</name>
<email>vincent.stehle@intel.com</email>
</author>
<published>2016-05-10T12:56:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b9cd7ba4dd03492246c2a717854803699bcad174'/>
<id>urn:sha1:b9cd7ba4dd03492246c2a717854803699bcad174</id>
<content type='text'>
commit 72928f2476d08c79f132b4f44a17c9a011dd98e3 upstream.

Make sure to deallocate fspath with vfree() in case of error in
init_ipath().

fspath is allocated with vmalloc() in init_data_container() since
commit 425d17a290c0 ("Btrfs: use larger limit for translation of logical to
inode").

Signed-off-by: Vincent Stehlé &lt;vincent.stehle@intel.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>btrfs: fix int32 overflow in shrink_delalloc().</title>
<updated>2016-06-08T01:18:55Z</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2016-05-08T13:08:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f97bce9f0c792712767dcff09e46b0617c1462a4'/>
<id>urn:sha1:f97bce9f0c792712767dcff09e46b0617c1462a4</id>
<content type='text'>
commit 8eb0dfdbda3f56bf7d248ed87fcc383df114ecbb upstream.

UBSAN: Undefined behaviour in fs/btrfs/extent-tree.c:4623:21
signed integer overflow:
10808 * 262144 cannot be represented in type 'int [8]'

If 8192&lt;=items&lt;16384, we request a writeback of an insane number of pages
which is benign (everything will be written).  But if items&gt;=16384, the
space reservation won't be enough.

Signed-off-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
