All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: zlang@kernel.org
Cc: fstests@vger.kernel.org, Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] common/rc: fix _xfs_is_realtime_file for internal rt devices
Date: Thu, 20 Nov 2025 15:24:26 -0800	[thread overview]
Message-ID: <20251120232426.GL196366@frogsfrogsfrogs> (raw)
In-Reply-To: <20251120231536.GK196366@frogsfrogsfrogs>

On Thu, Nov 20, 2025 at 03:15:36PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Now that we can have internal realtime devices, it's possible to have a
> realtime filesystem without setting USE_EXTERNAL=yes or SCRATCH_RTDEV.
> Use the existing _xfs_has_feature helper to figure out if the given path
> points to a filesystem with an online realtime volume.

Oops, silly me must have hit reply-all by mistake.

--D

> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
>  common/xfs |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/common/xfs b/common/xfs
> index ffdb82e6c970ba..8b1b87413659ad 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -253,9 +253,9 @@ _xfs_get_dir_blocksize()
>  # Decide if this path is a file on the realtime device
>  _xfs_is_realtime_file()
>  {
> -	if [ "$USE_EXTERNAL" != "yes" ] || [ -z "$SCRATCH_RTDEV" ]; then
> -		return 1
> -	fi
> +	local mntpt="$(findmnt --target "$1" --noheadings --output TARGET)"
> +
> +	_xfs_has_feature $mntpt realtime || return 1
>  	$XFS_IO_PROG -c 'stat -v' "$1" | grep -q -w realtime
>  }
>  
> 

  reply	other threads:[~2025-11-20 23:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 16:08 [PATCH 0/2] xfs: add regression test for small zone capacity cem
2025-11-20 16:08 ` [PATCH 1/2] common/zoned: enable passing a custom capacity cem
2025-11-21  6:46   ` Johannes Thumshirn
2025-11-21  6:50   ` Christoph Hellwig
2025-11-22  7:41   ` Zorro Lang
2025-11-20 16:08 ` [PATCH 2/2] xfs: Add test for mkfs with smaller zone capacity cem
2025-11-21  6:51   ` Christoph Hellwig
2025-11-21  6:51   ` Johannes Thumshirn
2025-11-21  6:57     ` hch
2025-11-21  7:00       ` Johannes Thumshirn
2025-11-21  8:34         ` Hans Holmberg
2025-11-24 15:27     ` Carlos Maiolino
2025-11-24 17:31       ` Johannes Thumshirn
2025-11-24 17:34         ` hch
2025-11-25 13:01         ` Carlos Maiolino
2025-11-22  8:36   ` Zorro Lang
2025-11-24 16:04     ` Carlos Maiolino
2025-11-20 23:15 ` [PATCH] common/rc: fix _xfs_is_realtime_file for internal rt devices Darrick J. Wong
2025-11-20 23:24   ` Darrick J. Wong [this message]
2025-11-21  6:47   ` Christoph Hellwig
2025-11-21 16:20     ` Darrick J. Wong

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=20251120232426.GL196366@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=zlang@kernel.org \
    /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.