Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package btrfsprogs for openSUSE:Factory 
checked in at 2021-08-23 10:20:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btrfsprogs (Old)
 and      /work/SRC/openSUSE:Factory/.btrfsprogs.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btrfsprogs"

Mon Aug 23 10:20:21 2021 rev:121 rq:912461 version:5.13.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/btrfsprogs/btrfsprogs.changes    2021-07-21 
19:07:21.167392912 +0200
+++ /work/SRC/openSUSE:Factory/.btrfsprogs.new.1899/btrfsprogs.changes  
2021-08-23 10:20:22.411433560 +0200
@@ -1,0 +2,13 @@
+Tue Aug 10 13:03:47 UTC 2021 - Goldwyn Rodrigues <rgold...@suse.com>
+
+- Update to 5.13.1
+  * build: fix build on musl libc due to missing definition of NAME_MAX
+  * check:
+    * batch more work into one transaction when clearing v1 free space inodes
+    * detect directoris with wrong number of links
+  * libbtrfsutil: fix race between subvolume iterator and deletion
+  * mkfs: be more specific about supported profiles for zoned device
+  * other:
+    * documentation updates
+
+-------------------------------------------------------------------

Old:
----
  btrfs-progs-v5.13.tar.gz

New:
----
  btrfs-progs-v5.13.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btrfsprogs.spec ++++++
--- /var/tmp/diff_new_pack.huB7Cp/_old  2021-08-23 10:20:23.079432859 +0200
+++ /var/tmp/diff_new_pack.huB7Cp/_new  2021-08-23 10:20:23.083432855 +0200
@@ -34,7 +34,7 @@
 %define _dracutmodulesdir %(pkg-config --variable dracutmodulesdir dracut)
 
 Name:           btrfsprogs
-Version:        5.13
+Version:        5.13.1
 Release:        0
 Summary:        Utilities for the Btrfs filesystem
 License:        GPL-2.0-only
@@ -84,7 +84,7 @@
 BuildRequires:  zlib-devel
 %if 0%{?suse_version} >= 1310
 Requires(post): coreutils
-Requires(postun): coreutils
+Requires(postun):coreutils
 %endif
 Supplements:    filesystem(btrfs)
 Recommends:     btrfsmaintenance

++++++ btrfs-progs-v5.13.tar.gz -> btrfs-progs-v5.13.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/CHANGES 
new/btrfs-progs-v5.13.1/CHANGES
--- old/btrfs-progs-v5.13/CHANGES       2021-07-13 14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/CHANGES     2021-07-30 16:14:58.000000000 +0200
@@ -1,3 +1,13 @@
+btrfs-progs-5.13.1 (2021-07-30)
+* build: fix build on musl libc due to missing definition of NAME_MAX
+* check:
+  * batch more work into one transaction when clearing v1 free space inodes
+  * detect directoris with wrong number of links
+* libbtrfsutil: fix race between subvolume iterator and deletion
+* mkfs: be more specific about supported profiles for zoned device
+* other:
+  * documentation updates
+
 btrfs-progs-5.13 (2021-07-13)
 * restore: remove loop checks for extent count and directory scan
 * inspect dump-tree: new options to print node (--csum-headers) and data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-balance.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-balance.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-balance.8 2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-balance.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-balance
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-BALANCE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-BALANCE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-check.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-check.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-check.8   2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-check.8 2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-check
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-CHECK" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-CHECK" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-convert.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-convert.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-convert.8 2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-convert.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-convert
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-CONVERT" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-CONVERT" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-device.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-device.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-device.8  2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-device.8        2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-device
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-DEVICE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-DEVICE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-filesystem.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-filesystem.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-filesystem.8      2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-filesystem.8    2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-filesystem
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-FILESYSTEM" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-FILESYSTEM" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-find-root.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-find-root.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-find-root.8       2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-find-root.8     2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-find-root
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-FIND\-ROOT" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-FIND\-ROOT" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-image.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-image.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-image.8   2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-image.8 2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-image
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-IMAGE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-IMAGE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v5.13/Documentation/btrfs-inspect-internal.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-inspect-internal.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-inspect-internal.8        
2021-07-13 14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-inspect-internal.8      
2021-07-30 16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-inspect-internal
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-INSPECT\-INTE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-INSPECT\-INTE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-man5.asciidoc 
new/btrfs-progs-v5.13.1/Documentation/btrfs-man5.asciidoc
--- old/btrfs-progs-v5.13/Documentation/btrfs-man5.asciidoc     2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-man5.asciidoc   2021-07-30 
16:14:58.000000000 +0200
@@ -389,10 +389,10 @@
 this issue. Once enabled, the 'v2' space cache will always be used and cannot
 be disabled unless it is cleared. Use 'clear_cache,space_cache=v1' or
 'clear_cache,nospace_cache' to do so. If 'v2' is enabled, kernels without 'v2'
