dm review needed, was: Re: [PATCH v3 2/3] blk-cgroup: store blkcg in bio instead of blkg
From: Christoph Hellwig
Date: Fri Sep 18 2026 - 03:18:45 EST
On Fri, Sep 18, 2026 at 12:17:43PM +0800, Yu Kuai wrote:
> static inline void dm_bio_record(struct dm_bio_details *bd, struct bio *bio)
> {
> bd->bi_bdev = bio->bi_bdev;
> - bd->bi_flags = bio->bi_flags;
> + /*
> + * Restoring BIO_BLKG_REF would not recreate its associated reference.
> + */
> + bd->bi_flags = bio->bi_flags & ~(1U << BIO_BLKG_REF);
But do we need to restore the reference? I have to admit that
this surrounding code is very confusing and I would really like
to have the dm maintainers look over it.