Linux-XFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] xfsprogs: add missing carriage returns in libxfs/rdwr.c
@ 2019-11-22 21:31 John Pittman
  2019-11-23  7:07 ` Pavel Reichl
  0 siblings, 1 reply; 3+ messages in thread
From: John Pittman @ 2019-11-22 21:31 UTC (permalink / raw)
  To: esandeen; +Cc: linux-xfs, John Pittman

In libxfs/rdwr.c, there are several fprintf() calls that are
missing trailing carriage returns. This translates to the
following CLI prompt being on the same line as the message.
Add missing carriage returns, alleviating the issue.

Fixes: 0a7942b38215 ("libxfs: don't discard dirty buffers")
Signed-off-by: John Pittman <jpittman@redhat.com>
---
 libxfs/rdwr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 7080cd9c..3f69192d 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -651,7 +651,7 @@ __libxfs_getbufr(int blen)
 	pthread_mutex_unlock(&xfs_buf_freelist.cm_mutex);
 	bp->b_ops = NULL;
 	if (bp->b_flags & LIBXFS_B_DIRTY)
-		fprintf(stderr, "found dirty buffer (bulk) on free list!");
+		fprintf(stderr, "found dirty buffer (bulk) on free list!\n");
 
 	return bp;
 }
@@ -1224,7 +1224,7 @@ libxfs_brelse(
 		return;
 	if (bp->b_flags & LIBXFS_B_DIRTY)
 		fprintf(stderr,
-			"releasing dirty buffer to free list!");
+			"releasing dirty buffer to free list!\n");
 
 	pthread_mutex_lock(&xfs_buf_freelist.cm_mutex);
 	list_add(&bp->b_node.cn_mru, &xfs_buf_freelist.cm_list);
@@ -1245,7 +1245,7 @@ libxfs_bulkrelse(
 	list_for_each_entry(bp, list, b_node.cn_mru) {
 		if (bp->b_flags & LIBXFS_B_DIRTY)
 			fprintf(stderr,
-				"releasing dirty buffer (bulk) to free list!");
+				"releasing dirty buffer (bulk) to free list!\n");
 		count++;
 	}
 
-- 
2.17.2


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

* Re: [PATCH] xfsprogs: add missing carriage returns in libxfs/rdwr.c
  2019-11-22 21:31 [PATCH] xfsprogs: add missing carriage returns in libxfs/rdwr.c John Pittman
@ 2019-11-23  7:07 ` Pavel Reichl
  2019-11-23 15:44   ` John Pittman
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Reichl @ 2019-11-23  7:07 UTC (permalink / raw)
  To: John Pittman; +Cc: Eric Sandeen, linux-xfs

On Fri, Nov 22, 2019 at 10:31 PM John Pittman <jpittman@redhat.com> wrote:
>
> In libxfs/rdwr.c, there are several fprintf() calls that are
> missing trailing carriage returns. This translates to the
> following CLI prompt being on the same line as the message.
> Add missing carriage returns, alleviating the issue.
>
> Fixes: 0a7942b38215 ("libxfs: don't discard dirty buffers")
> Signed-off-by: John Pittman <jpittman@redhat.com>
> ---
>  libxfs/rdwr.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
> index 7080cd9c..3f69192d 100644
> --- a/libxfs/rdwr.c
> +++ b/libxfs/rdwr.c
> @@ -651,7 +651,7 @@ __libxfs_getbufr(int blen)
>         pthread_mutex_unlock(&xfs_buf_freelist.cm_mutex);
>         bp->b_ops = NULL;
>         if (bp->b_flags & LIBXFS_B_DIRTY)
> -               fprintf(stderr, "found dirty buffer (bulk) on free list!");
> +               fprintf(stderr, "found dirty buffer (bulk) on free list!\n");
>
>         return bp;
>  }
> @@ -1224,7 +1224,7 @@ libxfs_brelse(
>                 return;
>         if (bp->b_flags & LIBXFS_B_DIRTY)
>                 fprintf(stderr,
> -                       "releasing dirty buffer to free list!");
> +                       "releasing dirty buffer to free list!\n");
>
>         pthread_mutex_lock(&xfs_buf_freelist.cm_mutex);
>         list_add(&bp->b_node.cn_mru, &xfs_buf_freelist.cm_list);
> @@ -1245,7 +1245,7 @@ libxfs_bulkrelse(
>         list_for_each_entry(bp, list, b_node.cn_mru) {
>                 if (bp->b_flags & LIBXFS_B_DIRTY)
>                         fprintf(stderr,
> -                               "releasing dirty buffer (bulk) to free list!");
> +                               "releasing dirty buffer (bulk) to free list!\n");
>                 count++;
>         }
>
> --
> 2.17.2
>

Hello John,

it seems to me that you are confusing carriage return (CR, \r) and
line feed (LF, \n) in the commit description. Could you check that
out, please? Otherwise it looks good to me.

Thanks.

Pave Reichl


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

* Re: [PATCH] xfsprogs: add missing carriage returns in libxfs/rdwr.c
  2019-11-23  7:07 ` Pavel Reichl
