Skip to contentSkip to conversation

xfs: move error injection tags into their own file

PATCH Superseded Darrick J. Wong 2 participants 6 messages Oct 31, 2017 – Nov 1, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: move error injection tags into their own file

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

Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace.

---
 fs/xfs/libxfs/xfs_ag_resv.c   |    1 
 fs/xfs/libxfs/xfs_alloc.c     |    1 
 fs/xfs/libxfs/xfs_bmap.c      |    1 
 fs/xfs/libxfs/xfs_btree.c     |    1 
 fs/xfs/libxfs/xfs_dir2.c      |    1 
 fs/xfs/libxfs/xfs_errortag.h  |  106 +++++++++++++++++++++++++++++++++++++++++
 fs/xfs/libxfs/xfs_ialloc.c    |    1 
 fs/xfs/libxfs/xfs_inode_buf.c |    1 
 fs/xfs/libxfs/xfs_refcount.c  |    1 
 fs/xfs/libxfs/xfs_rmap.c      |    1 
 fs/xfs/xfs_buf.c              |    1 
 fs/xfs/xfs_error.c            |    1 
 fs/xfs/xfs_error.h            |   83 --------------------------------
 fs/xfs/xfs_inode.c            |    1 
 fs/xfs/xfs_iomap.c            |    1 
 fs/xfs/xfs_log.c              |    1 
 fs/xfs/xfs_trans_ail.c        |    1 
 17 files changed, 121 insertions(+), 83 deletions(-)
 create mode 100644 fs/xfs/libxfs/xfs_errortag.h
fs/xfs/libxfs/xfs_ag_resv.c +1 -0
index df3e600..2291f42 100644
@@ -27,6 +27,7 @@
 #include "xfs_mount.h"
 #include "xfs_defer.h"
 #include "xfs_alloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_alloc.c +1 -0
index 11c01e2..0da8001 100644
@@ -31,6 +31,7 @@
 #include "xfs_alloc_btree.h"
 #include "xfs_alloc.h"
 #include "xfs_extent_busy.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_cksum.h"
 #include "xfs_trace.h"
fs/xfs/libxfs/xfs_bmap.c +1 -0
index f45f05c..ebb5958 100644
@@ -38,6 +38,7 @@
 #include "xfs_bmap_util.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_rtalloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_quota.h"
 #include "xfs_trans_space.h"
fs/xfs/libxfs/xfs_btree.c +1 -0
index 848f371..994fc1c 100644
@@ -29,6 +29,7 @@
 #include "xfs_inode_item.h"
 #include "xfs_buf_item.h"
 #include "xfs_btree.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_dir2.c +1 -0
index 41ea6d4..e10778c 100644
@@ -31,6 +31,7 @@
 #include "xfs_dir2.h"
 #include "xfs_dir2_priv.h"
 #include "xfs_ialloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 
fs/xfs/libxfs/xfs_errortag.h new file +106 -0

106 lines not on this page · raw message

fs/xfs/libxfs/xfs_ialloc.c +1 -0
index e11f8af..de3f04a 100644
@@ -31,6 +31,7 @@
 #include "xfs_ialloc_btree.h"
 #include "xfs_alloc.h"
 #include "xfs_rtalloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_bmap.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_inode_buf.c +1 -0
index 378f8fb..6b79890 100644
@@ -24,6 +24,7 @@
 #include "xfs_mount.h"
 #include "xfs_defer.h"
 #include "xfs_inode.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_cksum.h"
 #include "xfs_icache.h"
fs/xfs/libxfs/xfs_refcount.c +1 -0
index 9d5406b..585b35d 100644
@@ -30,6 +30,7 @@
 #include "xfs_bmap.h"
 #include "xfs_refcount_btree.h"
 #include "xfs_alloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_rmap.c +1 -0
index 55c88a7..dd019ce 100644
@@ -34,6 +34,7 @@
 #include "xfs_rmap_btree.h"
 #include "xfs_trans_space.h"
 #include "xfs_trace.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_extent_busy.h"
 #include "xfs_bmap.h"
fs/xfs/xfs_buf.c +1 -0
index db786bc..4db6e8d 100644
@@ -42,6 +42,7 @@
 #include "xfs_mount.h"
 #include "xfs_trace.h"
 #include "xfs_log.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 
 static kmem_zone_t *xfs_buf_zone;
fs/xfs/xfs_error.c +1 -0
index 6732b0a..92396d5 100644
@@ -21,6 +21,7 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_sysfs.h"
 
fs/xfs/xfs_error.h +0 -83

89 lines not on this page · raw message

fs/xfs/xfs_inode.c +1 -0
index a929ca7..0249782 100644
@@ -39,6 +39,7 @@
 #include "xfs_ialloc.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_util.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_quota.h"
 #include "xfs_filestream.h"
fs/xfs/xfs_iomap.c +1 -0
index f179bdf..da0abc8 100644
@@ -30,6 +30,7 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_util.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trans.h"
 #include "xfs_trans_space.h"
