All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1
@ 2020-11-25 20:37 Darrick J. Wong
  2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:37 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

Hi all,

Fix various minor bugs in 5.10-rc1 (hence v3).

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=xfsprogs-5.10-fixes
---
 debian/changelog           |    2 +-
 debian/control             |    2 +-
 include/platform_defs.h.in |    6 +++---
 libxfs/trans.c             |   14 ++++++++++++++
 tools/libxfs-apply         |   14 +++++++++++---
 5 files changed, 30 insertions(+), 8 deletions(-)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/5] libxfs-apply: don't add duplicate headers
  2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
@ 2020-11-25 20:38 ` Darrick J. Wong
  2020-11-25 21:12   ` Eric Sandeen
  2020-12-04 17:16   ` Eric Sandeen
  2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:38 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

When we're backporting patches from libxfs, don't add a S-o-b header if
there's already one at the end of the headers of the patch being ported.

That way, we avoid things like:
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tools/libxfs-apply |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)


diff --git a/tools/libxfs-apply b/tools/libxfs-apply
index 3258272d6189..9271db380198 100755
--- a/tools/libxfs-apply
+++ b/tools/libxfs-apply
@@ -193,6 +193,14 @@ filter_xfsprogs_patch()
 	rm -f $_libxfs_files
 }
 
+add_header()
+{
+	local hdr="$1"
+	local hdrfile="$2"
+
+	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
+}
+
 fixup_header_format()
 {
 	local _source=$1
@@ -280,13 +288,13 @@ fixup_header_format()
 	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
 
 	# Add Signed-off-by: header if specified
-	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
-		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
+	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
+		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
 	else	# get it from git config if present
 		SOB_NAME=`git config --get user.name`
 		SOB_EMAIL=`git config --get user.email`
 		if [ ! -z ${SOB_NAME+x} ]; then
-			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
+			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
 		fi
 	fi
 


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] libxfs: fix weird comment
  2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
  2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
@ 2020-11-25 20:38 ` Darrick J. Wong
  2020-11-25 20:53   ` Eric Sandeen
  2020-12-01 10:17   ` Christoph Hellwig
  2020-11-25 20:38 ` [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions Darrick J. Wong
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:38 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

Not sure what happened with this multiline comment, but clean up all the
stars.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 include/platform_defs.h.in |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 95e7209a3332..539bdbecf6e0 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -86,9 +86,9 @@ extern int	platform_nproc(void);
 /* Simplified from version in include/linux/overflow.h */
 
 /*
- *  * Compute a*b+c, returning SIZE_MAX on overflow. Internal helper for
- *   * struct_size() below.
- *    */
+ * Compute a*b+c, returning SIZE_MAX on overflow. Internal helper for
+ * struct_size() below.
+ */
 static inline size_t __ab_c_size(size_t a, size_t b, size_t c)
 {
 	return (a * b) + c;


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions
  2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
  2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
  2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
@ 2020-11-25 20:38 ` Darrick J. Wong
  2020-12-01 10:18   ` Christoph Hellwig
  2020-11-25 20:38 ` [PATCH 4/5] debian: fix version in changelog Darrick J. Wong
  2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
  4 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:38 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

The libxfs resync added to the deferred ops code the ability to capture
the unfinished deferred ops and transaction reservation for later replay
during log recovery.  This nominally requires transactions to have the
ability to track rt extent reservations and usage, so port that missing
piece from the kernel now to avoid leaving logic bombs in case anyone
ever /does/ start messing with realtime.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/trans.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)


diff --git a/libxfs/trans.c b/libxfs/trans.c
index 83247582d61e..bc4af26c09f6 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -230,6 +230,7 @@ xfs_trans_reserve(
 			error = -ENOSPC;
 			goto undo_blocks;
 		}
+		tp->t_rtx_res += rtextents;
 	}
 
 	return 0;
@@ -765,6 +766,19 @@ _("Transaction block reservation exceeded! %u > %u\n"),
 		tp->t_ifree_delta += delta;
 		break;
 	case XFS_TRANS_SB_FREXTENTS:
