applied: 
https://github.com/crash-utility/crash/commit/4740b8891abf17ff2e957f85b8fa157b1fe0608f

On Tue, Dec 23, 2025 at 2:45 PM Lianbo Jiang <[email protected]> wrote:
>
> Hi, Tao
>
> Thank you for the update. For v2: Ack
>
>
> Lianbo
>
> On 12/15/25 5:59 AM, [email protected] wrote:
> > Date: Mon, 15 Dec 2025 10:49:30 +1300
> > From: Tao Liu<[email protected]>
> > Subject: [Crash-utility] [PATCH v2] Resolve BLK_MQ_F_TAG_HCTX_SHARED
> >       at runtime
> > To:[email protected]
> > Cc: Tao Liu<[email protected]>
> > Message-ID:<[email protected]>
> > Content-Type: text/plain; charset="US-ASCII"; x-default=true
> >
> > Though upstream kernel have defined BLK_MQ_F_TAG_HCTX_SHARED
> > as (1 << 3), the value might be set different, e.g. [1]. In
> > this patch, we will use enumerator_value() to get its value
> > at runtime, to make the code more adaptable.
> >
> > [1]:https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-8/-/blob/c8s/include/linux/blk-mq.h?ref_type=heads#L321
> >
> > Signed-off-by: Tao Liu<[email protected]>
> > ---
> >   dev.c | 5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/dev.c b/dev.c
> > index 27318e8..1332b0e 100644
> > --- a/dev.c
> > +++ b/dev.c
> > @@ -4326,11 +4326,11 @@ struct bt_iter_data {
> >   #define MQ_RQ_IN_FLIGHT 1
> >   #define REQ_OP_BITS     8
> >   #define REQ_OP_MASK     ((1 << REQ_OP_BITS) - 1)
> > -#define BLK_MQ_F_TAG_HCTX_SHARED (1 << 3)
> > +static long blk_hctx_shared = 0;
> >
> >   static bool blk_mq_is_shared_tags(unsigned int flags)
> >   {
> > -     return flags & BLK_MQ_F_TAG_HCTX_SHARED;
> > +     return flags & blk_hctx_shared;
> >   }
> >
> >   static uint op_is_write(uint op)
> > @@ -4952,6 +4952,7 @@ void diskio_init(void)
> >       MEMBER_OFFSET_INIT(request_queue_tag_set, "request_queue", "tag_set");
> >       MEMBER_OFFSET_INIT(blk_mq_tag_set_flags, "blk_mq_tag_set", "flags");
> >       MEMBER_OFFSET_INIT(blk_mq_tag_set_shared_tags, "blk_mq_tag_set", 
> > "shared_tags");
> > +     enumerator_value("BLK_MQ_F_TAG_HCTX_SHARED", &blk_hctx_shared);
> >
> >       dt->flags |= DISKIO_INIT;
> >   }
> > -- 2.47.0
>
--
Crash-utility mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to