Skip to contentSkip to conversation

debugfs/set_fields: fix several errors and add assertions

PATCH Applied Konstantin Khlebnikov 4 participants 5 messages Feb 25, 2015 – Jun 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 debugfs/set_fields: fix several errors and add assertions

Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

v2: check tables in unit test "debugfs/tst_set_fields"

---
 debugfs/Makefile.in  |   11 +++++++-
 debugfs/set_fields.c |   73 +++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 73 insertions(+), 11 deletions(-)
debugfs/Makefile.in +10 -1
index 1a65c13..a768248 100644
@@ -151,7 +151,8 @@ uninstall:
 
 clean::
 	$(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
-		extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static
+		extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static \
+		tst_set_fields
 
 mostlyclean: clean
 distclean: clean
@@ -159,6 +160,14 @@ distclean: clean
 		$(srcdir)/Makefile.in.old $(srcdir)/recovery.c \
 		$(srcdir)/revoke.c
 
+tst_set_fields: set_fields.c util.c
+	$(E) "  LD $@"
+	$(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(SYSLIBS) -DUNITTEST \
+		-o tst_set_fields $(srcdir)/set_fields.c $(srcdir)/util.c $(LIBS)
+
+check:: tst_set_fields
+	$(TESTENV) ./tst_set_fields
+
 # +++ Dependency line eater +++
 # 
 # Makefile dependencies follow.  This must be the last section in
debugfs/set_fields.c +63 -10

144 lines not on this page · raw message

#1 lore raw
Quoted 6 lines · Konstantin Khlebnikov

Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Quoted 6 lines

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

v2: check tables in unit test "debugfs/tst_set_fields"

Applied, thanks. Apologies for the delay.

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in

#2 lore raw
Quoted 7 lines · Theodore Ts'o
Quoted 6 lines · Konstantin Khlebnikov

Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Quoted 8 lines
Quoted 6 lines

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

v2: check tables in unit test "debugfs/tst_set_fields"

Applied, thanks. Apologies for the delay.

No problem. Thanks.

I have a somehow related question: do you interested in project quota in ext4?

It seems I could revisit that task once again.
This time I could make it completely compatible with XFS. Looks like last time all
objections were about my attempt of making overall behaviour more useful.

--
Konstantin
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in

#3 lore raw
Quoted 20 lines · Konstantin Khlebnikov
Quoted 7 lines · Theodore Ts'o
Quoted 6 lines · Konstantin Khlebnikov

Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Quoted 8 lines
Quoted 6 lines

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

v2: check tables in unit test "debugfs/tst_set_fields"

Applied, thanks. Apologies for the delay.

Quoted 8 lines

No problem. Thanks.

I have a somehow related question: do you interested in project quota in ext4?

It seems I could revisit that task once again.
This time I could make it completely compatible with XFS. Looks like last time all objections were about my attempt of making overall behaviour more useful.

There are a recent set of ext4 project quota patches from Li Xi posted to the list that are already compatible with XFS. All that is needed to get them landed is some testing with xfstests to ensure they really work with the XFS utilities.

Rather than having two competing sets of project quota patches for ext4 it would be better to get this first set of patches landed, and then if you want to enhance their functionality it can be done on top of those patches.

Cheers, Andreas

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in

#4 lore raw
Quoted 34 lines · Andreas Dilger
Quoted 20 lines · Konstantin Khlebnikov
Quoted 7 lines · Theodore Ts'o
Quoted 6 lines · Konstantin Khlebnikov

Fix copy-n-paste errors:
* remove duplicate "lastcheck" and "min_extra_isize"
* fix pointer for "first_error_line" and "last_error_line"
* remove superblock field "inodes_count" from inode fields
* add null-termination for mmp_fields

Quoted 8 lines
Quoted 6 lines

Add assertions for catching such errors in the future.
Mark true aliases with flag "FLAG_ALIAS" and suppress assert for them.

v2: check tables in unit test "debugfs/tst_set_fields"

Applied, thanks. Apologies for the delay.

Quoted 8 lines

No problem. Thanks.

I have a somehow related question: do you interested in project quota in ext4?

It seems I could revisit that task once again.
This time I could make it completely compatible with XFS. Looks like last time all objections were about my attempt of making overall behaviour more useful.

There are a recent set of ext4 project quota patches from Li Xi posted to the list that are already compatible with XFS. All that is needed to get them landed is some testing with xfstests to ensure they really work with the XFS utilities.

Quoted 7 lines

Rather than having two competing sets of project quota patches for ext4 it would be better to get this first set of patches landed, and then if you want to enhance their functionality it can be done on top of those patches.

Cheers, Andreas

Ok, I'll look into recent version of his patches.

The last time I looked (v9 or so) they breaked a lot of tests in e2fsprogs because existing tests are not ready for changing fs layout: any new filed in inode or superblock breaks them all.

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in