+		/*
+		 * Track the number of rt extents allocated in the transaction.
+		 * Make sure it does not exceed the number reserved.
+		 */
+		if (delta < 0) {
+			tp->t_rtx_res_used += (uint)-delta;
+			if (tp->t_rtx_res_used > tp->t_rtx_res) {
+				fprintf(stderr,
+_("Transaction rt block reservation exceeded! %u > %u\n"),
+					tp->t_rtx_res_used, tp->t_rtx_res);
+				ASSERT(0);
+			}
+		}
 		tp->t_frextents_delta += delta;
 		break;
 	default:


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] debian: fix version in changelog
  2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
                   ` (2 preceding siblings ...)
  2020-11-25 20:38 ` [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions Darrick J. Wong
@ 2020-11-25 20:38 ` Darrick J. Wong
  2020-11-25 20:55   ` Eric Sandeen
  2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
  4 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:38 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

We're still at 5.10-rc0, at least according to the tags.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 debian/changelog |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/debian/changelog b/debian/changelog
index c41e3913efa4..ba6861985365 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xfsprogs (5.10.0-1) unstable; urgency=low
+xfsprogs (5.10.0-rc0-1) unstable; urgency=low
 
   * New upstream prerelease
 


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] debian: add build dependency on libinih-dev
  2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
                   ` (3 preceding siblings ...)
  2020-11-25 20:38 ` [PATCH 4/5] debian: fix version in changelog Darrick J. Wong
@ 2020-11-25 20:38 ` Darrick J. Wong
  2020-11-25 21:07   ` Eric Sandeen
  2020-11-25 22:09   ` Dave Chinner
  4 siblings, 2 replies; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-25 20:38 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

mkfs now supports configuration files, which are parsed using libinih.
Add this dependency to the debian build.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 debian/control |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/debian/control b/debian/control
index ddd17850e378..49ffd3409dc0 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: admin
 Priority: optional
 Maintainer: XFS Development Team <linux-xfs@vger.kernel.org>
 Uploaders: Nathan Scott <nathans@debian.org>, Anibal Monsalve Salazar <anibal@debian.org>
-Build-Depends: uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config
+Build-Depends: libinih-dev, uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config
 Standards-Version: 4.0.0
 Homepage: https://xfs.wiki.kernel.org/
 


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] libxfs: fix weird comment
  2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
@ 2020-11-25 20:53   ` Eric Sandeen
  2020-12-01 10:17   ` Christoph Hellwig
  1 sibling, 0 replies; 16+ messages in thread
From: Eric Sandeen @ 2020-11-25 20:53 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Not sure what happened with this multiline comment, but clean up all the
> stars.

urk, that looks like something I would do, thanks :)

"My God, it's full of stars!"

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  include/platform_defs.h.in |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
> index 95e7209a3332..539bdbecf6e0 100644
> --- a/include/platform_defs.h.in
> +++ b/include/platform_defs.h.in
> @@ -86,9 +86,9 @@ extern int	platform_nproc(void);
>  /* Simplified from version in include/linux/overflow.h */
>  
>  /*
> - *  * Compute a*b+c, returning SIZE_MAX on overflow. Internal helper for
> - *   * struct_size() below.
> - *    */
> + * Compute a*b+c, returning SIZE_MAX on overflow. Internal helper for
> + * struct_size() below.
> + */
>  static inline size_t __ab_c_size(size_t a, size_t b, size_t c)
>  {
>  	return (a * b) + c;
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] debian: fix version in changelog
  2020-11-25 20:38 ` [PATCH 4/5] debian: fix version in changelog Darrick J. Wong
@ 2020-11-25 20:55   ` Eric Sandeen
  0 siblings, 0 replies; 16+ messages in thread
From: Eric Sandeen @ 2020-11-25 20:55 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> We're still at 5.10-rc0, at least according to the tags.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Thanks for spotting this

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  debian/changelog |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/debian/changelog b/debian/changelog
> index c41e3913efa4..ba6861985365 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,4 +1,4 @@
> -xfsprogs (5.10.0-1) unstable; urgency=low
> +xfsprogs (5.10.0-rc0-1) unstable; urgency=low
>  
>    * New upstream prerelease
>  
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 5/5] debian: add build dependency on libinih-dev
  2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
@ 2020-11-25 21:07   ` Eric Sandeen
  2020-11-25 22:09   ` Dave Chinner
  1 sibling, 0 replies; 16+ messages in thread
From: Eric Sandeen @ 2020-11-25 21:07 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> mkfs now supports configuration files, which are parsed using libinih.
> Add this dependency to the debian build.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

I don't speak Debian very well but this looks fine.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  debian/control |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/debian/control b/debian/control
> index ddd17850e378..49ffd3409dc0 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -3,7 +3,7 @@ Section: admin
>  Priority: optional
>  Maintainer: XFS Development Team <linux-xfs@vger.kernel.org>
>  Uploaders: Nathan Scott <nathans@debian.org>, Anibal Monsalve Salazar <anibal@debian.org>
> -Build-Depends: uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config
> +Build-Depends: libinih-dev, uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config
>  Standards-Version: 4.0.0
>  Homepage: https://xfs.wiki.kernel.org/
>  
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] libxfs-apply: don't add duplicate headers
  2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
@ 2020-11-25 21:12   ` Eric Sandeen
  2020-11-30 17:13     ` Darrick J. Wong
  2020-12-04 17:16   ` Eric Sandeen
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Sandeen @ 2020-11-25 21:12 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> When we're backporting patches from libxfs, don't add a S-o-b header if
> there's already one at the end of the headers of the patch being ported.
> 
> That way, we avoid things like:
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

