<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/super.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-09-25T19:08:41Z</updated>
<entry>
<title>Merge branch 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2015-09-25T19:08:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-09-25T19:08:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03e8f644868f147e021e8660346890e731c2e435'/>
<id>urn:sha1:03e8f644868f147e021e8660346890e731c2e435</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "This is an assorted set I've been queuing up:

  Jeff Mahoney tracked down a tricky one where we ended up starting IO
  on the wrong mapping for special files in btrfs_evict_inode.  A few
  people reported this one on the list.

  Filipe found (and provided a test for) a difficult bug in reading
  compressed extents, and Josef fixed up some quota record keeping with
  snapshot deletion.  Chandan killed off an accounting bug during DIO
  that lead to WARN_ONs as we freed inodes"

* 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: keep dropped roots in cache until transaction commit
  Btrfs: Direct I/O: Fix space accounting
  btrfs: skip waiting on ordered range for special files
  Btrfs: fix read corruption of compressed and shared extents
  Btrfs: remove unnecessary locking of cleaner_mutex to avoid deadlock
  Btrfs: don't initialize a space info as full to prevent ENOSPC
</content>
</entry>
<entry>
<title>Btrfs: remove unnecessary locking of cleaner_mutex to avoid deadlock</title>
<updated>2015-09-10T10:27:57Z</updated>
<author>
<name>Filipe Manana</name>
</author>
<published>2015-09-10T09:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85e0a0f21a14bfd9145422a6a627c3df47101bd8'/>
<id>urn:sha1:85e0a0f21a14bfd9145422a6a627c3df47101bd8</id>
<content type='text'>
After commmit e44163e17796 ("btrfs: explictly delete unused block groups
in close_ctree and ro-remount"), added in the 4.3 merge window, we have
calls to btrfs_delete_unused_bgs() while holding the cleaner_mutex.
This can cause a deadlock with a concurrent block group relocation (when
a filesystem balance or shrink operation is in progress for example)
because btrfs_delete_unused_bgs() locks delete_unused_bgs_mutex and the
relocation path locks first delete_unused_bgs_mutex and then it locks
cleaner_mutex, resulting in a classic ABBA deadlock:

         CPU 0                                        CPU 1

lock fs_info-&gt;cleaner_mutex

                                           __btrfs_balance() || btrfs_shrink_device()
                                             lock fs_info-&gt;delete_unused_bgs_mutex
                                             btrfs_relocate_chunk()
                                               btrfs_relocate_block_group()
                                                 lock fs_info-&gt;cleaner_mutex
btrfs_delete_unused_bgs()
  lock fs_info-&gt;delete_unused_bgs_mutex

Fix this by not taking the cleaner_mutex before calling
btrfs_delete_unused_bgs() because it's no longer needed after
commit 67c5e7d464bc ("Btrfs: fix race between balance and unused block
group deletion"). The mutex fs_info-&gt;delete_unused_bgs_mutex, the
spinlock fs_info-&gt;unused_bgs_lock and a block group's spinlock are
enough to get correct serialization between tasks running relocation
and unused block group deletion (as well as between multiple tasks
concurrently calling btrfs_delete_unused_bgs()).

This issue was discussed (in the mailing list) during the review of
the patch titled "btrfs: explictly delete unused block groups in
close_ctree and ro-remount" and it was agreed that acquiring the
cleaner mutex had to be dropped after the patch titled
"Btrfs: fix race between balance and unused block group deletion"
got merged (both patches were submitted at about the same time, but
one landed in kernel 4.2 and the other in the 4.3 merge window).

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2015-09-05T22:14:43Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-09-05T22:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22365979ab15f8500254cb90037b0b4c17554739'/>
<id>urn:sha1:22365979ab15f8500254cb90037b0b4c17554739</id>
<content type='text'>
Pull btrfs updates from Chris Mason:
 "This has Jeff Mahoney's long standing trim patch that fixes corners
  where trims were missing.  Omar has some raid5/6 fixes, especially for
  using scrub and device replace when devices are missing.

  Zhao Lie continues cleaning and fixing things, this series fixes some
  really hard to hit corners in xfstests.  I had to pull it last merge
  window due to some deadlocks, but those are now resolved.

  I added support for Tejun's new blkio controllers.  It seems to work
  well for single devices, we'll expand to multi-device as well"

* 'for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (47 commits)
  btrfs: fix compile when block cgroups are not enabled
  Btrfs: fix file read corruption after extent cloning and fsync
  Btrfs: check if previous transaction aborted to avoid fs corruption
  btrfs: use __GFP_NOFAIL in alloc_btrfs_bio
  btrfs: Prevent from early transaction abort
  btrfs: Remove unused arguments in tree-log.c
  btrfs: Remove useless condition in start_log_trans()
  Btrfs: add support for blkio controllers
  Btrfs: remove unused mutex from struct 'btrfs_fs_info'
  Btrfs: fix parity scrub of RAID 5/6 with missing device
  Btrfs: fix device replace of a missing RAID 5/6 device
  Btrfs: add RAID 5/6 BTRFS_RBIO_REBUILD_MISSING operation
  Btrfs: count devices correctly in readahead during RAID 5/6 replace
  Btrfs: remove misleading handling of missing device scrub
  btrfs: fix clone / extent-same deadlocks
  Btrfs: fix defrag to merge tail file extent
  Btrfs: fix warning in backref walking
  btrfs: Add WARN_ON() for double lock in btrfs_tree_lock()
  btrfs: Remove root argument in extent_data_ref_count()
  btrfs: Fix wrong comment of btrfs_alloc_tree_block()
  ...
</content>
</entry>
<entry>
<title>Merge branch 'jeffm-discard-4.3' into for-linus-4.3</title>
<updated>2015-08-09T14:35:33Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2015-08-09T14:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46cd28555ffaa40162290dba203daad0ff6f7abd'/>
<id>urn:sha1:46cd28555ffaa40162290dba203daad0ff6f7abd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Btrfs: add support for blkio controllers</title>
<updated>2015-08-09T14:35:06Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2015-07-02T20:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da2f0f74cf7d074e5a8918c8efdf6aba4a989b4a'/>
<id>urn:sha1:da2f0f74cf7d074e5a8918c8efdf6aba4a989b4a</id>
<content type='text'>
This attaches accounting information to bios as we submit them so the
new blkio controllers can throttle on btrfs filesystems.

Not much is required, we're just associating bios with blkcgs during clone,
calling wbc_init_bio()/wbc_account_io() during writepages submission,
and attaching the bios to the current context during direct IO.

Finally if we are splitting bios during btrfs_map_bio, this attaches
accounting information to the split.

The end result is able to throttle nicely on single disk filesystems.  A
little more work is required for multi-device filesystems.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>char: make misc_deregister a void function</title>
<updated>2015-08-05T17:35:49Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2015-07-30T22:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e'/>
<id>urn:sha1:f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e</id>
<content type='text'>
With well over 200+ users of this api, there are a mere 12 users that
actually checked the return value of this function.  And all of them
really didn't do anything with that information as the system or module
was shutting down no matter what.

So stop pretending like it matters, and just return void from
misc_deregister().  If something goes wrong in the call, you will get a
WARNING splat in the syslog so you know how to fix up your driver.
Other than that, there's nothing that can go wrong.

Cc: Alasdair Kergon &lt;agk@redhat.com&gt;
Cc: Neil Brown &lt;neilb@suse.com&gt;
Cc: Oleg Drokin &lt;oleg.drokin@intel.com&gt;
Cc: Andreas Dilger &lt;andreas.dilger@intel.com&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Cc: Wim Van Sebroeck &lt;wim@iguana.be&gt;
Cc: Christine Caulfield &lt;ccaulfie@redhat.com&gt;
Cc: David Teigland &lt;teigland@redhat.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Acked-by: Joel Becker &lt;jlbec@evilplan.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>btrfs: add missing discards when unpinning extents with -o discard</title>
<updated>2015-07-29T15:15:29Z</updated>
<author>
<name>Jeff Mahoney</name>
</author>
<published>2015-06-15T13:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e33e17ee1098d8d751552ac11c111e1c1a3db014'/>
<id>urn:sha1:e33e17ee1098d8d751552ac11c111e1c1a3db014</id>
<content type='text'>
When we clear the dirty bits in btrfs_delete_unused_bgs for extents
in the empty block group, it results in btrfs_finish_extent_commit being
unable to discard the freed extents.

The block group removal patch added an alternate path to forget extents
other than btrfs_finish_extent_commit.  As a result, any extents that
would be freed when the block group is removed aren't discarded.  In my
test run, with a large copy of mixed sized files followed by removal, it
left nearly 2/3 of extents undiscarded.

To clean up the block groups, we add the removed block group onto a list
that will be discarded after transaction commit.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Tested-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: explictly delete unused block groups in close_ctree and ro-remount</title>
<updated>2015-07-29T15:15:27Z</updated>
<author>
<name>Jeff Mahoney</name>
</author>
<published>2015-06-15T13:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e44163e177960ee60e32a73bffdd53c3a5827406'/>
<id>urn:sha1:e44163e177960ee60e32a73bffdd53c3a5827406</id>
<content type='text'>
The cleaner thread may already be sleeping by the time we enter
close_ctree.  If that's the case, we'll skip removing any unused
block groups queued for removal, even during a normal umount.
They'll be cleaned up automatically at next mount, but users
expect a umount to be a clean synchronization point, especially
when used on thin-provisioned storage with -odiscard.  We also
explicitly remove unused block groups in the ro-remount path
for the same reason.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Tested-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: show subvol= and subvolid= in /proc/mounts</title>
<updated>2015-06-03T11:03:02Z</updated>
<author>
<name>Omar Sandoval</name>
</author>
<published>2015-05-18T09:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8d3fe028f64054d75c72566efb9ecf3c75ee161'/>
<id>urn:sha1:c8d3fe028f64054d75c72566efb9ecf3c75ee161</id>
<content type='text'>
Now that we're guaranteed to have a meaningful root dentry, we can just
export seq_dentry() and use it in btrfs_show_options(). The subvolume ID
is easy to get and can also be useful, so put that in there, too.

Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Omar Sandoval &lt;osandov@osandov.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: unify subvol= and subvolid= mounting</title>
<updated>2015-06-03T11:03:01Z</updated>
<author>
<name>Omar Sandoval</name>
</author>
<published>2015-05-18T09:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05dbe6837b60465db6a61d1f0cabe745e20aadc9'/>
<id>urn:sha1:05dbe6837b60465db6a61d1f0cabe745e20aadc9</id>
<content type='text'>
Currently, mounting a subvolume with subvolid= takes a different code
path than mounting with subvol=. This isn't really a big deal except for
the fact that mounts done with subvolid= or the default subvolume don't
have a dentry that's connected to the dentry tree like in the subvol=
case. To unify the code paths, when given subvolid= or using the default
subvolume ID, translate it into a subvolume name by walking
ROOT_BACKREFs in the root tree and INODE_REFs in the filesystem trees.

Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Omar Sandoval &lt;osandov@osandov.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
</feed>
