linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Andreas Dilger <adilger@dilger.ca>,
	Christoph Hellwig <hch@infradead.org>,
	fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 2/2 V2] xfs_io: hook up statx
Date: Mon, 27 Mar 2017 13:58:46 -0700	[thread overview]
Message-ID: <20170327205846.GA6502@gmail.com> (raw)
In-Reply-To: <3791d155-b448-5257-d8b9-8a6f20e12180@sandeen.net>

Hi Eric,

On Thu, Mar 23, 2017 at 11:45:45PM -0500, Eric Sandeen wrote:
> Wire up the statx syscall to xfs_io.
> 

I haven't reviewed these patches in detail, but just a few nits:

Given that the command operates on an open file, wouldn't it make more sense to
call statx() with the file descriptor and a NULL path?  It wouldn't be ideal for
test coverage, but it seems xfs_io isn't currently designed to work otherwise.
And note that the 'stat' xfs_io command already calls fstat(), not stat().

(In particular think about what should happen if you open a file through a
symlink, then execute both the 'stat' and 'statx' commands... with the current
proposal 'stat' would operate on the file, while 'statx' would operate on the
symlink by default.  Seems inconsistent.)

> diff --git a/io/init.c b/io/init.c
> index 06002e6..c15a1e1 100644
> --- a/io/init.c
> +++ b/io/init.c
> @@ -86,6 +86,7 @@ init_commands(void)
>  	seek_init();
>  	sendfile_init();
>  	shutdown_init();
> +	stat_init();
>  	sync_init();

The call to stat_init() should be added in patch 1 instead of patch 2, since
otherwise the 'stat' command is unavailable after applying just patch 1.

> diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
> index 19e1ae4..022f0ea 100644
> --- a/man/man8/xfs_io.8
> +++ b/man/man8/xfs_io.8
> @@ -880,6 +880,32 @@ and the XFS_IOC_GETXATTR system call on the current file. If the
>  option is specified, the atime (last access), mtime
>  (last modify), and ctime (last change) timestamps are also displayed.
>  .TP
> +.BR statx " [ " \-O " | " "\-m mask" " ][ \-" FDLA " ]"
> +Extended information from the statx syscall.
> +.RS 1.0i
> +.PD 0
> +.TP 0.4i
> +.B \-m mask
> +Specify the field mask for the statx call (default STATX_ALL)
> +.TP
> +.B \-O
> +Add only basic stats (STATX_BASIC_STATS) to default mask
> +.TP
> +.B \-F
> +Force the attributes to be sync'd with the server
> +.TP
> +.B \-D
> +Don't sync attributes with the server
> +.TP
> +.B \-L
> +Follow symlinks (statx link target)
> +.TP
> +.B \-A
> +Suppress terminal automount traversal
> +.TP
> +.RE
> +.IP
> +.TP
>  .B statfs
>  Selected statistics from
>  .BR statfs (2)

This re-introduces the issue where the later text in the formatted man page is
indented too much.  Removing the extra .TP and .IP, so that the source looks
like the following, appears to fix it:

.TP
.B \-A
Suppress terminal automount traversal
.RE
.TP
.B statfs


- Eric

  parent reply	other threads:[~2017-03-27 20:58 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  4:32 [PATCH 0/2 V2] xfs_io: hook up statx Eric Sandeen
2017-03-24  4:34 ` [PATCH 1/2 V2] xfs_io: move stat functions to new file Eric Sandeen
2017-03-27 15:52   ` Darrick J. Wong
2017-03-24  4:45 ` [PATCH 2/2 V2] xfs_io: hook up statx Eric Sandeen
2017-03-27 15:54   ` Darrick J. Wong
2017-03-27 20:58   ` Eric Biggers [this message]
2017-03-28 21:57     ` Eric Sandeen
2017-03-27 10:00 ` [PATCH 0/2 " David Howells
2017-03-27 17:47   ` Eric Sandeen
2017-03-27 18:05     ` Eric Sandeen
2017-03-27 21:58     ` Dave Chinner
2017-03-28  7:30   ` Amir Goldstein
2017-03-28  9:39   ` David Howells
2017-03-27 20:20 ` [PATCH 2/2 " David Howells
2017-03-27 20:26 ` [PATCH 1/2 V2] xfs_io: move stat functions to new file David Howells
2017-03-27 20:32   ` Darrick J. Wong
2017-03-28 10:22 ` [PATCH] xfs_io: changes to statx interface David Howells
2017-03-28 10:51   ` Amir Goldstein
2017-03-28 12:31   ` David Howells
2017-03-28 13:34     ` Amir Goldstein
2017-03-28 14:04     ` David Howells
2017-03-28 18:01       ` Amir Goldstein
2017-03-28 14:38 ` [PATCH] xfs_io: changes to statx interface [ver #2] David Howells
2017-03-28 18:40   ` Andreas Dilger
2017-03-28 19:07     ` Amir Goldstein
2017-03-28 22:12       ` Eric Sandeen
2017-03-28 23:18   ` Dave Chinner
2017-03-29 15:24   ` David Howells
2017-03-28 14:41 ` David Howells
2017-03-28 16:42   ` Eric Sandeen
2017-03-28 17:35     ` Amir Goldstein
2017-03-28 20:36       ` Eric Sandeen
2017-03-28 17:56     ` David Howells
2017-03-28 18:11       ` Amir Goldstein
2017-03-29 15:49 ` [PATCH] xfs_io: changes to statx interface [ver #3] David Howells
2017-03-29 21:32   ` Eric Sandeen
2017-03-29 16:40 ` David Howells
2017-03-29 21:55 ` [PATCH] xfs_io: changes to statx interface [ver #4] David Howells

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=20170327205846.GA6502@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=adilger@dilger.ca \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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;
as well as URLs for NNTP newsgroup(s).