fs/xfs/xfs_log.c +1 -0
index 0c4c9ad..3ce44e6 100644
@@ -22,6 +22,7 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trans.h"
 #include "xfs_trans_priv.h"
fs/xfs/xfs_trans_ail.c +1 -0
index 4b1669f..cef89f7 100644
@@ -25,6 +25,7 @@
 #include "xfs_trans.h"
 #include "xfs_trans_priv.h"
 #include "xfs_trace.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_log.h"
 
#1 lore raw
Quoted 6 lines · Darrick J. Wong

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

Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace.

Simple enough, but there's an admin problem with this patch.

fs/xfs/libxfs/xfs_errortag.h line 4

Quoted 9 lines

new file mode 100644
index 0000000..0cc1c05

fs/xfs/libxfs/xfs_errortag.h new file +4 -0
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2017 Oracle.  All Rights Reserved.
+ *
+ * Author: Darrick J. Wong <[email protected]>

This isn't actually true. You're moving a bunch of code from fs/xfs/xfs_error.h that is under:

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.

Moving code into a new file does not reassign the copyright on the code to a new owner. Hence I think this is the appropriate way to record the copyrights on this new file:

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* Copyright (C) 2017 Oracle.
* All Rights Reserved.

And there's no real need for author tags as we've got that information in the git repo....

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#2 lore raw
Quoted 30 lines · Dave Chinner
Quoted 6 lines · Darrick J. Wong

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

Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace.

Simple enough, but there's an admin problem with this patch.

fs/xfs/libxfs/xfs_errortag.h line 4

Quoted 9 lines

new file mode 100644
index 0000000..0cc1c05

fs/xfs/libxfs/xfs_errortag.h new file +4 -0
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2017 Oracle.  All Rights Reserved.
+ *
+ * Author: Darrick J. Wong <[email protected]>

This isn't actually true. You're moving a bunch of code from fs/xfs/xfs_error.h that is under:

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.

Moving code into a new file does not reassign the copyright on the code to a new owner. Hence I think this is the appropriate way to record the copyrights on this new file:

Quoted 6 lines

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* Copyright (C) 2017 Oracle.
* All Rights Reserved.

And there's no real need for author tags as we've got that information in the git repo....

Works for me. I wasn't really sure whose copyright really applied to changes like this -- the one in the source file? The person who creates the new file? Every last person who ever touched it? etc.

They don't teach this stuff in maintainer school. :/

Will repost w/ revised copyright notice.

--D

Quoted 11 lines

Cheers,

Dave.

Signature · 6 lines
Dave Chinner
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 35 lines · Darrick J. Wong
Quoted 34 lines · Dave Chinner
Quoted 6 lines · Darrick J. Wong

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

Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace.

Simple enough, but there's an admin problem with this patch.

fs/xfs/libxfs/xfs_errortag.h line 4

Quoted 9 lines

new file mode 100644
index 0000000..0cc1c05

fs/xfs/libxfs/xfs_errortag.h new file +4 -0
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2017 Oracle.  All Rights Reserved.
+ *
+ * Author: Darrick J. Wong <[email protected]>

This isn't actually true. You're moving a bunch of code from fs/xfs/xfs_error.h that is under:

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* All Rights Reserved.

Moving code into a new file does not reassign the copyright on the code to a new owner. Hence I think this is the appropriate way to record the copyrights on this new file:

* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
* Copyright (C) 2017 Oracle.
* All Rights Reserved.

Quoted 6 lines
Quoted 2 lines

And there's no real need for author tags as we've got that information in the git repo....

Works for me. I wasn't really sure whose copyright really applied to changes like this -- the one in the source file? The person who creates the new file? Every last person who ever touched it? etc.

It's not clear cut, and IANAL. My basic "try not to get into trouble" rule is that when copying a significant chunk of code from a file with a copyright notice is to preserve that notice with the new copy of the code...

Quoted 1 line

They don't teach this stuff in maintainer school. :/

Nope, that they don't.

I'm careful about this stuff mainly because of the fact that the Linux XFS code has a different history to almost all the other Linux code. And that other code with a similar lineage (i.e. has a SGI/Irix heritage) came under the spotlight in the SCO vs IBM copyright war....

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#4 lore raw

PATCH v2 1/1 xfs: move error injection tags into their own file

In reply to Darrick J. Wong

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

Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace.

---
v2: fix copyright statement

