Skip to contentSkip to conversation

xfsprogs: add missing line feeds in libxfs/rdwr.c

PATCH In review John Pittman 3 participants 4 messages Nov 23, 2019 – Nov 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 xfsprogs: add missing line feeds in libxfs/rdwr.c

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

Fixes 0a7942b38215 ("libxfs: don't discard dirty buffers")
---
 libxfs/rdwr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
libxfs/rdwr.c +3 -3
index 7080cd9c..3f69192d 100644
@@ -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++;
 	}
 
Signature · 1 line
2.17.2
Reviewed-by on v3 1/1
#1 lore raw
Quoted 44 lines · John Pittman

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

Fixes 0a7942b38215 ("libxfs: don't discard dirty buffers")
---
 libxfs/rdwr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
libxfs/rdwr.c +3 -4
index 7080cd9c..3f69192d 100644
@@ -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++;
        }
 
--
Quoted 2 lines

2.17.2

Hi John,

thanks for the update.

Reviewed-by on v3 1/1
#2 lore raw
In reply to John Pittman
Quoted 7 lines · John Pittman

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

Fixes 0a7942b38215 ("libxfs: don't discard dirty buffers")

Looks good.

Quoted 38 lines
---
 libxfs/rdwr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
libxfs/rdwr.c +3 -3
index 7080cd9c..3f69192d 100644
@@ -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++;
 	}
 
Signature · 1 line
2.17.2
Signature · 1 line
Carlos
#3 lore raw
In reply to John Pittman
Quoted 7 lines · John Pittman

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

Fixes 0a7942b38215 ("libxfs: don't discard dirty buffers")

Despite my Reviewed-by previously, next patches, please don't forget to also provide the changelog for your Vx patches.

Quoted 1 line

---

^ Changelogs should go below this line, so they are not propagated to the git tree, but it's really helpful to understand why you needed to send new versions.

Cheers.

Quoted 37 lines
 libxfs/rdwr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
libxfs/rdwr.c +3 -3
index 7080cd9c..3f69192d 100644
@@ -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++;
 	}
 
Signature · 1 line
2.17.2
Signature · 1 line
Carlos