But it will still not add my additional SOB if I merge something across to
userspace that starts out with:

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

And I always felt like the committer should be adding their SOB to the end of
the chain when they move code from one place to another, especially if any
tweaks got made along the way.

IOWs I see the rationale for removing duplicate /sequential/ SOBs, but not
for removing duplicate SOBs in general.

Am I thinking about that wrong?

> ---
>  tools/libxfs-apply |   14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> index 3258272d6189..9271db380198 100755
> --- a/tools/libxfs-apply
> +++ b/tools/libxfs-apply
> @@ -193,6 +193,14 @@ filter_xfsprogs_patch()
>  	rm -f $_libxfs_files
>  }
>  
> +add_header()
> +{
> +	local hdr="$1"
> +	local hdrfile="$2"
> +
> +	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
> +}
> +
>  fixup_header_format()
>  {
>  	local _source=$1
> @@ -280,13 +288,13 @@ fixup_header_format()
>  	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
>  
>  	# Add Signed-off-by: header if specified
> -	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
> -		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
> +	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
> +		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
>  	else	# get it from git config if present
>  		SOB_NAME=`git config --get user.name`
>  		SOB_EMAIL=`git config --get user.email`
>  		if [ ! -z ${SOB_NAME+x} ]; then
> -			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
> +			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
>  		fi
>  	fi
>  
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 5/5] debian: add build dependency on libinih-dev
  2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
  2020-11-25 21:07   ` Eric Sandeen
@ 2020-11-25 22:09   ` Dave Chinner
  1 sibling, 0 replies; 16+ messages in thread
From: Dave Chinner @ 2020-11-25 22:09 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: sandeen, linux-xfs

On Wed, Nov 25, 2020 at 12:38:26PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> mkfs now supports configuration files, which are parsed using libinih.
> Add this dependency to the debian build.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  debian/control |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/debian/control b/debian/control
> index ddd17850e378..49ffd3409dc0 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -3,7 +3,7 @@ Section: admin
>  Priority: optional
>  Maintainer: XFS Development Team <linux-xfs@vger.kernel.org>
>  Uploaders: Nathan Scott <nathans@debian.org>, Anibal Monsalve Salazar <anibal@debian.org>
> -Build-Depends: uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config
> +Build-Depends: libinih-dev, uuid-dev, dh-autoreconf, debhelper (>= 5), gettext, libtool, libedit-dev, libblkid-dev (>= 2.17), linux-libc-dev, libdevmapper-dev, libattr1-dev, libicu-dev, dh-python, pkg-config

