Re: [PATCH] xfs_io: changes to statx interface

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

 



Amir Goldstein <amir73il@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux