ext2_filsys current_fs;
quota_ctx_t current_qctx;
ext2_ino_t root, cwd;
+int no_copy_xattrs;
static int debugfs_setup_tdb(const char *device_name, char *undo_file,
io_manager *io_ptr)
char *list = NULL;
int i;
+ if (no_copy_xattrs)
+ return 0;
+
size = llistxattr(filename, NULL, 0);
if (size == -1) {
retval = errno;
ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode);
};
+extern int no_copy_xattrs; /* this should eventually be a flag
+ passed to populate_fs3() */
+
/* For populating the filesystem */
extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
const char *source_dir, ext2_ino_t root);
entirely one time. If the option value is omitted, it defaults to 1 to
enable lazy journal inode zeroing.
.TP
+.BI no_copy_xattrs
+Normally
+.B mke2fs
+will copy the extended attributes of the files in the directory
+hierarchy specified via the (optional)
+.B \-d
+option. This will disable the copy and leaves the files in the newly
+created file system without any extended attributes.
+.TP
.BI num_backup_sb= <0|1|2>
If the
.B sparse_super2
int journal_flags;
static int lazy_itable_init;
static int packed_meta_blocks;
+int no_copy_xattrs;
static char *bad_blocks_filename = NULL;
static __u32 fs_stride;
/* Initialize usr/grp quotas by default */
r_usage++;
continue;
}
+ } else if (strcmp(token, "no_copy_xattrs") == 0) {
+ no_copy_xattrs = 1;
+ continue;
} else if (strcmp(token, "num_backup_sb") == 0) {
if (!arg) {
r_usage++;
# make filesystem with enough inodes and blocks to hold all the test files
> $TMPFILE
NUM=$((NUM * 5 / 3))
-echo "mke2fs -b $BSIZE -O dir_index,extent -d$SRC -N$NUM $TMPFILE $NUM" >> $OUT
-$MKE2FS -b $BSIZE -O dir_index,extent -d$SRC -N$NUM $TMPFILE $NUM >> $OUT 2>&1
+echo "mke2fs -b $BSIZE -O dir_index,extent -E no_copy_xattrs -d$SRC -N$NUM $TMPFILE $NUM" >> $OUT
+$MKE2FS -b $BSIZE -O dir_index,extent -E no_copy_xattrs -d$SRC -N$NUM $TMPFILE $NUM >> $OUT 2>&1
rm -r $SRC
# Run e2fsck to convert dir to htree before deleting the files, as mke2fs