@ 2019-11-23 15:44   ` John Pittman
  0 siblings, 0 replies; 3+ messages in thread
From: John Pittman @ 2019-11-23 15:44 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: Eric Sandeen, linux-xfs

You're exactly right Pavel; thanks for the clarification. Sending v2 now.

On Sat, Nov 23, 2019 at 2:08 AM Pavel Reichl <preichl@redhat.com> wrote:
>
> On Fri, Nov 22, 2019 at 10:31 PM John Pittman <jpittman@redhat.com> wrote:
> >
> > In libxfs/rdwr.c, there are several fprintf() calls that are
> > missing trailing carriage returns. This translates to the
> > following CLI prompt being on the same line as the message.
> > Add missing carriage returns, alleviating the issue.
> >
> > Fixes: 0a7942b38215 ("libxfs: don't discard dirty buffers")
> > Signed-off-by: John Pittman <jpittman@redhat.com>
> > ---
> >  libxfs/rdwr.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
> > index 7080cd9c..3f69192d 100644
> > --- a/libxfs/rdwr.c
> > +++ b/libxfs/rdwr.c
> > @@ -651,7 +651,7 @@ __libxfs_getbufr(int blen)
> >         pthread_mutex_unlock(&xfs_buf_freelist.cm_mutex);
> >         bp->b_ops = NULL;
> >         if (bp->b_flags & LIBXFS_B_DIRTY)
> > -               fprintf(stderr, "found dirty buffer (bulk) on free list!");
> > +               fprintf(stderr, "found dirty buffer (bulk) on free list!\n");
> >
> >         return bp;
> >  }
> > @@ -1224,7 +1224,7 @@ libxfs_brelse(
> >                 return;
> >         if (bp->b_flags & LIBXFS_B_DIRTY)
> >                 fprintf(stderr,
> > -                       "releasing dirty buffer to free list!");
> > +                       "releasing dirty buffer to free list!\n");
> >
> >         pthread_mutex_lock(&xfs_buf_freelist.cm_mutex);
> >         list_add(&bp->b_node.cn_mru, &xfs_buf_freelist.cm_list);
> > @@ -1245,7 +1245,7 @@ libxfs_bulkrelse(
> >         list_for_each_entry(bp, list, b_node.cn_mru) {
> >                 if (bp->b_flags & LIBXFS_B_DIRTY)
> >                         fprintf(stderr,
> > -                               "releasing dirty buffer (bulk) to free list!");
> > +                               "releasing dirty buffer (bulk) to free list!\n");
> >                 count++;
> >         }
> >
> > --
> > 2.17.2
> >
>
> Hello John,
>
> it seems to me that you are confusing carriage return (CR, \r) and
> line feed (LF, \n) in the commit description. Could you check that
> out, please? Otherwise it looks good to me.
>
> Thanks.
>
> Pave Reichl
>


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 21:31 [PATCH] xfsprogs: add missing carriage returns in libxfs/rdwr.c John Pittman
2019-11-23  7:07 ` Pavel Reichl
2019-11-23 15:44   ` John Pittman

Linux-XFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-xfs/0 linux-xfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-xfs linux-xfs/ https://lore.kernel.org/linux-xfs \
		linux-xfs@vger.kernel.org
	public-inbox-index linux-xfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-xfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git