summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2024-03-05 01:30:02 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-05 01:30:02 +0100
commitcb6b4024b5e0b79f6416dc9d2553208b981f4550 (patch)
treea4719bd89f9fa89dbd8c7f5f9f322f9c3fb07dda
parenteb1dc8ae5e7cd683d082d2278bc79a04047c7102 (diff)
ext2fs: New default: use xattrs to store translator recordsHEADmaster
Replaces experimental option --x-xattr-translator-records with --no-xattr-translator-records to allow rolling back to previous behaviour. NB: - Legacy records still work with either setting. - Adding a new record removes a legacy one.
-rw-r--r--ext2fs/ext2fs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c
index 3c76d8c8..3836bdf6 100644
--- a/ext2fs/ext2fs.c
+++ b/ext2fs/ext2fs.c
@@ -89,15 +89,14 @@ struct ext2_group_desc *group_desc_image;
struct pokel global_pokel;
-int use_xattr_translator_records;
#ifdef EXT2FS_DEBUG
int ext2_debug_flag;
#endif
/* Use extended attribute-based translator records. */
-int use_xattr_translator_records;
-#define X_XATTR_TRANSLATOR_RECORDS -1
+int use_xattr_translator_records = 1;
+#define NO_XATTR_TRANSLATOR_RECORDS -1
/* Ext2fs-specific options. */
static const struct argp_option
@@ -108,8 +107,8 @@ options[] =
" (not compiled in)"
#endif
},
- {"x-xattr-translator-records", X_XATTR_TRANSLATOR_RECORDS, 0, 0,
- "Store translator records in extended attributes (experimental)"},
+ {"no-xattr-translator-records", NO_XATTR_TRANSLATOR_RECORDS, 0, 0,
+ "Do not store translator records in extended attributes (legacy)"},
#ifdef ALTERNATE_SBLOCK
/* XXX This is not implemented. */
{"sblock", 'S', "BLOCKNO", 0,
@@ -138,8 +137,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
case 'D':
values->debug_flag = 1;
break;
- case X_XATTR_TRANSLATOR_RECORDS:
- values->use_xattr_translator_records = 1;
+ case NO_XATTR_TRANSLATOR_RECORDS:
+ values->use_xattr_translator_records = 0;
break;
#ifdef ALTERNATE_SBLOCK
case 'S':
@@ -159,6 +158,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
return ENOMEM;
state->hook = values;
memset (values, 0, sizeof *values);
+ values->use_xattr_translator_records = use_xattr_translator_records;
#ifdef ALTERNATE_SBLOCK
values->sb_block = SBLOCK_BLOCK;
#endif
@@ -194,8 +194,8 @@ diskfs_append_args (char **argz, size_t *argz_len)
/* Get the standard things. */
err = diskfs_append_std_options (argz, argz_len);
- if (!err && use_xattr_translator_records)
- err = argz_add (argz, argz_len, "--x-xattr-translator-records");
+ if (!err && !use_xattr_translator_records)
+ err = argz_add (argz, argz_len, "--no-xattr-translator-records");
#ifdef EXT2FS_DEBUG
if (!err && ext2_debug_flag)