Skip to contentSkip to conversation

mkfs: enable reflink and rmap by default

PATCH In review Darrick J. Wong 2 participants 3 messages May 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkfs: enable reflink and rmap by default

From: Darrick J. Wong <[email protected]>

Enable reflink and reverse mapping by default.

---
 mkfs/xfs_mkfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mkfs/xfs_mkfs.c +4 -4
index 0862621a..3874f7dd 100644
@@ -2021,14 +2021,14 @@ _("sparse inodes not supported without CRC support\n"));
 		}
 		cli->sb_feat.spinodes = false;
 
-		if (cli->sb_feat.rmapbt) {
+		if (cli->sb_feat.rmapbt && cli_opt_set(&mopts, M_RMAPBT)) {
 			fprintf(stderr,
 _("rmapbt not supported without CRC support\n"));
 			usage();
 		}
 		cli->sb_feat.rmapbt = false;
 
-		if (cli->sb_feat.reflink) {
+		if (cli->sb_feat.reflink && cli_opt_set(&mopts, M_REFLINK)) {
 			fprintf(stderr,
 _("reflink not supported without CRC support\n"));
 			usage();
@@ -3934,8 +3934,8 @@ main(
 			.dirftype = true,
 			.finobt = true,
 			.spinodes = true,
-			.rmapbt = false,
-			.reflink = false,
+			.rmapbt = true,
+			.reflink = true,
 			.parent_pointers = false,
 			.nodalign = false,
 			.nortalign = false,
#1 lore raw
Quoted 3 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Enable reflink and reverse mapping by default.

Soooo until now, I thought I had understood that rmap was unlikely to be default ever, due to performance impacts. Is this no longer the case? Of course I can't find any emails or IRC logs to indicate I didn't just dream this up...

Also, at this point, remind me again what uses rmap and why it should be enabled now?

-Eric

Quoted 38 lines
---
 mkfs/xfs_mkfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mkfs/xfs_mkfs.c +4 -4
index 0862621a..3874f7dd 100644
@@ -2021,14 +2021,14 @@ _("sparse inodes not supported without CRC support\n"));
 		}
 		cli->sb_feat.spinodes = false;
 
-		if (cli->sb_feat.rmapbt) {
+		if (cli->sb_feat.rmapbt && cli_opt_set(&mopts, M_RMAPBT)) {
 			fprintf(stderr,
 _("rmapbt not supported without CRC support\n"));
 			usage();
 		}
 		cli->sb_feat.rmapbt = false;
 
-		if (cli->sb_feat.reflink) {
+		if (cli->sb_feat.reflink && cli_opt_set(&mopts, M_REFLINK)) {
 			fprintf(stderr,
 _("reflink not supported without CRC support\n"));
 			usage();
@@ -3934,8 +3934,8 @@ main(
 			.dirftype = true,
 			.finobt = true,
 			.spinodes = true,
-			.rmapbt = false,
-			.reflink = false,
+			.rmapbt = true,
+			.reflink = true,
 			.parent_pointers = false,
 			.nodalign = false,
 			.nortalign = false,
#2 lore raw
Quoted 7 lines · Eric Sandeen
Quoted 3 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Enable reflink and reverse mapping by default.

Soooo until now, I thought I had understood that rmap was unlikely to be default ever, due to performance impacts. Is this no longer the case?

No, it's still the case.

Quoted 5 lines

Of course I can't find any emails or IRC logs to indicate I didn't just dream this up...

Also, at this point, remind me again what uses rmap and why it should be enabled now?

TBH it's most useful for enhancing xfs_scrub's powers, so there's no reason to enable it by default until at least 5.2 when we finally land the last of the scrubbers. Probably. One could make a solid argument that we ought to wait until the scrub/health code has been stable for ~6mo before even thinking about rmap by default.

Anyway I'll break this into separate pieces and resend the reflink part for 5.1.

--D

Quoted 41 lines

-Eric

Quoted 38 lines
---
 mkfs/xfs_mkfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mkfs/xfs_mkfs.c +4 -4
index 0862621a..3874f7dd 100644
@@ -2021,14 +2021,14 @@ _("sparse inodes not supported without CRC support\n"));
 		}
 		cli->sb_feat.spinodes = false;
 
-		if (cli->sb_feat.rmapbt) {
+		if (cli->sb_feat.rmapbt && cli_opt_set(&mopts, M_RMAPBT)) {
 			fprintf(stderr,
 _("rmapbt not supported without CRC support\n"));
 			usage();
 		}
 		cli->sb_feat.rmapbt = false;
 
-		if (cli->sb_feat.reflink) {
+		if (cli->sb_feat.reflink && cli_opt_set(&mopts, M_REFLINK)) {
 			fprintf(stderr,
 _("reflink not supported without CRC support\n"));
 			usage();
@@ -3934,8 +3934,8 @@ main(
 			.dirftype = true,
 			.finobt = true,
 			.spinodes = true,
-			.rmapbt = false,
-			.reflink = false,
+			.rmapbt = true,
+			.reflink = true,
 			.parent_pointers = false,
 			.nodalign = false,
 			.nortalign = false,