All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH lttng-modules 2/3] Fix: signal: Remove SEND_SIG_FORCED (v4.20)
       [not found] <20181105163554.32095-1-mjeanson@efficios.com>
@ 2018-11-05 16:35 ` Michael Jeanson
  2018-11-05 16:35 ` [PATCH lttng-modules 3/3] Fix: ext4: adjust reserved cluster count when removing extents (v4.20) Michael Jeanson
  1 sibling, 0 replies; 2+ messages in thread
From: Michael Jeanson @ 2018-11-05 16:35 UTC (permalink / raw)
  To: lttng-dev

See upstream commit :

  commit 4ff4c31a6e85f4c49fbeebeaa28018d002884b5a
  Author: Eric W. Biederman <ebiederm@xmission.com>
  Date:   Mon Sep 3 10:39:04 2018 +0200

    signal: Remove SEND_SIG_FORCED

    There are no more users of SEND_SIG_FORCED so it may be safely removed.

    Remove the definition of SEND_SIG_FORCED, it's use in is_si_special,
    it's use in TP_STORE_SIGINFO, and it's use in __send_signal as without
    any users the uses of SEND_SIG_FORCED are now unncessary.

    This makes the code simpler, easier to understand and use.  Users of
    signal sending functions now no longer need to ask themselves do I
    need to use SEND_SIG_FORCED.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
 instrumentation/events/lttng-module/signal.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/instrumentation/events/lttng-module/signal.h b/instrumentation/events/lttng-module/signal.h
index 6c484ba..7e9631d 100644
--- a/instrumentation/events/lttng-module/signal.h
+++ b/instrumentation/events/lttng-module/signal.h
@@ -13,6 +13,17 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #undef LTTNG_FIELDS_SIGINFO
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+#define LTTNG_FIELDS_SIGINFO(info)				\
+		ctf_integer(int, errno,				\
+			(info == SEND_SIG_NOINFO || info == SEND_SIG_PRIV) ? \
+			0 :					\
+			info->si_errno)				\
+		ctf_integer(int, code,				\
+			(info == SEND_SIG_NOINFO) ? 		\
+			SI_USER : 				\
+			((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #define LTTNG_FIELDS_SIGINFO(info)				\
 		ctf_integer(int, errno,				\
 			(info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \
@@ -22,6 +33,7 @@
 			(info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \
 			SI_USER : 				\
 			((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #endif /* _TRACE_SIGNAL_DEF */
 
 /**
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH lttng-modules 3/3] Fix: ext4: adjust reserved cluster count when removing extents (v4.20)
       [not found] <20181105163554.32095-1-mjeanson@efficios.com>
  2018-11-05 16:35 ` [PATCH lttng-modules 2/3] Fix: signal: Remove SEND_SIG_FORCED (v4.20) Michael Jeanson
@ 2018-11-05 16:35 ` Michael Jeanson
  1 sibling, 0 replies; 2+ messages in thread
From: Michael Jeanson @ 2018-11-05 16:35 UTC (permalink / raw)
  To: lttng-dev

See upstream commit :

  commit 9fe671496b6c286f9033aedfc1718d67721da0ae
  Author: Eric Whitney <enwlinux@gmail.com>
  Date:   Mon Oct 1 14:25:08 2018 -0400

    ext4: adjust reserved cluster count when removing extents

    Modify ext4_ext_remove_space() and the code it calls to correct the
    reserved cluster count for pending reservations (delayed allocated
    clusters shared with allocated blocks) when a block range is removed
    from the extent tree.  Pending reservations may be found for the clusters
    at the ends of written or unwritten extents when a block range is removed.
    If a physical cluster at the end of an extent is freed, it's necessary
    to increment the reserved cluster count to maintain correct accounting
    if the corresponding logical cluster is shared with at least one
    delayed and unwritten extent as found in the extents status tree.

    Add a new function, ext4_rereserve_cluster(), to reapply a reservation
    on a delayed allocated cluster sharing blocks with a freed allocated
    cluster.  To avoid ENOSPC on reservation, a flag is applied to
    ext4_free_blocks() to briefly defer updating the freeclusters counter
    when an allocated cluster is freed.  This prevents another thread
    from allocating the freed block before the reservation can be reapplied.

    Redefine the partial cluster object as a struct to carry more state
    information and to clarify the code using it.

    Adjust the conditional code structure in ext4_ext_remove_space to
    reduce the indentation level in the main body of the code to improve
    readability.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
 instrumentation/events/lttng-module/ext4.h | 72 +++++++++++++++++++++-
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
index 740f288..307021a 100644
--- a/instrumentation/events/lttng-module/ext4.h
+++ b/instrumentation/events/lttng-module/ext4.h
@@ -1603,7 +1603,30 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent,
 	)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+
+LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
+	TP_PROTO(struct inode *inode, struct ext4_extent *ex,
+		 ext4_lblk_t from, ext4_fsblk_t to,
+		 struct partial_cluster *pc),
+
+	TP_ARGS(inode, ex, from, to, pc),
+
+	TP_FIELDS(
+		ctf_integer(dev_t, dev, inode->i_sb->s_dev)
+		ctf_integer(ino_t, ino, inode->i_ino)
+		ctf_integer(ext4_lblk_t, from, from)
+		ctf_integer(ext4_lblk_t, to, to)
+		ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
+		ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
+		ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
+		ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
+		ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
+		ctf_integer(int, pc_state, pc->state)
+	)
+)
+
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
 	    TP_PROTO(struct inode *inode, struct ext4_extent *ex,
@@ -1647,7 +1670,29 @@ LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+
+LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
+	TP_PROTO(struct inode *inode, ext4_lblk_t start,
+		 struct ext4_extent *ex,
+		 struct partial_cluster *pc),
+
+	TP_ARGS(inode, start, ex, pc),
+
+	TP_FIELDS(
+		ctf_integer(dev_t, dev, inode->i_sb->s_dev)
+		ctf_integer(ino_t, ino, inode->i_ino)
+		ctf_integer(ext4_lblk_t, start, start)
+		ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
+		ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
+		ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
+		ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
+		ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
+		ctf_integer(int, pc_state, pc->state)
+	)
+)
+
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
 	TP_PROTO(struct inode *inode, ext4_lblk_t start,
@@ -1734,7 +1779,28 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+
+LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
+	TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
+		 int depth, struct partial_cluster *pc, __le16 eh_entries),
+
+	TP_ARGS(inode, start, end, depth, pc, eh_entries),
+
+	TP_FIELDS(
+		ctf_integer(dev_t, dev, inode->i_sb->s_dev)
+		ctf_integer(ino_t, ino, inode->i_ino)
+		ctf_integer(ext4_lblk_t, start, start)
+		ctf_integer(ext4_lblk_t, end, end)
+		ctf_integer(int, depth, depth)
+		ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries))
+		ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
+		ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
+		ctf_integer(int, pc_state, pc->state)
+	)
+)
+
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
 	TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-05 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181105163554.32095-1-mjeanson@efficios.com>
2018-11-05 16:35 ` [PATCH lttng-modules 2/3] Fix: signal: Remove SEND_SIG_FORCED (v4.20) Michael Jeanson
2018-11-05 16:35 ` [PATCH lttng-modules 3/3] Fix: ext4: adjust reserved cluster count when removing extents (v4.20) Michael Jeanson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.