<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v4.4-rc3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.4-rc3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.4-rc3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-11-28T01:22:47Z</updated>
<entry>
<title>Merge tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2015-11-28T01:22:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-28T01:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8003a573560ae96540bce2a698347c6d502e2997'/>
<id>urn:sha1:8003a573560ae96540bce2a698347c6d502e2997</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

  Stable patches:
   - Fix a NFSv4 callback identifier leak that was also causing client
     crashes
   - Fix NFSv4 callback decoding issues when incoming requests are
     truncated
   - Don't declare the attribute cache valid when we call
     nfs_update_inode with an empty attribute structure.
   - Resend LAYOUTGET when there is a race that changes the seqid

  Bugfixes:
   - Fix a number of issues with the NFSv4.2 CLONE ioctl()
   - Properly set NFS v4.2 NFSDBG_FACILITY
   - NFSv4 referrals are broken; Cleanup FATTR4_WORD0_FS_LOCATIONS after
     decoding success
   - Use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
   - Ensure that attrcache is revalidated after a SETATTR"

* tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  nfs4: resend LAYOUTGET when there is a race that changes the seqid
  nfs: if we have no valid attrs, then don't declare the attribute cache valid
  nfs: ensure that attrcache is revalidated after a SETATTR
  nfs4: limit callback decoding to received bytes
  nfs4: start callback_ident at idr 1
  nfs: use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
  NFS4: Cleanup FATTR4_WORD0_FS_LOCATIONS after decoding success
  NFS: Properly set NFS v4.2 NFSDBG_FACILITY
  nfs: reduce the amount of ifdefs for v4.2 in nfs4file.c
  nfs: use btrfs ioctl defintions for clone
  nfs: allow intra-file CLONE
  nfs: offer native ioctls even if CONFIG_COMPAT is set
  nfs: pass on count for CLONE operations
</content>
</entry>
<entry>
<title>Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2015-11-27T23:45:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-27T23:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=80e0c505b22e64ab1787285b182a1e8395e53991'/>
<id>urn:sha1:80e0c505b22e64ab1787285b182a1e8395e53991</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "This has Mark Fasheh's patches to fix quota accounting during subvol
  deletion, which we've been working on for a while now.  The patch is
  pretty small but it's a key fix.

  Otherwise it's a random assortment"

* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: fix balance range usage filters in 4.4-rc
  btrfs: qgroup: account shared subtree during snapshot delete
  Btrfs: use btrfs_get_fs_root in resolve_indirect_ref
  btrfs: qgroup: fix quota disable during rescan
  Btrfs: fix race between cleaner kthread and space cache writeout
  Btrfs: fix scrub preventing unused block groups from being deleted
  Btrfs: fix race between scrub and block group deletion
  btrfs: fix rcu warning during device replace
  btrfs: Continue replace when set_block_ro failed
  btrfs: fix clashing number of the enhanced balance usage filter
  Btrfs: fix the number of transaction units needed to remove a block group
  Btrfs: use global reserve when deleting unused block group after ENOSPC
  Btrfs: tests: checking for NULL instead of IS_ERR()
  btrfs: fix signed overflows in btrfs_sync_file
</content>
</entry>
<entry>
<title>nfs4: resend LAYOUTGET when there is a race that changes the seqid</title>
<updated>2015-11-25T20:32:13Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-11-25T18:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f2e9dce0c6348a95eaa56ade9bab18572221088'/>
<id>urn:sha1:4f2e9dce0c6348a95eaa56ade9bab18572221088</id>
<content type='text'>
pnfs_layout_process will check the returned layout stateid against what
the kernel has in-core. If it turns out that the stateid we received is
older, then we should resend the LAYOUTGET instead of falling back to
MDS I/O.

Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs: if we have no valid attrs, then don't declare the attribute cache valid</title>
<updated>2015-11-25T20:31:49Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-11-25T18:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c812012f9ca7cf89c9e1a1cd512e6c3b5be04b85'/>
<id>urn:sha1:c812012f9ca7cf89c9e1a1cd512e6c3b5be04b85</id>
<content type='text'>
If we pass in an empty nfs_fattr struct to nfs_update_inode, it will
(correctly) not update any of the attributes, but it then clears the
NFS_INO_INVALID_ATTR flag, which indicates that the attributes are
up to date. Don't clear the flag if the fattr struct has no valid
attrs to apply.

