Skip to content

xfs: horrifying eBPF hacks

Darrick J. Wong linux-xfs 1 version In review

Get series with b4
b4 am 20171213061825.GO19219@magnolia

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: eBPF user hacks insanityfs/xfs/Kconfig fs/xfs/Makefile fs/xfs/xfs_bmap_util.c +4 more+213 -00 replies
2/2tools/xfs: use XFS hacks to override data block device placementsrc/cc/compat/linux/bpf.h src/cc/compat/linux/virtual_bpf.h src/cc/export/helpers.h +1 more+140 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [ZOMG RFCRAP PATCH 0/2] xfs: horrifying eBPF hacks

Heh.

So here's a kernel patch that builds on Josef's eBPF return value override patch series to provide an eBPF-kprobe-overridable hook function so that administrators can program XFS to redirect a file to the rt device or the data device depending on their own funny constraints any time that the system is doing the first write into an empty file.

The second patch is against Brendan Gregg's bcc repository; it adds a python script to compile and inject a sample eBPF program that behaves (roughly) the same as Richard's earlier patches.

Soooo... rather than dumping a bunch of static code into XFS to support his particular usecase, we're building him an eBPF Bazooka and telling him to have fun. :P

(More generally, it's a science fair project for letting people customize XFS behavior with eBPF in a controlled manner.)

--D