bcachefs: Add a tracepoint for superblock writes
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
c6b6d41612
commit
4254f5bf6e
@ -16,6 +16,7 @@
|
|||||||
#include "quota.h"
|
#include "quota.h"
|
||||||
#include "super-io.h"
|
#include "super-io.h"
|
||||||
#include "super.h"
|
#include "super.h"
|
||||||
|
#include "trace.h"
|
||||||
#include "vstructs.h"
|
#include "vstructs.h"
|
||||||
|
|
||||||
#include <linux/backing-dev.h>
|
#include <linux/backing-dev.h>
|
||||||
@ -799,6 +800,8 @@ int bch2_write_super(struct bch_fs *c)
|
|||||||
unsigned degraded_flags = BCH_FORCE_IF_DEGRADED;
|
unsigned degraded_flags = BCH_FORCE_IF_DEGRADED;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
trace_write_super(c, _RET_IP_);
|
||||||
|
|
||||||
if (c->opts.very_degraded)
|
if (c->opts.very_degraded)
|
||||||
degraded_flags |= BCH_FORCE_IF_LOST;
|
degraded_flags |= BCH_FORCE_IF_LOST;
|
||||||
|
|
||||||
|
@ -82,6 +82,26 @@ DECLARE_EVENT_CLASS(bio,
|
|||||||
(unsigned long long)__entry->sector, __entry->nr_sector)
|
(unsigned long long)__entry->sector, __entry->nr_sector)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* super-io.c: */
|
||||||
|
TRACE_EVENT(write_super,
|
||||||
|
TP_PROTO(struct bch_fs *c, unsigned long ip),
|
||||||
|
TP_ARGS(c, ip),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(dev_t, dev )
|
||||||
|
__field(unsigned long, ip )
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->dev = c->dev;
|
||||||
|
__entry->ip = ip;
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("%d,%d for %pS",
|
||||||
|
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||||
|
(void *) __entry->ip)
|
||||||
|
);
|
||||||
|
|
||||||
/* io.c: */
|
/* io.c: */
|
||||||
|
|
||||||
DEFINE_EVENT(bio, read_split,
|
DEFINE_EVENT(bio, read_split,
|
||||||
|
Loading…
Reference in New Issue
Block a user