Reviewed-by: Steve French &lt;steve.french@primarydata.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs: ensure that attrcache is revalidated after a SETATTR</title>
<updated>2015-11-25T20:24:30Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2015-11-25T18:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=616c319683e34d10952b74a73ee12e080531b476'/>
<id>urn:sha1:616c319683e34d10952b74a73ee12e080531b476</id>
<content type='text'>
If we get no post-op attributes back from a SETATTR operation, then no
attributes will of course be updated during the call to
nfs_update_inode.

We know however that the attributes are invalid at that point, since we
just changed some of them. At the very least, the ctime will be bogus.
If we get no post-op attributes back on the call, mark the attrcache
invalid to reflect that fact.

Reviewed-by: Steve French &lt;steve.french@primarydata.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>btrfs: fix balance range usage filters in 4.4-rc</title>
<updated>2015-11-25T13:27:33Z</updated>
<author>
<name>Holger Hoffstätte</name>
<email>holger.hoffstaette@googlemail.com</email>
</author>
<published>2015-11-17T11:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dba72cb30b6a4811038128c8a98b268d18ca60fe'/>
<id>urn:sha1:dba72cb30b6a4811038128c8a98b268d18ca60fe</id>
<content type='text'>
There's a regression in 4.4-rc since commit bc3094673f22
(btrfs: extend balance filter usage to take minimum and maximum) in that
existing (non-ranged) balance with -dusage=x no longer works; all chunks
are skipped.

After staring at the code for a while and wondering why a non-ranged
balance would even need min and max thresholds (..which then were not
set correctly, leading to the bug) I realized that the only problem
was the fact that the filter functions were named wrong, thanks to
patching copypasta. Simply renaming both functions lets the existing
btrfs-progs call balance with -dusage=x and now the non-ranged filter
function is invoked, properly using only a single chunk limit.