-support will only be able to mount the filesystem in read-only mode. The
-`btrfs`(8) command currently only has read-only support for 'v2'. A read-write
-command may be run on a 'v2' filesystem by clearing the cache, running the
-command, and then remounting with 'space_cache=v2'.
+support will only be able to mount the filesystem in read-only mode.
++
+The `btrfs-check`(8) and `mkfs.btrfs`(8) commands have full 'v2' free space
+cache support since v4.19.
 +
 If a version is not explicitly specified, the default implementation will be
 chosen, which is 'v1'.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-map-logical.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-map-logical.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-map-logical.8     2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-map-logical.8   2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-map-logical
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-MAP\-LOGICAL" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-MAP\-LOGICAL" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-property.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-property.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-property.8        2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-property.8      2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-property
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-PROPERTY" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-PROPERTY" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-qgroup.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-qgroup.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-qgroup.8  2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-qgroup.8        2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-qgroup
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-QGROUP" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-QGROUP" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-quota.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-quota.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-quota.8   2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-quota.8 2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-quota
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-QUOTA" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-QUOTA" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-receive.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-receive.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-receive.8 2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-receive.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-receive
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-RECEIVE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-RECEIVE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-replace.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-replace.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-replace.8 2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-replace.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-replace
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-REPLACE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-REPLACE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-rescue.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-rescue.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-rescue.8  2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-rescue.8        2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-rescue
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-RESCUE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-RESCUE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-restore.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-restore.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-restore.8 2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-restore.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-restore
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-RESTORE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-RESTORE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-scrub.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-scrub.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-scrub.8   2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-scrub.8 2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-scrub
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-SCRUB" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-SCRUB" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-select-super.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-select-super.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-select-super.8    2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-select-super.8  2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-select-super
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-SELECT\-SUPER" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-SELECT\-SUPER" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-send.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-send.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-send.8    2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-send.8  2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-send
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-SEND" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-SEND" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs-subvolume.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs-subvolume.8
--- old/btrfs-progs-v5.13/Documentation/btrfs-subvolume.8       2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs-subvolume.8     2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-subvolume
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-SUBVOLUME" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-SUBVOLUME" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs.5 
new/btrfs-progs-v5.13.1/Documentation/btrfs.5
--- old/btrfs-progs-v5.13/Documentation/btrfs.5 2021-07-13 14:32:36.000000000 
+0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs.5       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs-man5
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS\-MAN5" "5" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS\-MAN5" "5" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -746,12 +746,13 @@
 \fIv2\fR
 is enabled, kernels without
 \fIv2\fR
-support will only be able to mount the filesystem in read\-only mode\&. The
-\fBbtrfs\fR(8) command currently only has read\-only support for
-\fIv2\fR\&. A read\-write command may be run on a
+support will only be able to mount the filesystem in read\-only mode\&.
+.sp
+The
+\fBbtrfs\-check\fR(8) and
+\fBmkfs\&.btrfs\fR(8) commands have full
 \fIv2\fR
-filesystem by clearing the cache, running the command, and then remounting with
-\fIspace_cache=v2\fR\&.
+free space cache support since v4\&.19\&.
 .sp
 If a version is not explicitly specified, the default implementation will be 
chosen, which is
 \fIv1\fR\&.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfs.8 
new/btrfs-progs-v5.13.1/Documentation/btrfs.8
--- old/btrfs-progs-v5.13/Documentation/btrfs.8 2021-07-13 14:32:36.000000000 
+0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfs.8       2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfs
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFS" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFS" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/btrfstune.8 
new/btrfs-progs-v5.13.1/Documentation/btrfstune.8
--- old/btrfs-progs-v5.13/Documentation/btrfstune.8     2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/btrfstune.8   2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: btrfstune
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "BTRFSTUNE" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "BTRFSTUNE" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/fsck.btrfs.8 
new/btrfs-progs-v5.13.1/Documentation/fsck.btrfs.8
--- old/btrfs-progs-v5.13/Documentation/fsck.btrfs.8    2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/fsck.btrfs.8  2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: fsck.btrfs
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "FSCK\&.BTRFS" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "FSCK\&.BTRFS" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/Documentation/mkfs.btrfs.8 
new/btrfs-progs-v5.13.1/Documentation/mkfs.btrfs.8
--- old/btrfs-progs-v5.13/Documentation/mkfs.btrfs.8    2021-07-13 
14:32:36.000000000 +0200
+++ new/btrfs-progs-v5.13.1/Documentation/mkfs.btrfs.8  2021-07-30 
16:16:31.000000000 +0200
@@ -2,12 +2,12 @@
 .\"     Title: mkfs.btrfs
 .\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 07/13/2021
+.\"      Date: 07/30/2021
 .\"    Manual: Btrfs Manual
-.\"    Source: Btrfs v5.13
+.\"    Source: Btrfs v5.13.1
 .\"  Language: English
 .\"
-.TH "MKFS\&.BTRFS" "8" "07/13/2021" "Btrfs v5\&.13" "Btrfs Manual"
+.TH "MKFS\&.BTRFS" "8" "07/30/2021" "Btrfs v5\&.13\&.1" "Btrfs Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/VERSION 
new/btrfs-progs-v5.13.1/VERSION
--- old/btrfs-progs-v5.13/VERSION       2021-07-13 14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/VERSION     2021-07-30 16:14:58.000000000 +0200
@@ -1 +1 @@
-v5.13
+v5.13.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/check/main.c 
new/btrfs-progs-v5.13.1/check/main.c
--- old/btrfs-progs-v5.13/check/main.c  2021-07-13 14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/check/main.c        2021-07-30 16:14:58.000000000 
+0200
@@ -623,6 +623,9 @@
                        rec->imode & ~07777);
        if (errors & I_ERR_INVALID_GEN)
                fprintf(stderr, ", invalid inode generation or transid");
+       if (errors & I_ERR_INVALID_NLINK)
+               fprintf(stderr, ", directory has invalid nlink %d",
+                       rec->nlink);
        fprintf(stderr, "\n");
 
        /* Print the holes if needed */
@@ -909,6 +912,10 @@
        if (S_ISLNK(rec->imode) &&
            flags & (BTRFS_INODE_IMMUTABLE | BTRFS_INODE_APPEND))
                rec->errors |= I_ERR_ODD_INODE_FLAGS;
+
+       /* Directory should never have hard link */
+       if (S_ISDIR(rec->imode) && rec->nlink >= 2)
+               rec->errors |= I_ERR_INVALID_NLINK;
        /*
         * We don't have accurate root info to determine the correct
         * inode generation uplimit, use super_generation + 1 anyway
@@ -9892,33 +9899,65 @@
        return bad_roots;
 }
 
+/*
+ * Number of free space cache inodes to delete in one transaction.
+ *
+ * This is to speedup the v1 space cache deletion for large fs.
+ */
+#define NR_BLOCK_GROUP_CLUSTER         (16)
+
 static int clear_free_space_cache(void)
 {
        struct btrfs_trans_handle *trans;
        struct btrfs_block_group *bg_cache;
+       int nr_handled = 0;
        u64 current = 0;
        int ret = 0;
 
+       trans = btrfs_start_transaction(gfs_info->tree_root, 0);
+       if (IS_ERR(trans)) {
+               ret = PTR_ERR(trans);
+               errno = -ret;
+               error("failed to start a transaction: %m");
+               return ret;
+       }
+
        /* Clear all free space cache inodes and its extent data */
        while (1) {
                bg_cache = btrfs_lookup_first_block_group(gfs_info, current);
                if (!bg_cache)
                        break;
-               ret = btrfs_clear_free_space_cache(gfs_info, bg_cache);
-               if (ret < 0)
+               ret = btrfs_clear_free_space_cache(trans, bg_cache);
+               if (ret < 0) {
+                       btrfs_abort_transaction(trans, ret);
                        return ret;
+               }
+               nr_handled++;
+
+               if (nr_handled == NR_BLOCK_GROUP_CLUSTER) {
+                       ret = btrfs_commit_transaction(trans, 
gfs_info->tree_root);
+                       if (ret < 0) {
+                               errno = -ret;
+                               error("failed to start a transaction: %m");
+                               return ret;
+                       }
+                       trans = btrfs_start_transaction(gfs_info->tree_root, 0);
+                       if (IS_ERR(trans)) {
+                               ret = PTR_ERR(trans);
+                               errno = -ret;
+                               error("failed to start a transaction: %m");
+                               return ret;
+                       }
+               }
                current = bg_cache->start + bg_cache->length;
        }
 
-       /* Don't forget to set cache_generation to -1 */
-       trans = btrfs_start_transaction(gfs_info->tree_root, 0);
-       if (IS_ERR(trans)) {
-               error("failed to update super block cache generation");
-               return PTR_ERR(trans);
-       }
        btrfs_set_super_cache_generation(gfs_info->super_copy, (u64)-1);
-       btrfs_commit_transaction(trans, gfs_info->tree_root);
-
+       ret = btrfs_commit_transaction(trans, gfs_info->tree_root);
+       if (ret < 0) {
+               errno = -ret;
+               error("failed to start a transaction: %m");
+       }
        return ret;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/check/mode-original.h 
new/btrfs-progs-v5.13.1/check/mode-original.h
--- old/btrfs-progs-v5.13/check/mode-original.h 2021-07-13 14:31:38.000000000 
+0200
+++ new/btrfs-progs-v5.13.1/check/mode-original.h       2021-07-30 
16:14:58.000000000 +0200
@@ -186,6 +186,7 @@
 #define I_ERR_MISMATCH_DIR_HASH                (1 << 18)
 #define I_ERR_INVALID_IMODE            (1 << 19)
 #define I_ERR_INVALID_GEN              (1 << 20)
+#define I_ERR_INVALID_NLINK            (1 << 21)
 
 struct inode_record {
        struct list_head backrefs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/ci/ci-build-musl 
new/btrfs-progs-v5.13.1/ci/ci-build-musl
--- old/btrfs-progs-v5.13/ci/ci-build-musl      1970-01-01 01:00:00.000000000 
+0100
+++ new/btrfs-progs-v5.13.1/ci/ci-build-musl    2021-07-30 16:14:58.000000000 
+0200
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Usage: $0 [branch]
+# Create source tarball from HEAD or given branch and build it in musl CI
+# environment
+
+HERE=`pwd`
+if [ -f "configure.ac" ]; then
+       SOURCEDIR=`pwd`
+elif [ -f "../configure.ac" ]; then
+       cd ..
+       SOURCEDIR=`pwd`
+else
+       echo "ERROR: cannot determine source directory from `pwd`"
+       exit 1
+fi
+
+CIIMAGEDIR=ci/images/ci-musl-x86_64
+BRANCH=${1:-HEAD}
+HASH=$(git log -1 --format='%h %s' "$BRANCH")
+
+echo "CI: Generate archive from $BRANCH ($HASH)"
+git archive --prefix=btrfs-progs-devel/ -o devel.tar "$BRANCH"
+echo "$BRANCH $HASH" > GITCOMMIT
+tar uvf devel.tar GITCOMMIT
+#rm GITCOMMIT
+gzip --force --best devel.tar
+
+cd "$CIIMAGEDIR"
+cp "$SOURCEDIR/devel.tar.gz" .
+./docker-build
+./docker-run -- ./test-build devel --disable-documentation --disable-backtrace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/cmds/filesystem-usage.c 
new/btrfs-progs-v5.13.1/cmds/filesystem-usage.c
--- old/btrfs-progs-v5.13/cmds/filesystem-usage.c       2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/cmds/filesystem-usage.c     2021-07-30 
16:14:58.000000000 +0200
@@ -24,6 +24,7 @@
 #include <stdarg.h>
 #include <getopt.h>
 #include <fcntl.h>
+#include <linux/limits.h>
 
 #include "common/utils.h"
 #include "kerncompat.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/configure 
new/btrfs-progs-v5.13.1/configure
--- old/btrfs-progs-v5.13/configure     2021-07-13 14:34:54.000000000 +0200
+++ new/btrfs-progs-v5.13.1/configure   2021-07-30 16:18:37.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for btrfs-progs v5.13 .
+# Generated by GNU Autoconf 2.69 for btrfs-progs v5.13.1 .
 #
 # Report bugs to <linux-bt...@vger.kernel.org>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='btrfs-progs'
 PACKAGE_TARNAME='btrfs-progs'
-PACKAGE_VERSION='v5.13 '
-PACKAGE_STRING='btrfs-progs v5.13 '
+PACKAGE_VERSION='v5.13.1 '
+PACKAGE_STRING='btrfs-progs v5.13.1 '
 PACKAGE_BUGREPORT='linux-bt...@vger.kernel.org'
 PACKAGE_URL='http://btrfs.wiki.kernel.org'
 
@@ -1350,7 +1350,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures btrfs-progs v5.13  to adapt to many kinds of systems.
+\`configure' configures btrfs-progs v5.13.1  to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1415,7 +1415,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of btrfs-progs v5.13 :";;
+     short | recursive ) echo "Configuration of btrfs-progs v5.13.1 :";;
    esac
   cat <<\_ACEOF
 
@@ -1561,7 +1561,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-btrfs-progs configure v5.13
+btrfs-progs configure v5.13.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1987,7 +1987,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by btrfs-progs $as_me v5.13 , which was
+It was created by btrfs-progs $as_me v5.13.1 , which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -7955,7 +7955,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by btrfs-progs $as_me v5.13 , which was
+This file was extended by btrfs-progs $as_me v5.13.1 , which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8018,7 +8018,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-btrfs-progs config.status v5.13
+btrfs-progs config.status v5.13.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/kernel-shared/free-space-cache.c 
new/btrfs-progs-v5.13.1/kernel-shared/free-space-cache.c
--- old/btrfs-progs-v5.13/kernel-shared/free-space-cache.c      2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/kernel-shared/free-space-cache.c    2021-07-30 
16:14:58.000000000 +0200
@@ -895,10 +895,10 @@
        }
 }
 
-int btrfs_clear_free_space_cache(struct btrfs_fs_info *fs_info,
+int btrfs_clear_free_space_cache(struct btrfs_trans_handle *trans,
                                 struct btrfs_block_group *bg)
 {
-       struct btrfs_trans_handle *trans;
+       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_root *tree_root = fs_info->tree_root;
        struct btrfs_path path;
        struct btrfs_key key;
@@ -909,10 +909,6 @@
        int slot;
        int ret;
 
-       trans = btrfs_start_transaction(tree_root, 1);
-       if (IS_ERR(trans))
-               return PTR_ERR(trans);
-
        btrfs_init_path(&path);
 
        key.objectid = BTRFS_FREE_SPACE_OBJECTID;
@@ -1016,7 +1012,5 @@
        }
 out:
        btrfs_release_path(&path);
-       if (!ret)
-               btrfs_commit_transaction(trans, tree_root);
        return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/kernel-shared/free-space-cache.h 
new/btrfs-progs-v5.13.1/kernel-shared/free-space-cache.h
--- old/btrfs-progs-v5.13/kernel-shared/free-space-cache.h      2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/kernel-shared/free-space-cache.h    2021-07-30 
16:14:58.000000000 +0200
@@ -57,6 +57,6 @@
                       struct btrfs_free_space *info);
 int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset,
                         u64 bytes);
-int btrfs_clear_free_space_cache(struct btrfs_fs_info *fs_info,
+int btrfs_clear_free_space_cache(struct btrfs_trans_handle *trans,
                                 struct btrfs_block_group *bg);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/kernel-shared/volumes.c 
new/btrfs-progs-v5.13.1/kernel-shared/volumes.c
--- old/btrfs-progs-v5.13/kernel-shared/volumes.c       2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/kernel-shared/volumes.c     2021-07-30 
16:14:58.000000000 +0200
@@ -66,6 +66,7 @@
                .tolerated_failures = 2,
                .devs_increment = 3,
                .ncopies        = 3,
+               .nparity        = 0,
                .raid_name      = "raid1c3",
                .bg_flag        = BTRFS_BLOCK_GROUP_RAID1C3,
                .mindev_error   = BTRFS_ERROR_DEV_RAID1C3_MIN_NOT_MET,
@@ -78,6 +79,7 @@
                .tolerated_failures = 3,
                .devs_increment = 4,
                .ncopies        = 4,
+               .nparity        = 0,
                .raid_name      = "raid1c4",
                .bg_flag        = BTRFS_BLOCK_GROUP_RAID1C4,
                .mindev_error   = BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/libbtrfsutil/README.md 
new/btrfs-progs-v5.13.1/libbtrfsutil/README.md
--- old/btrfs-progs-v5.13/libbtrfsutil/README.md        2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/libbtrfsutil/README.md      2021-07-30 
16:14:58.000000000 +0200
@@ -39,7 +39,7 @@
 
 err = btrfs_util_sync("/");
 if (err)
-       fprintf("stderr, %s: %m\n", btrfs_util_strerror(err));
+       fprintf(stderr, "%s: %m\n", btrfs_util_strerror(err));
 ```
 
 In the Python bindings, functions may raise a `BtrfsUtilError`, which is a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v5.13/libbtrfsutil/python/tests/__init__.py 
new/btrfs-progs-v5.13.1/libbtrfsutil/python/tests/__init__.py
--- old/btrfs-progs-v5.13/libbtrfsutil/python/tests/__init__.py 2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/libbtrfsutil/python/tests/__init__.py       
2021-07-30 16:14:58.000000000 +0200
@@ -77,7 +77,16 @@
             mkfs = 'mkfs.btrfs'
         try:
             subprocess.check_call([mkfs, '-q', image])
-            subprocess.check_call(['mount', '-o', 'loop', '--', image, 
mountpoint])
+            subprocess.check_call(
+                [
+                    'mount',
+                    '-o',
+                    'loop,user_subvol_rm_allowed',
+                    '--',
+                    image,
+                    mountpoint,
+                ]
+            )
         except Exception as e:
             os.rmdir(mountpoint)
             os.remove(image)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v5.13/libbtrfsutil/python/tests/test_subvolume.py 
new/btrfs-progs-v5.13.1/libbtrfsutil/python/tests/test_subvolume.py
--- old/btrfs-progs-v5.13/libbtrfsutil/python/tests/test_subvolume.py   
2021-07-13 14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/libbtrfsutil/python/tests/test_subvolume.py 
2021-07-30 16:14:58.000000000 +0200
@@ -17,6 +17,7 @@
 
 import fcntl
 import errno
+import multiprocessing
 import os
 import os.path
 from pathlib import PurePath
@@ -493,20 +494,78 @@
         finally:
             os.chdir(pwd)
 
+    def _skip_unless_have_unprivileged_subvolume_iterator(self, path):
+        with drop_privs():
+            try:
+                for _ in btrfsutil.SubvolumeIterator(path):
+                    break
+            except OSError as e:
+                if e.errno == errno.ENOTTY:
+                    self.skipTest('BTRFS_IOC_GET_SUBVOL_ROOTREF is not 
available')
+                else:
+                    raise
+
     @skipUnlessHaveNobody
     def test_subvolume_iterator_unprivileged(self):
         os.chown(self.mountpoint, NOBODY_UID, -1)
         pwd = os.getcwd()
         try:
             os.chdir(self.mountpoint)
+            self._skip_unless_have_unprivileged_subvolume_iterator('.')
             with drop_privs():
-                try:
-                    list(btrfsutil.SubvolumeIterator('.'))
-                except OSError as e:
-                    if e.errno == errno.ENOTTY:
-                        self.skipTest('BTRFS_IOC_GET_SUBVOL_ROOTREF is not 
available')
-                    else:
-                        raise
                 self._test_subvolume_iterator()
         finally:
             os.chdir(pwd)
+
+    @staticmethod
+    def _create_and_delete_subvolume(i):
+        dir_name = f'dir{i}'
+        subvol_name = dir_name + '/subvol'
+        while True:
+            os.mkdir(dir_name)
+            btrfsutil.create_subvolume(subvol_name)
+            btrfsutil.delete_subvolume(subvol_name)
+            os.rmdir(dir_name)
+
+    def _test_subvolume_iterator_race(self):
+        procs = []
+        fd = os.open('.', os.O_RDONLY | os.O_DIRECTORY)
+        try:
+            for i in range(10):
+                procs.append(
+                    multiprocessing.Process(
+                        target=self._create_and_delete_subvolume,
+                        args=(i,),
+                        daemon=True,
+                    )
+                )
+            for proc in procs:
+                proc.start()
+            for i in range(1000):
+                with btrfsutil.SubvolumeIterator(fd) as it:
+                    for _ in it:
+                        pass
+        finally:
+            for proc in procs:
+                proc.terminate()
+                proc.join()
+            os.close(fd)
+
+    def test_subvolume_iterator_race(self):
+        pwd = os.getcwd()
+        try:
+            os.chdir(self.mountpoint)
+            self._test_subvolume_iterator_race()
+        finally:
+            os.chdir(pwd)
+
+    def test_subvolume_iterator_race_unprivileged(self):
+        os.chown(self.mountpoint, NOBODY_UID, -1)
+        pwd = os.getcwd()
+        try:
+            os.chdir(self.mountpoint)
+            self._skip_unless_have_unprivileged_subvolume_iterator('.')
+            with drop_privs():
+                self._test_subvolume_iterator_race()
+        finally:
+            os.chdir(pwd)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/libbtrfsutil/subvolume.c 
new/btrfs-progs-v5.13.1/libbtrfsutil/subvolume.c
--- old/btrfs-progs-v5.13/libbtrfsutil/subvolume.c      2021-07-13 
14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/libbtrfsutil/subvolume.c    2021-07-30 
16:14:58.000000000 +0200
@@ -1469,8 +1469,16 @@
                name = (const char *)(ref + 1);
                err = build_subvol_path_privileged(iter, header, ref, name,
                                                   &path_len);
-               if (err)
+               if (err) {
+                       /*
+                        * If the subvolume's parent directory doesn't exist,
+                        * then the subvolume was either moved or deleted. Skip
+                        * it.
+                        */
+                       if (errno == ENOENT)
+                               continue;
                        return err;
+               }
 
                err = append_to_search_stack(iter,
                                btrfs_search_header_offset(header), path_len);
@@ -1539,8 +1547,12 @@
                err = build_subvol_path_unprivileged(iter, treeid, dirid,
                                                     &path_len);
                if (err) {
-                       /* Skip the subvolume if we can't access it. */
-                       if (errno == EACCES)
+                       /*
+                        * If the subvolume's parent directory doesn't exist,
+                        * then the subvolume was either moved or deleted. Skip
+                        * it. Also skip it if we can't access it.
+                        */
+                       if (errno == ENOENT || errno == EACCES)
                                continue;
                        return err;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfs-progs-v5.13/mkfs/main.c 
new/btrfs-progs-v5.13.1/mkfs/main.c
--- old/btrfs-progs-v5.13/mkfs/main.c   2021-07-13 14:31:38.000000000 +0200
+++ new/btrfs-progs-v5.13.1/mkfs/main.c 2021-07-30 16:14:58.000000000 +0200
@@ -1321,7 +1321,7 @@
 
        if (zoned && ((metadata_profile | data_profile) &
                      BTRFS_BLOCK_GROUP_PROFILE_MASK)) {
-               error("cannot use RAID/DUP profile in zoned mode");
+               error("zoned mode does not yet support RAID/DUP profiles, 
please specify '-d single -m single' manually");
                goto error;
        }
 
Binary files 
old/btrfs-progs-v5.13/tests/fsck-tests/049-dir-hard-link/default.img.xz and 
new/btrfs-progs-v5.13.1/tests/fsck-tests/049-dir-hard-link/default.img.xz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btrfs-progs-v5.13/tests/fsck-tests/049-dir-hard-link/test.sh 
new/btrfs-progs-v5.13.1/tests/fsck-tests/049-dir-hard-link/test.sh
--- old/btrfs-progs-v5.13/tests/fsck-tests/049-dir-hard-link/test.sh    
1970-01-01 01:00:00.000000000 +0100
+++ new/btrfs-progs-v5.13.1/tests/fsck-tests/049-dir-hard-link/test.sh  
2021-07-30 16:14:58.000000000 +0200
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Verify that check can detect overlapped dir with 2 links
+#
+# There is a report that btrfs-check doesn't report dir with 2 links as
+# error, and only get caught by tree-checker.
+#
+# Make sure btrfs check can at least detect such error.
+
+source "$TEST_TOP/common"
+
+check_prereq btrfs
+
+check_image() {
+       run_mustfail "dir with 2 links not detected" \
+               "$TOP/btrfs" check "$1"
+}
+
+check_all_images

Reply via email to