public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs_db: use push_cur_and_set_type more
Date: Wed, 12 Nov 2025 10:59:39 -0800	[thread overview]
Message-ID: <20251112185939.GC196370@frogsfrogsfrogs> (raw)
In-Reply-To: <20251112151932.12141-3-amonakov@ispras.ru>

On Wed, Nov 12, 2025 at 06:19:32PM +0300, Alexander Monakov wrote:
> Since push_cur unsets cur_typ, 'ls' and 'rdump' with paths relative to
> current address do not work with a mysterious diagnostic (claiming that
> the supplied name is not a directory). Use push_cur_and_set_type
> instead.

IOWs, you're trying to fix this, correct?

# xfs_db /dev/sdf
xfs_db> ls /
/:
8          128                directory      0x0000002e   1 . (good)
10         128                directory      0x0000172e   2 .. (good)
314        50337826           directory      0x0a152956   5 PPTRS (good)
xfs_db> ls ./PPTRS
./PPTRS: Not a directory

If so, then
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D


> Signed-off-by: Alexander Monakov <amonakov@ispras.ru>
> ---
>  db/namei.c | 2 +-
>  db/rdump.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/db/namei.c b/db/namei.c
> index 1d9581c3..4149503c 100644
> --- a/db/namei.c
> +++ b/db/namei.c
> @@ -629,7 +629,7 @@ ls_f(
>  	}
>  
>  	for (c = optind; c < argc; c++) {
> -		push_cur();
> +		push_cur_and_set_type();
>  
>  		error = path_walk(rootino, argv[c]);
>  		if (error)
> diff --git a/db/rdump.c b/db/rdump.c
> index 73295dbe..146f829b 100644
> --- a/db/rdump.c
> +++ b/db/rdump.c
> @@ -980,7 +980,7 @@ rdump_f(
>  			len--;
>  		argv[i][len] = 0;
>  
> -		push_cur();
> +		push_cur_and_set_type();
>  		ret = rdump_path(mp, argv[i], &destdir);
>  		pop_cur();
>  
> -- 
> 2.51.0
> 
> 

  reply	other threads:[~2025-11-12 18:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 15:19 [PATCH 0/2] xfs_db rdump: papercut fixes Alexander Monakov
2025-11-12 15:19 ` [PATCH 1/2] xfs_db rdump: remove sole_path logic Alexander Monakov
2025-11-12 18:53   ` Darrick J. Wong
2025-11-12 19:45     ` Alexander Monakov
2025-11-20 23:46       ` Darrick J. Wong
2025-11-12 15:19 ` [PATCH 2/2] xfs_db: use push_cur_and_set_type more Alexander Monakov
2025-11-12 18:59   ` Darrick J. Wong [this message]
2025-11-12 19:18     ` Alexander Monakov

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=20251112185939.GC196370@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=amonakov@ispras.ru \
    --cc=linux-xfs@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox