Skip to content

DLPX-79246 - [Backport of DLPX-78891 to 6.0.13.0] stbtrace zpl fails … #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions bpf/stbtrace/zpl.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ bpf_text += """
#include <linux/bpf_common.h>
#include <uapi/linux/bpf.h>

#include <sys/uio.h>
#include <sys/xvattr.h>
#include <sys/zfs_znode.h>

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

// Probe functions to initialize thread local data
int zfs_read_start(struct pt_regs *ctx, void *inode, uio_t *uio)
int zfs_read_start(struct pt_regs *ctx, struct znode *zn, zfs_uio_t *uio,
int flags)
{

u32 pid = bpf_get_current_pid_tgid();
zpl_data_t data = {};
data.ts = bpf_ktime_get_ns();
Expand All @@ -81,9 +82,9 @@ int zfs_read_start(struct pt_regs *ctx, void *inode, uio_t *uio)
}

// Probe functions to initialize thread local data
int zfs_write_start(struct pt_regs *ctx, void *inode, uio_t *uio)
int zfs_write_start(struct pt_regs *ctx, struct znode *zn, zfs_uio_t *uio,
int flags)
{

u32 pid = bpf_get_current_pid_tgid();
zpl_data_t data = {};
data.ts = bpf_ktime_get_ns();
Expand Down