Re: [PATCH] xfs_io: changes to statx interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 28, 2017 at 8:31 AM, David Howells <dhowells@xxxxxxxxxx> wrote:
> Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
>> xfs_io -c "statx -c /dev/null"
>>
>> is what you want
>
> That doesn't produce any output.  Did you mean:
>
>         xfs_io -c "statx -c" /dev/null

Yes.

>
> 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

> but doesn't.
>
>> See the output of 'file' command or the global var filetable.
>
> So I would have to make "-d dirfd" take an entry in the global var filetable
> rather than an actual fd number?
>

I guess if you want to test statx without -f/-d then you'd
need to provide filename as one of the args to the statx command
(and not as args to xfs_io command line).

-f is the natural operation you can get from xfs_io
and you can use -d on current fd as well.

The only command I see that uses the non current fd is
sendfile -f N
Mostly commands operate on the "current" fd and current fd
is iterated from filetable.
if you use -d N from command line, you must use -C instead of
-c so statx is not performed on all fds in filetable, e.g:

xfs_io -r -C "statx -c -d 0" /a/ /a/foo

But you see that this makes little sense if "foo" is not an argument
of statx.

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.

The main advantage you get from writing xfstests is that many of us run
them on a diversity of file systems, so it is good for catching wrong
implementation of statx by specific file systems.

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?

Amir.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux