Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@kernel.org>
To: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Cc: smfrench@gmail.com, linkinjeon@kernel.org, pc@manguebit.org,
	 ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
	bharathsm@microsoft.com,  senozhatsky@chromium.org,
	dhowells@redhat.com, metze@samba.org, linux-cifs@vger.kernel.org,
	 ChenXiaoSong <chenxiaosong@kylinos.cn>
Subject: Re: [PATCH v2 xfstests 0/3] add generic/795
Date: Tue, 21 Jul 2026 16:25:51 +0800	[thread overview]
Message-ID: <al8nX7MnPDzmUA5W@zlang-mailbox> (raw)
In-Reply-To: <20260720163502.732454-1-chenxiaosong@chenxiaosong.com>

On Mon, Jul 20, 2026 at 04:34:59PM +0000, ChenXiaoSong wrote:
> From: ChenXiaoSong <chenxiaosong@kylinos.cn>
> 
> v1->v2:
>   - Add patch#01 patch#02.
>   - Patch#03: some cleanups.
> 
> v1: https://lore.kernel.org/linux-cifs/20260713151658.533155-1-chenxiaosong@chenxiaosong.com/
> 
> ChenXiaoSong (3):
>   src: factor out common stat code
>   generic/002: clean up the test
>   generic/795: check nlink returned by fstat()
> 
>  src/Makefile          |  13 ++-
>  src/fstat.c           |  42 ++++++++++
>  src/lstat64.c         | 166 +------------------------------------
>  src/stat_common.c     | 185 ++++++++++++++++++++++++++++++++++++++++++
>  src/stat_common.h     |  16 ++++
>  tests/generic/002     |  16 ++--
>  tests/generic/002.out |   2 +-

Hi,

I might not have explained clearly during the review. I wasn't asking you to
rewrite g/002 and lstat64.c. I was suggesting checking whether src/fstat.c in
your previous patch could be replaced by the stat command in xfs_io [1]. Check
`man xfs_io` for the "stat" command to see if it can fulfill your test
requirement.

Due to I noticed you need information like st_nlink from struct stat, so
`xfs_io -c "stat -r" ...` should meet your requirements. Please
give it a try, if it works, it will make the whole patch much cleaner.

P.S. For a new test case, please don't use a specific case number (like
generic/795) in the subject or commit log, as it might get assigned a
different number when merged. You can just use something like:
"[PATCH] generic: new test to ..."

Thanks,
Zorro

[1]
  https://lore.kernel.org/fstests/a8771f15-7cb6-44a1-a592-8055818f57f1@chenxiaosong.com/T/#mff79f3e74e8cefbdda71e6a22f6a20f2dd985661
  "I'm wondering if a specific src/fstat.c is needed. Can we replace the whole
  src/fstat.c with `xfs_io -c stat ` ? Can you give it a try?"

>  tests/generic/795     |  60 ++++++++++++++
>  tests/generic/795.out |   2 +
>  9 files changed, 324 insertions(+), 178 deletions(-)
>  create mode 100644 src/fstat.c
>  create mode 100644 src/stat_common.c
>  create mode 100644 src/stat_common.h
>  create mode 100755 tests/generic/795
>  create mode 100644 tests/generic/795.out
> 
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2026-07-21  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 16:34 [PATCH v2 xfstests 0/3] add generic/795 ChenXiaoSong
2026-07-20 16:35 ` [PATCH v2 xfstests 1/3] src: factor out common stat code ChenXiaoSong
2026-07-20 16:35 ` [PATCH v2 xfstests 2/3] generic/002: clean up the test ChenXiaoSong
2026-07-20 16:35 ` [PATCH v2 xfstests 3/3] generic/795: check nlink returned by fstat() ChenXiaoSong
2026-07-21  8:25 ` Zorro Lang [this message]
2026-07-21  8:31   ` [PATCH v2 xfstests 0/3] add generic/795 ChenXiaoSong
2026-07-21 21:21     ` Zorro Lang
2026-07-22  2:50       ` ChenXiaoSong

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=al8nX7MnPDzmUA5W@zlang-mailbox \
    --to=zlang@kernel.org \
    --cc=bharathsm@microsoft.com \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=chenxiaosong@kylinos.cn \
    --cc=dhowells@redhat.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=pc@manguebit.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox