All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com,
	kris.van.hees@oracle.com
Subject: Re: [PATCH v3] translators: support 6.10
Date: Thu, 20 Jun 2024 13:55:14 -0400	[thread overview]
Message-ID: <ZnRtAmWKoPKcpVtY@oracle.com> (raw)
In-Reply-To: <20240619132109.5566-1-nick.alcock@oracle.com>

On Wed, Jun 19, 2024 at 02:21:09PM +0100, Nick Alcock wrote:
> This changed the block device into a component of an atomic
> flags word (so we need to change the .d.in as well to pull in
> the relevant #define for the blockdev portion of that flags word).
> 
> See kernel commit 1116b9fa15c09748ae05d2365a305fa22671eb1e.
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
>  libdtrace/io.d.in | 6 +++---
>  libdtrace/io.m4   | 8 ++++++--
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/libdtrace/io.d.in b/libdtrace/io.d.in
> index b3da517778264..f44f53f092dce 100644
> --- a/libdtrace/io.d.in
> +++ b/libdtrace/io.d.in
> @@ -1,6 +1,6 @@
>  /*
>   * Oracle Linux DTrace.
> - * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
>   * Licensed under the Universal Permissive License v 1.0 as shown at
>   * http://oss.oracle.com/licenses/upl.
>   */
> @@ -69,7 +69,7 @@ inline int REQ_SYNC = REQ_SYNC_VAL;
>  define_for_kernel([[__bi_rw]], [[(m4_kver(4,8,0), [[bi_opf]])]], [[bi_rw]])
>  define_for_kernel([[__disk]], [[(m4_kver(5,12,0), [[bi_bdev->bd_disk]]), (m4_kver(4,14,0), [[bi_disk]])]], [[bi_bdev->bd_disk]])
>  define_for_kernel([[__disk_chk]], [[(m4_kver(5,12,0), [[bi_bdev]]), (m4_kver(4,14,0), [[bi_disk]])]], [[bi_bdev]])
> -define_for_kernel([[__bio_partno]], [[(m4_kver(5,12,0), [[bi_bdev->bd_partno]]), (m4_kver(4,14,0), [[bi_partno]])]], [[bi_bdev->bd_part->partno]])
> +define_for_kernel([[__bio_partno]], [[(m4_kver(6,10,0), [[bi_bdev->__bd_flags.counter & BD_PARTNO]]), (m4_kver(5,12,0), [[bi_bdev->bd_partno]]), (m4_kver(4,14,0), [[bi_partno]])]], [[bi_bdev->bd_part->partno]])
>  define_for_kernel([[__bio_part_dev]], [[(m4_kver(5,12,0), [[bi_bdev->bd_dev]]), (m4_kver(5,11,0), [[bi_disk->part_tbl->part[B->bi_partno]->bd_dev]]), (m4_kver(4,14,0), [[bi_disk->part_tbl->part[B->bi_partno]->__dev.devt]])]], [[bi_bdev->bd_part->__dev.devt]])
>  
>  #pragma D binding "1.6.3" translator
> @@ -98,7 +98,7 @@ typedef struct devinfo {
>  } devinfo_t;
>  
>  define_for_kernel([[__bh_bdev_dev]], [[(m4_kver(5,11,0), [[b_bdev->bd_disk->part0->bd_device]])]], [[b_bdev->bd_disk->part0.__dev]])
> -define_for_kernel([[__bdev_partno]], [[(m4_kver(5,11,0), [[bd_partno]])]], [[bd_part->partno]])
> +define_for_kernel([[__bdev_partno]], [[(m4_kver(6,10,0), [[__bd_flags.counter & BD_PARTNO]]), (m4_kver(5,11,0), [[bd_partno]])]], [[bd_part->partno]])
>  #pragma D binding "1.0" translator
>  translator devinfo_t < struct buffer_head *B > {
>  	dev_major = getmajor(B->b_bdev->bd_dev);
> diff --git a/libdtrace/io.m4 b/libdtrace/io.m4
> index e837ef65b86f7..d57225c911059 100644
> --- a/libdtrace/io.m4
> +++ b/libdtrace/io.m4
> @@ -1,6 +1,6 @@
>  /*
>   * Oracle Linux DTrace.
> - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
>   * Licensed under the Universal Permissive License v 1.0 as shown at
>   * http://oss.oracle.com/licenses/upl.
>   */
> @@ -11,7 +11,8 @@
>   * to replace those tokens with their values to create the finished io.d.
>   */
>  
> -/* #include <linux/buffer_head.h> */
> +#include <linux/kconfig.h>
> +#include <linux/buffer_head.h>
>  #include <sys/file.h>
>  #if 0
>  #ifndef __USE_UNIX98
> @@ -43,4 +44,7 @@ DEF_REPLACE(O_NOFOLLOW)
>  DEF_REPLACE(O_CLOEXEC)
>  DEF_REPLACE(O_DSYNC)
>  DEF_REPLACE(O_RSYNC)
> +#ifdef BD_PARTNO
> +DEF_REPLACE(BD_PARTNO)
> +#endif
>  #include "io.platform.m4"
> 
> base-commit: 454c6d47bf408415f7eb52ea701779f041aa6957
> -- 
> 2.45.1.275.g567cb0950c

      reply	other threads:[~2024-06-20 17:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 18:41 [PATCH v2 1/2] translators: support 6.10 Nick Alcock
2024-06-07 18:41 ` [PATCH v2 2/2] dlibs: pregenerated translators for 6.10 Nick Alcock
2024-06-13 12:22   ` [DTrace-devel] " Alan Maguire
2024-06-14 12:25     ` Alan Maguire
2024-06-19 13:23       ` Nick Alcock
2024-06-19  3:32 ` [PATCH v2 1/2] translators: support 6.10 Kris Van Hees
2024-06-19 12:41   ` Nick Alcock
2024-06-19 13:15   ` Nick Alcock
2024-06-20 17:54     ` Kris Van Hees
2024-06-19 13:21 ` [PATCH v3] " Nick Alcock
2024-06-20 17:55   ` Kris Van Hees [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZnRtAmWKoPKcpVtY@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=nick.alcock@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.