Signed-off-by: Holger Hoffstätte &lt;holger.hoffstaette@googlemail.com&gt;
Fixes: bc3094673f22 ("btrfs: extend balance filter usage to take minimum and maximum")
Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: qgroup: account shared subtree during snapshot delete</title>
<updated>2015-11-25T13:27:33Z</updated>
<author>
<name>Mark Fasheh</name>
<email>mfasheh@suse.de</email>
</author>
<published>2015-11-05T22:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=82bd101b5240d3d1c4078a8017917a40c0dcc514'/>
<id>urn:sha1:82bd101b5240d3d1c4078a8017917a40c0dcc514</id>
<content type='text'>
Commit 0ed4792 ('btrfs: qgroup: Switch to new extent-oriented qgroup
mechanism.') removed our qgroup accounting during
btrfs_drop_snapshot(). Predictably, this results in qgroup numbers
going bad shortly after a snapshot is removed.

Fix this by adding a dirty extent record when we encounter extents during
our shared subtree walk. This effectively restores the functionality we had
with the original shared subtree walking code in 1152651 (btrfs: qgroup:
account shared subtrees during snapshot delete).

The idea with the original patch (and this one) is that shared subtrees can
get skipped during drop_snapshot. The shared subtree walk then allows us a
chance to visit those extents and add them to the qgroup work for later
processing. This ultimately makes the accounting for drop snapshot work.

The new qgroup code nicely handles all the other extents during the tree
walk via the ref dec/inc functions so we don't have to add actions beyond
what we had originally.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: use btrfs_get_fs_root in resolve_indirect_ref</title>
<updated>2015-11-25T13:22:08Z</updated>
<author>
<name>Josef Bacik</name>
<email>jbacik@fb.com</email>
</author>
<published>2015-11-05T22:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d9e97761087b46192c18181dfd1e7a930defcfd'/>
<id>urn:sha1:2d9e97761087b46192c18181dfd1e7a930defcfd</id>
<content type='text'>
The backref code will look up the fs_root we're trying to resolve our indirect
refs for, unfortunately we use btrfs_read_fs_root_no_name, which returns -ENOENT
if the ref is 0.  This isn't helpful for the qgroup stuff with snapshot delete
as it won't be able to search down the snapshot we are deleting, which will
cause us to miss roots.  So use btrfs_get_fs_root and send false for check_ref
so we can always get the root we're looking for.  Thanks,

Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.de&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: qgroup: fix quota disable during rescan</title>
<updated>2015-11-25T13:22:08Z</updated>
<author>
<name>Justin Maggard</name>
<email>jmaggard10@gmail.com</email>
</author>
<published>2015-11-06T18:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=967ef5131e42d6e3bb216c44161d893048a49957'/>
<id>urn:sha1:967ef5131e42d6e3bb216c44161d893048a49957</id>
<content type='text'>
There's a race condition that leads to a NULL pointer dereference if you
disable quotas while a quota rescan is running.  To fix this, we just need
to wait for the quota rescan worker to actually exit before tearing down
the quota structures.

Signed-off-by: Justin Maggard &lt;jmaggard@netgear.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix race between cleaner kthread and space cache writeout</title>
<updated>2015-11-25T13:22:08Z</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2015-11-23T15:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=036a9348dcd0060e3df8f5b5db2a59e7d7eaf1f5'/>
<id>urn:sha1:036a9348dcd0060e3df8f5b5db2a59e7d7eaf1f5</id>
<content type='text'>
When a block group becomes unused and the cleaner kthread is currently
running, we can end up getting the current transaction aborted with error
-ENOENT when we try to commit the transaction, leading to the following
trace:

  [59779.258768] WARNING: CPU: 3 PID: 5990 at fs/btrfs/extent-tree.c:3740 btrfs_write_dirty_block_groups+0x17c/0x214 [btrfs]()
  [59779.272594] BTRFS: Transaction aborted (error -2)
  (...)
  [59779.291137] Call Trace:
  [59779.291621]  [&lt;ffffffff812566f4&gt;] dump_stack+0x4e/0x79
  [59779.292543]  [&lt;ffffffff8104d0a6&gt;] warn_slowpath_common+0x9f/0xb8
  [59779.293435]  [&lt;ffffffffa04cb81f&gt;] ? btrfs_write_dirty_block_groups+0x17c/0x214 [btrfs]
  [59779.295000]  [&lt;ffffffff8104d107&gt;] warn_slowpath_fmt+0x48/0x50
  [59779.296138]  [&lt;ffffffffa04c2721&gt;] ? write_one_cache_group.isra.32+0x77/0x82 [btrfs]
  [59779.297663]  [&lt;ffffffffa04cb81f&gt;] btrfs_write_dirty_block_groups+0x17c/0x214 [btrfs]
  [59779.299141]  [&lt;ffffffffa0549b0d&gt;] commit_cowonly_roots+0x1de/0x261 [btrfs]
  [59779.300359]  [&lt;ffffffffa04dd5b6&gt;] btrfs_commit_transaction+0x4c4/0x99c [btrfs]
  [59779.301805]  [&lt;ffffffffa04b5df4&gt;] btrfs_sync_fs+0x145/0x1ad [btrfs]
  [59779.302893]  [&lt;ffffffff81196634&gt;] sync_filesystem+0x7f/0x93
  (...)
  [59779.318186] ---[ end trace 577e2daff90da33a ]---

The following diagram illustrates a sequence of steps leading to this
problem:

       CPU 1                                             CPU 2

                           &lt;at transaction N&gt;

                                                        adds bg A to list
                                                        fs_info-&gt;unused_bgs

                                                        adds bg B to list
                                                        fs_info-&gt;unused_bgs

                           &lt;transaction kthread
                            commits transaction N
                            and wakes up the
                            cleaner kthread&gt;

  cleaner kthread
    delete_unused_bgs()

      sees bg A in list
      fs_info-&gt;unused_bgs

      btrfs_start_transaction()

                           &lt;transaction N + 1 starts&gt;

      deletes bg A

                                                        update_block_group(bg C)

                                                          --&gt; adds bg C to list
                                                              fs_info-&gt;unused_bgs

      deletes bg B

      sees bg C in the list
      fs_info-&gt;unused_bgs

      btrfs_remove_chunk(bg C)
        btrfs_remove_block_group(bg C)

          --&gt; checks if the block group
              is in a dirty list, and
              because it isn't now, it
              does nothing

          --&gt; the block group item
              is deleted from the
              extent tree

                                                          --&gt; adds bg C to list
                                                              transaction-&gt;dirty_bgs

                                                         some task calls
                                                         btrfs_commit_transaction(t N + 1)
                                                           commit_cowonly_roots()
                                                             btrfs_write_dirty_block_groups()
                                                               --&gt; sees bg C in cur_trans-&gt;dirty_bgs
                                                               --&gt; calls write_one_cache_group()
                                                                   which returns -ENOENT because
                                                                   it did not find the block group
                                                                   item in the extent tree
                                                               --&gt; transaction aborte with -ENOENT
                                                                   because write_one_cache_group()
                                                                   returned that error

So fix this by adding a block group to the list of dirty block groups
before adding it to the list of unused block groups.

This happened on a stress test using fsstress plus concurrent calls to
fallocate 20G and truncate (releasing part of the space allocated with
fallocate).

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
</feed>