Oops, yeah, forgot that because my build machines already had that
library installed....

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] libxfs-apply: don't add duplicate headers
  2020-11-25 21:12   ` Eric Sandeen
@ 2020-11-30 17:13     ` Darrick J. Wong
  2020-11-30 17:16       ` Eric Sandeen
  0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2020-11-30 17:13 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Wed, Nov 25, 2020 at 03:12:39PM -0600, Eric Sandeen wrote:
> On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > When we're backporting patches from libxfs, don't add a S-o-b header if
> > there's already one at the end of the headers of the patch being ported.
> > 
> > That way, we avoid things like:
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> But it will still not add my additional SOB if I merge something across to
> userspace that starts out with:
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> And I always felt like the committer should be adding their SOB to the end of
> the chain when they move code from one place to another, especially if any
> tweaks got made along the way.
> 
> IOWs I see the rationale for removing duplicate /sequential/ SOBs, but not
> for removing duplicate SOBs in general.
> 
> Am I thinking about that wrong?

add_header is different from last time -- whereas before it would search
the entire $hdrfile for $hdr and add $hdr if it didn't find a match, now
it only looks at the last line of $hdrfile for a match.

For your example above, it would not add another "SOB: Darrick" because
there's already one at the bottom of the headers; but it would add
another "SOB: Eric" because this commit acquired other tags after your
first signoff.

--D

> > ---
> >  tools/libxfs-apply |   14 +++++++++++---
> >  1 file changed, 11 insertions(+), 3 deletions(-)
> > 
> > 
> > diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> > index 3258272d6189..9271db380198 100755
> > --- a/tools/libxfs-apply
> > +++ b/tools/libxfs-apply
> > @@ -193,6 +193,14 @@ filter_xfsprogs_patch()
> >  	rm -f $_libxfs_files
> >  }
> >  
> > +add_header()
> > +{
> > +	local hdr="$1"
> > +	local hdrfile="$2"
> > +
> > +	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
> > +}
> > +
> >  fixup_header_format()
> >  {
> >  	local _source=$1
> > @@ -280,13 +288,13 @@ fixup_header_format()
> >  	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
> >  
> >  	# Add Signed-off-by: header if specified
> > -	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
> > -		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
> > +	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
> > +		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
> >  	else	# get it from git config if present
> >  		SOB_NAME=`git config --get user.name`
> >  		SOB_EMAIL=`git config --get user.email`
> >  		if [ ! -z ${SOB_NAME+x} ]; then
> > -			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
> > +			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
> >  		fi
> >  	fi
> >  
> > 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] libxfs-apply: don't add duplicate headers
  2020-11-30 17:13     ` Darrick J. Wong
@ 2020-11-30 17:16       ` Eric Sandeen
  0 siblings, 0 replies; 16+ messages in thread
From: Eric Sandeen @ 2020-11-30 17:16 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/30/20 11:13 AM, Darrick J. Wong wrote:
> On Wed, Nov 25, 2020 at 03:12:39PM -0600, Eric Sandeen wrote:
>> On 11/25/20 2:38 PM, Darrick J. Wong wrote:
>>> From: Darrick J. Wong <darrick.wong@oracle.com>
>>>
>>> When we're backporting patches from libxfs, don't add a S-o-b header if
>>> there's already one at the end of the headers of the patch being ported.
>>>
>>> That way, we avoid things like:
>>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>>
>> But it will still not add my additional SOB if I merge something across to
>> userspace that starts out with:
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>>
>> And I always felt like the committer should be adding their SOB to the end of
>> the chain when they move code from one place to another, especially if any
>> tweaks got made along the way.
>>
>> IOWs I see the rationale for removing duplicate /sequential/ SOBs, but not
>> for removing duplicate SOBs in general.
>>
>> Am I thinking about that wrong?
> 
> add_header is different from last time -- whereas before it would search
> the entire $hdrfile for $hdr and add $hdr if it didn't find a match, now
> it only looks at the last line of $hdrfile for a match.

I'm sorry, I visually checked and thought it was same as last time.  Will
look again, more closely.

Thanks,
-Eric

> For your example above, it would not add another "SOB: Darrick" because
> there's already one at the bottom of the headers; but it would add
> another "SOB: Eric" because this commit acquired other tags after your
> first signoff.
> 
> --D
> 
>>> ---
>>>  tools/libxfs-apply |   14 +++++++++++---
>>>  1 file changed, 11 insertions(+), 3 deletions(-)
>>>
>>>
>>> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
>>> index 3258272d6189..9271db380198 100755
>>> --- a/tools/libxfs-apply
>>> +++ b/tools/libxfs-apply
>>> @@ -193,6 +193,14 @@ filter_xfsprogs_patch()
>>>  	rm -f $_libxfs_files
>>>  }
>>>  
>>> +add_header()
>>> +{
>>> +	local hdr="$1"
>>> +	local hdrfile="$2"
>>> +
>>> +	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
>>> +}
>>> +
>>>  fixup_header_format()
>>>  {
>>>  	local _source=$1
>>> @@ -280,13 +288,13 @@ fixup_header_format()
>>>  	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
>>>  
>>>  	# Add Signed-off-by: header if specified
>>> -	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
>>> -		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
>>> +	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
>>> +		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
>>>  	else	# get it from git config if present
>>>  		SOB_NAME=`git config --get user.name`
>>>  		SOB_EMAIL=`git config --get user.email`
>>>  		if [ ! -z ${SOB_NAME+x} ]; then
>>> -			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
>>> +			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
>>>  		fi
>>>  	fi
>>>  
>>>
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] libxfs: fix weird comment
  2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
  2020-11-25 20:53   ` Eric Sandeen
@ 2020-12-01 10:17   ` Christoph Hellwig
  1 sibling, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2020-12-01 10:17 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: sandeen, linux-xfs

On Wed, Nov 25, 2020 at 12:38:08PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Not sure what happened with this multiline comment, but clean up all the
> stars.

Looks like a typical copy and paste error when the editor tries to be
"smart".

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions
  2020-11-25 20:38 ` [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions Darrick J. Wong
@ 2020-12-01 10:18   ` Christoph Hellwig
  0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2020-12-01 10:18 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: sandeen, linux-xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] libxfs-apply: don't add duplicate headers
  2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
  2020-11-25 21:12   ` Eric Sandeen
@ 2020-12-04 17:16   ` Eric Sandeen
  1 sibling, 0 replies; 16+ messages in thread
From: Eric Sandeen @ 2020-12-04 17:16 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

On 11/25/20 2:38 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> When we're backporting patches from libxfs, don't add a S-o-b header if
> there's already one at the end of the headers of the patch being ported.
> 
> That way, we avoid things like:
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

I like how that SOB is part of the changelog and is also part of
the changelog ;)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  tools/libxfs-apply |   14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> index 3258272d6189..9271db380198 100755
> --- a/tools/libxfs-apply
> +++ b/tools/libxfs-apply
> @@ -193,6 +193,14 @@ filter_xfsprogs_patch()
>  	rm -f $_libxfs_files
>  }
>  
> +add_header()
> +{
> +	local hdr="$1"
> +	local hdrfile="$2"
> +
> +	tail -n 1 "$hdrfile" | grep -q "^${hdr}$" || echo "$hdr" >> "$hdrfile"
> +}
> +
>  fixup_header_format()
>  {
>  	local _source=$1
> @@ -280,13 +288,13 @@ fixup_header_format()
>  	sed -i '${/^[[:space:]]*$/d;}' $_hdr.new
>  
>  	# Add Signed-off-by: header if specified
> -	if [ ! -z ${SIGNED_OFF_BY+x} ]; then 
> -		echo "Signed-off-by: $SIGNED_OFF_BY" >> $_hdr.new
> +	if [ ! -z ${SIGNED_OFF_BY+x} ]; then
> +		add_header "Signed-off-by: $SIGNED_OFF_BY" $_hdr.new
>  	else	# get it from git config if present
>  		SOB_NAME=`git config --get user.name`
>  		SOB_EMAIL=`git config --get user.email`
>  		if [ ! -z ${SOB_NAME+x} ]; then
> -			echo "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" >> $_hdr.new
> +			add_header "Signed-off-by: $SOB_NAME <$SOB_EMAIL>" $_hdr.new
>  		fi
>  	fi
>  
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-12-04 17:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 20:37 [PATCH v3 0/5] xfsprogs: fixes for 5.10-rc1 Darrick J. Wong
2020-11-25 20:38 ` [PATCH 1/5] libxfs-apply: don't add duplicate headers Darrick J. Wong
2020-11-25 21:12   ` Eric Sandeen
2020-11-30 17:13     ` Darrick J. Wong
2020-11-30 17:16       ` Eric Sandeen
2020-12-04 17:16   ` Eric Sandeen
2020-11-25 20:38 ` [PATCH 2/5] libxfs: fix weird comment Darrick J. Wong
2020-11-25 20:53   ` Eric Sandeen
2020-12-01 10:17   ` Christoph Hellwig
2020-11-25 20:38 ` [PATCH 3/5] libxfs: add realtime extent reservation and usage tracking to transactions Darrick J. Wong
2020-12-01 10:18   ` Christoph Hellwig
2020-11-25 20:38 ` [PATCH 4/5] debian: fix version in changelog Darrick J. Wong
2020-11-25 20:55   ` Eric Sandeen
2020-11-25 20:38 ` [PATCH 5/5] debian: add build dependency on libinih-dev Darrick J. Wong
2020-11-25 21:07   ` Eric Sandeen
2020-11-25 22:09   ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.