From: "Darrick J. Wong" <djwong@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: Catherine Hoang <catherine.hoang@oracle.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v2] xfs_io: add support for atomic write statx fields
Date: Tue, 19 Nov 2024 08:08:55 -0800 [thread overview]
Message-ID: <20241119160855.GV9438@frogsfrogsfrogs> (raw)
In-Reply-To: <6657d426-d227-4679-b4ca-db64d39140fb@oracle.com>
On Tue, Nov 19, 2024 at 02:10:59PM +0000, John Garry wrote:
> On 18/11/2024 23:52, Catherine Hoang wrote:
> > #include "init.h"
> > @@ -347,6 +351,9 @@ dump_raw_statx(struct statx *stx)
> > printf("stat.rdev_minor = %u\n", stx->stx_rdev_minor);
> > printf("stat.dev_major = %u\n", stx->stx_dev_major);
> > printf("stat.dev_minor = %u\n", stx->stx_dev_minor);
> > + printf("stat.atomic_write_unit_min = %lld\n", (long long)stx->stx_atomic_write_unit_min);
> > + printf("stat.atomic_write_unit_max = %lld\n", (long long)stx->stx_atomic_write_unit_max);
> > + printf("stat.atomic_write_segments_max = %lld\n", (long long)stx->stx_atomic_write_segments_max);
>
> Is there a special reason to do this casting to long long? We only do that
> for u64 values, I think.
Yeah, I don't think it's necessary here because the stx_atomic values
are __u32. xfsprogs has a tendency to cast to explicit C types to avoid
lint warnings, particularly because 64-bit values are grossly typedef'd
depending on how long long is.
Now that I see it -- those should be %u and casts to unsigned int.
--D
> Thanks,
> John
>
prev parent reply other threads:[~2024-11-19 16:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 23:52 [PATCH v2] xfs_io: add support for atomic write statx fields Catherine Hoang
2024-11-19 0:01 ` Darrick J. Wong
2024-11-19 2:30 ` Catherine Hoang
2024-11-19 16:05 ` Darrick J. Wong
2024-11-19 14:10 ` John Garry
2024-11-19 16:08 ` Darrick J. Wong [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=20241119160855.GV9438@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=catherine.hoang@oracle.com \
--cc=john.g.garry@oracle.com \
--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 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.