---
 fs/xfs/libxfs/xfs_ag_resv.c   |    1 
 fs/xfs/libxfs/xfs_alloc.c     |    1 
 fs/xfs/libxfs/xfs_bmap.c      |    1 
 fs/xfs/libxfs/xfs_btree.c     |    1 
 fs/xfs/libxfs/xfs_dir2.c      |    1 
 fs/xfs/libxfs/xfs_errortag.h  |  106 +++++++++++++++++++++++++++++++++++++++++
 fs/xfs/libxfs/xfs_ialloc.c    |    1 
 fs/xfs/libxfs/xfs_inode_buf.c |    1 
 fs/xfs/libxfs/xfs_refcount.c  |    1 
 fs/xfs/libxfs/xfs_rmap.c      |    1 
 fs/xfs/xfs_buf.c              |    1 
 fs/xfs/xfs_error.c            |    1 
 fs/xfs/xfs_error.h            |   83 --------------------------------
 fs/xfs/xfs_inode.c            |    1 
 fs/xfs/xfs_iomap.c            |    1 
 fs/xfs/xfs_log.c              |    1 
 fs/xfs/xfs_trans_ail.c        |    1 
 17 files changed, 121 insertions(+), 83 deletions(-)
 create mode 100644 fs/xfs/libxfs/xfs_errortag.h
fs/xfs/libxfs/xfs_ag_resv.c +1 -0
index df3e600..2291f42 100644
@@ -27,6 +27,7 @@
 #include "xfs_mount.h"
 #include "xfs_defer.h"
 #include "xfs_alloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_alloc.c +1 -0
index 11c01e2..0da8001 100644
@@ -31,6 +31,7 @@
 #include "xfs_alloc_btree.h"
 #include "xfs_alloc.h"
 #include "xfs_extent_busy.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_cksum.h"
 #include "xfs_trace.h"
fs/xfs/libxfs/xfs_bmap.c +1 -0
index f45f05c..ebb5958 100644
@@ -38,6 +38,7 @@
 #include "xfs_bmap_util.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_rtalloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_quota.h"
 #include "xfs_trans_space.h"
fs/xfs/libxfs/xfs_btree.c +1 -0
index 848f371..994fc1c 100644
@@ -29,6 +29,7 @@
 #include "xfs_inode_item.h"
 #include "xfs_buf_item.h"
 #include "xfs_btree.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_dir2.c +1 -0
index 41ea6d4..e10778c 100644
@@ -31,6 +31,7 @@
 #include "xfs_dir2.h"
 #include "xfs_dir2_priv.h"
 #include "xfs_ialloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 
fs/xfs/libxfs/xfs_errortag.h new file +106 -0

106 lines not on this page · raw message

fs/xfs/libxfs/xfs_ialloc.c +1 -0
index e11f8af..de3f04a 100644
@@ -31,6 +31,7 @@
 #include "xfs_ialloc_btree.h"
 #include "xfs_alloc.h"
 #include "xfs_rtalloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_bmap.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_inode_buf.c +1 -0
index 378f8fb..6b79890 100644
@@ -24,6 +24,7 @@
 #include "xfs_mount.h"
 #include "xfs_defer.h"
 #include "xfs_inode.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_cksum.h"
 #include "xfs_icache.h"
fs/xfs/libxfs/xfs_refcount.c +1 -0
index 9d5406b..585b35d 100644
@@ -30,6 +30,7 @@
 #include "xfs_bmap.h"
 #include "xfs_refcount_btree.h"
 #include "xfs_alloc.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"
fs/xfs/libxfs/xfs_rmap.c +1 -0
index 55c88a7..dd019ce 100644
@@ -34,6 +34,7 @@
 #include "xfs_rmap_btree.h"
 #include "xfs_trans_space.h"
 #include "xfs_trace.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_extent_busy.h"
 #include "xfs_bmap.h"
fs/xfs/xfs_buf.c +1 -0
index db786bc..4db6e8d 100644
@@ -42,6 +42,7 @@
 #include "xfs_mount.h"
 #include "xfs_trace.h"
 #include "xfs_log.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 
 static kmem_zone_t *xfs_buf_zone;
fs/xfs/xfs_error.c +1 -0
index 6732b0a..92396d5 100644
@@ -21,6 +21,7 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_sysfs.h"
 
fs/xfs/xfs_error.h +0 -83

89 lines not on this page · raw message

fs/xfs/xfs_inode.c +1 -0
index a929ca7..0249782 100644
@@ -39,6 +39,7 @@
 #include "xfs_ialloc.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_util.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_quota.h"
 #include "xfs_filestream.h"
fs/xfs/xfs_iomap.c +1 -0
index f179bdf..da0abc8 100644
@@ -30,6 +30,7 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_util.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trans.h"
 #include "xfs_trans_space.h"
fs/xfs/xfs_log.c +1 -0
index 0c4c9ad..3ce44e6 100644
@@ -22,6 +22,7 @@
 #include "xfs_log_format.h"
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_trans.h"
 #include "xfs_trans_priv.h"
fs/xfs/xfs_trans_ail.c +1 -0
index 4b1669f..cef89f7 100644
@@ -25,6 +25,7 @@
 #include "xfs_trans.h"
 #include "xfs_trans_priv.h"
 #include "xfs_trace.h"
+#include "xfs_errortag.h"
 #include "xfs_error.h"
 #include "xfs_log.h"