From: David Howells <dhowells@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: dhowells@redhat.com, Eric Sandeen <sandeen@sandeen.net>,
linux-xfs <linux-xfs@vger.kernel.org>,
Andreas Dilger <adilger@dilger.ca>,
Christoph Hellwig <hch@infradead.org>,
fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] xfs_io: changes to statx interface
Date: Tue, 28 Mar 2017 15:04:06 +0100 [thread overview]
Message-ID: <28001.1490709846@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAOQ4uxgzV7BR5ZHmfWhu2vnGmO9uMqFuzMFrZnKfnH1fooob7w@mail.gmail.com>
Amir Goldstein <amir73il@gmail.com> wrote:
> > Further, this should work:
> >
> > warthog>xfs_io -c "statx -c" /dev/sda
> > /dev/sda: Permission denied
> >
>
> This opens /dev/sda for read/write and feeds the fd to the commands
> executed.
> You may want to try
> xfs_io -r -c "statx -c" /dev/sda
I've added -P to open to supply O_PATH, but I'm having trouble testing the
dirfd usage - I think probably because file->name is an absolute path:
xfs_io> open /dev
Opened 0
xfs_io> open sda
sda: No such file or directory
xfs_io> open /dev/sda
Opened 1
Possibly open should be able to take a base dir and call openat().
(I also made it print the file table index after a successful open, though I
perhaps only want to do this in interactive mode).
> By the time statx() gets to fs specific code it does not matter if you
> called it with -d/-f or like stat() does it?
No. But all the calling options still have to be tested, as does stuffing bad
values into the syscall args - something xfstests seems to be very poor at.
> In my (hopefully unbiased) opinion, there is room for the syscall sanity
> tests that you posted to LTP and there is room for file system
> functional tests with xfstests, which xfs_io can be used for.
Yes. I agree. Christoph may be of the opinion that LTP is a trainwreck, but
it can do some things much more easily than can xfstests, primarily because
its tests are written in C.
Any suggestions on how to do timestamp comparisons? I really want to be able
to do things like asking if mtime > btime or btime < wall clock time. I guess
I could add another command for that.
next prev parent reply other threads:[~2017-03-28 14:04 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
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 [this message]
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=28001.1490709846@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=adilger@dilger.ca \
--cc=amir73il@gmail.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).