Re: [PATCH v2 1/2] block: add BPF kfuncs to read blkcg io.stat

Ziyang Men <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.bpf,org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
Hi Tejun,

On Tue, Aug 18, 2026 at 07:21:37AM -1000, Tejun Heo wrote:
>Hello,
>
>On Mon, Aug 17, 2026 at 02:42:04PM -0700, Ziyang Men wrote:
>> +/**
>> + * bpf_blkcg_flush_stats - Flush a block cgroup's io statistics
>> + * @cgrp: cgroup to flush
>> + *
>> + * Propagate I/O statistics up the cgroup tree. Root statistics come from
>> + * block devices and include all cgroups' I/O.
>> + */
>> +__bpf_kfunc void bpf_blkcg_flush_stats(struct cgroup *cgrp)
>
>Either @css or @blkcg, probably the latter so that each operation doesn't
>have to verify subsys again. I'd make this and the cpu ppatches into a
>single series. Add blkcg cast there too.

Ok I will add the casts bpf_get_blkcg() and bpf_put_blkcg(), and remove the
check of css->ss in above functoins.

Next submission of this series will be together with the cpu one.

>
>Thanks.
>
>-- 
>tejun

Thanks for your review!

Best,
Ziyang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.