Skip to content

Commit fe681cb

Browse files
authored
DLPX-79246 - [Backport of DLPX-78891 to 6.0.13.0] stbtrace zpl fails due to uid_t (#78)
1 parent ded9672 commit fe681cb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bpf/stbtrace/zpl.st

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ bpf_text += """
2828
#include <linux/bpf_common.h>
2929
#include <uapi/linux/bpf.h>
3030

31-
#include <sys/uio.h>
31+
#include <sys/xvattr.h>
32+
#include <sys/zfs_znode.h>
3233

3334
// Definitions for this script
3435
#define READ_STR "read"
@@ -67,9 +68,9 @@ BPF_HASH($hist.name$, zpl_hist_key_t, u64);
6768
}$
6869

6970
// Probe functions to initialize thread local data
70-
int zfs_read_start(struct pt_regs *ctx, void *inode, uio_t *uio)
71+
int zfs_read_start(struct pt_regs *ctx, struct znode *zn, zfs_uio_t *uio,
72+
int flags)
7173
{
72-
7374
u32 pid = bpf_get_current_pid_tgid();
7475
zpl_data_t data = {};
7576
data.ts = bpf_ktime_get_ns();
@@ -81,9 +82,9 @@ int zfs_read_start(struct pt_regs *ctx, void *inode, uio_t *uio)
8182
}
8283

8384
// Probe functions to initialize thread local data
84-
int zfs_write_start(struct pt_regs *ctx, void *inode, uio_t *uio)
85+
int zfs_write_start(struct pt_regs *ctx, struct znode *zn, zfs_uio_t *uio,
86+
int flags)
8587
{
86-
8788
u32 pid = bpf_get_current_pid_tgid();
8889
zpl_data_t data = {};
8990
data.ts = bpf_ktime_get_ns();

0 commit comments

Comments
 (0)