<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/tree-log.h, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-04-29T17:02:41Z</updated>
<entry>
<title>btrfs: get fs_info from trans in btrfs_set_log_full_commit</title>
<updated>2019-04-29T17:02:41Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2019-03-20T12:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=907877664e2d858b9344e3a46ceeb2e74425e81f'/>
<id>urn:sha1:907877664e2d858b9344e3a46ceeb2e74425e81f</id>
<content type='text'>
We can read fs_info from the transaction and can drop it from the
parameters.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: get fs_info from trans in btrfs_need_log_full_commit</title>
<updated>2019-04-29T17:02:41Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2019-03-20T12:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4884b8e8ebf54e1654bddd9721b9b00e69d6a148'/>
<id>urn:sha1:4884b8e8ebf54e1654bddd9721b9b00e69d6a148</id>
<content type='text'>
We can read fs_info from the transaction and can drop it from the
parameters.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: remove no longer used io_err from btrfs_log_ctx</title>
<updated>2018-12-17T13:51:31Z</updated>
<author>
<name>Filipe Manana</name>
</author>
<published>2018-11-12T10:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d4cbf790307515dcd91eb2165e36e9b83d0fab6'/>
<id>urn:sha1:6d4cbf790307515dcd91eb2165e36e9b83d0fab6</id>
<content type='text'>
The io_err field of struct btrfs_log_ctx is no longer used after the
recent simplification of the fast fsync path, where we now wait for
ordered extents to complete before logging the inode. We did this in
commit b5e6c3e170b7 ("btrfs: always wait on ordered extents at fsync
time") and commit a2120a473a80 ("btrfs: clean up the left over
logged_list usage") removed its last use.

Reviewed-by: Nikolay Borisov &lt;nborisov@suse.com&gt;
Reviewed-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: change btrfs_pin_log_trans to return void</title>
<updated>2018-10-15T15:23:27Z</updated>
<author>
<name>zhong jiang</name>
</author>
<published>2018-08-16T16:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45128b08f74131753a10a584e3e5c4496b279269'/>
<id>urn:sha1:45128b08f74131753a10a584e3e5c4496b279269</id>
<content type='text'>
btrfs_pin_log_trans defines the variable "ret" for return value, but it
is not modified after initialization. Further, I find that none of the
callers do handles the return value, so it is safe to drop the unneeded
"ret" and make it return void.

Signed-off-by: zhong jiang &lt;zhongjiang@huawei.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: sync log after logging new name</title>
<updated>2018-08-23T15:37:26Z</updated>
<author>
<name>Filipe Manana</name>
</author>
<published>2018-06-11T18:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4682ba03ef618b6ef4be7cedc7aacaf505d3a58'/>
<id>urn:sha1:d4682ba03ef618b6ef4be7cedc7aacaf505d3a58</id>
<content type='text'>
When we add a new name for an inode which was logged in the current
transaction, we update the inode in the log so that its new name and
ancestors are added to the log. However when we do this we do not persist
the log, so the changes remain in memory only, and as a consequence, any
ancestors that were created in the current transaction are updated such
that future calls to btrfs_inode_in_log() return true. This leads to a
subsequent fsync against such new ancestor directories returning
immediately, without persisting the log, therefore after a power failure
the new ancestor directories do not exist, despite fsync being called
against them explicitly.

Example:

  $ mkfs.btrfs -f /dev/sdb
  $ mount /dev/sdb /mnt

  $ mkdir /mnt/A
  $ mkdir /mnt/B
  $ mkdir /mnt/A/C
  $ touch /mnt/B/foo
  $ xfs_io -c "fsync" /mnt/B/foo
  $ ln /mnt/B/foo /mnt/A/C/foo
  $ xfs_io -c "fsync" /mnt/A
  &lt;power failure&gt;

After the power failure, directory "A" does not exist, despite the explicit
fsync on it.

Instead of fixing this by changing the behaviour of the explicit fsync on
directory "A" to persist the log instead of doing nothing, make the logging
of the new file name (which happens when creating a hard link or renaming)
persist the log. This approach not only is simpler, not requiring addition
of new fields to the inode in memory structure, but also gives us the same
behaviour as ext4, xfs and f2fs (possibly other filesystems too).

A test case for fstests follows soon.

Fixes: 12fcfd22fe5b ("Btrfs: tree logging unlink/rename fixes")
Reported-by: Vijay Chidambaram &lt;vvijay03@gmail.com&gt;
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: replace GPL boilerplate by SPDX -- headers</title>
<updated>2018-04-12T14:29:46Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2018-04-03T17:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9888c3402c8567a977de37f61e9dd87792723064'/>
<id>urn:sha1:9888c3402c8567a977de37f61e9dd87792723064</id>
<content type='text'>
Remove GPL boilerplate text (long, short, one-line) and keep the rest,
ie. personal, company or original source copyright statements. Add the
SPDX header.

Unify the include protection macros to match the file names.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: Remove root argument from btrfs_log_dentry_safe</title>
<updated>2018-03-26T13:09:42Z</updated>
<author>
<name>Nikolay Borisov</name>
</author>
<published>2018-02-27T15:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5b84f7a258a8344947e8b955b8c2648008d8ccc'/>
<id>urn:sha1:e5b84f7a258a8344947e8b955b8c2648008d8ccc</id>
<content type='text'>
Now that nothing uses the root arg of btrfs_log_dentry_safe it can be
safely removed. No functional changes.

Signed-off-by: Nikolay Borisov &lt;nborisov@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: Make btrfs_del_inode_ref take btrfs_inode</title>
<updated>2017-02-14T14:50:54Z</updated>
<author>
<name>Nikolay Borisov</name>
</author>
<published>2017-01-17T22:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a491abb2e730955df1620165a193678fd775c2d6'/>
<id>urn:sha1:a491abb2e730955df1620165a193678fd775c2d6</id>
<content type='text'>
Signed-off-by: Nikolay Borisov &lt;n.borisov.lkml@gmail.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: Make btrfs_del_dir_entries_in_log take btrfs_inode</title>
<updated>2017-02-14T14:50:54Z</updated>
<author>
<name>Nikolay Borisov</name>
</author>
<published>2017-01-17T22:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49f34d1f968fb1e00dd782a2ea27e9910629a3f6'/>
<id>urn:sha1:49f34d1f968fb1e00dd782a2ea27e9910629a3f6</id>
<content type='text'>
Signed-off-by: Nikolay Borisov &lt;n.borisov.lkml@gmail.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: Make btrfs_log_new_name take btrfs_inode</title>
<updated>2017-02-14T14:50:54Z</updated>
<author>
<name>Nikolay Borisov</name>
</author>
<published>2017-01-17T22:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ca5fbfbb92e91933510f0903b2492e5e7b45464'/>
<id>urn:sha1:9ca5fbfbb92e91933510f0903b2492e5e7b45464</id>
<content type='text'>
Signed-off-by: Nikolay Borisov &lt;n.borisov.lkml@gmail.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
</feed>
