Commit Graph

28 Commits

Author SHA1 Message Date
Lukas Czerner 2dc43e03e6 build: Move fallocate include into global.h
Move the inclusion of falloc.h with all it's possible defines for the
fallocate mode into global.h header file so we do not have to include
and define it manually in every tool using fallocate.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-03-13 15:19:52 +11:00
Dmitry Monakhov 336581726f fsstress: add verifiable logging mode
- It would be useful to have verifiable logging mode which will contain
  only deterministic information which allow to compare two logs files
  generated from two runs with same seed.
- Also add missed help for '-o logfile' option

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-03-13 15:18:01 +11:00
Eric Sandeen 6571cea7eb xfstests: allow override of XFS_IOC_DIOINFO
This change allows xfstests runs to simulate apps
which don't bother to call XFS_IOC_DIOINFO, and simply
issue DIO in sizes and alignments of its own choosing.

So i.e.:

# export XFS_DIO_MIN=512

prior to an xfstests run, and these test binaries
should issue 512-aligned DIOs instead of whatever
XFS_IOC_DIOINFO says (i.e. instead of maybe 4k).

(This is in preparation for allowing 512 IOs on
"advanced format" 512/4k disks, when xfs has an
internal 4k sector size).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-01-20 13:28:38 +11:00
Eric Sandeen 073841a774 xfstests: fix fsstress usage() output
The show_ops() output should come as part of the -f option
help.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-10-14 09:30:45 -05:00
Jan Schmidt e47ebda011 xfstests: add execution of a custom command to fsstress (-x and -X options)
This patch adds execution of a custom command in the middle of all fsstress
operations. Its intended use is the creation of snapshots in the middle of a
test run.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-05-09 14:40:00 -05:00
Eric Sandeen 7d89aa9076 fsstress: make sync a write op
I was running 068 to test freeze changes, and realized that
"sync" is not in the op list when "-w" (write ops) is specified,
although fsync & fdatasync are.  It seems to me that sync should
be a default write op as well.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2012-02-06 00:00:52 -06:00
Dmitry Monakhov 8e8f546cfa fsstress: fix argument typo
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-10 11:17:00 +00:00
Dmitry Monakhov 32553be2e4 xfstests: add fiemap operation to fsstress
Related bug: http://patchwork.ozlabs.org/patch/118863

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov 96fb9f93ca xfstests: fsstress add FS_IOC_{SET,GET}FLAGS operations v2
Add two new operations:
- getattr: ioctl(fd, FS_IOC_GETFLAGS, &fl)
- setattr: ioctl(fd, FS_IOC_SETFLAGS, &random_flags)
Attribute mask may be passed via -M opt, by default is (~0).
By default FS_IOC_SETFLAGS has zero probability because
it may produce inodes with APPEND or IMMUTABLE flags which
are not deletable by default. Let's assumes that one who
enable it knows how to delete such inodes.
For example like follows:
find $TEST_PATH -exec chattr -i -a {} \;
rm -rf $TEST_PATH

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov dca63722ea xfstests: add fallocate support to fsstress
Add tests for fallocate(2) syscall
- fallocate: reserve the disk space
- punch: de-allocates the disk space
Since FALLOC_FL_PUNCH_HOLE is relatively new it's value defined
explicitly if not yet defined. Later we may clear that define.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov df3c057ccb xfstests: fsstress add command line style output for show_opts
Once some combination of seed+fs_ops result in regression it is
reasonable to document that combination. It is usefull to dump
that configuration in command line style. Later this line may be
simply hardcoded in to regression test.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-03 19:01:13 +00:00
Dmitry Monakhov bd11e87d59 xfstests: fsstress should kill children tasks before exit
It is very hard to predict runtime for fsstress. In many cases it
is useful to give test to run a reasonable time, and then kill it.
But currently there is no reliable way to kill test without leaving
running children.
This patch add sanity cleanup logic which looks follow:
 - On sigterm received by parent, it resend signal to it's children
 - Wait for each child to terminates
 - EXTRA_SANITY: Even if parent was killed by other signal, children
   will be terminated with SIGKILL to preven staled children.

So now one can simply run fsstress like this:
./fsstress -p 1000 -n999999999 -d $TEST_DIR &
PID=$!
sleep 300
kill $PID
wait $PID

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dmitry Monakhov e67879499e xfstests: add different logging option to fsstress
Currently the only way to log fsstress's output is to redirect it's shared
stdout to pipe which is very painfull because:

1) Pipe writers are serialized via i_mutex so we waste cpu-cores power on stupid
   sinchronization for loging purpose, instead of hunting real race conditions,
   and bugs inside file system.
2) Usually output is corrupted due to luck of sychronization on shared stdout.

Since fsstress's children operate on independend paths, let's just open didicated
log file for each child and simply avoid useless sycnhronization.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dmitry Monakhov e8f6c8e42e xfstests: fsstress dump inode info when possible
Fsstress exec behaviour is not completely determinated in case of
low resources mode due to ENOMEM, ENOSPC, etc. In some places we
call stat(2). This information may be halpfull for future
investigations purposes. Let's dump stat info where possible.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-11-02 21:04:42 +00:00
Dave Chinner b1da830791 xfstests: fix bulkstat related compile warnings.
Use correct types for bulkstat structure to avoid pointer warnings.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-21 08:53:44 +11:00
Eric Sandeen 84567e4977 Drop the xfs-specific MAXNAMELEN in favor of the Posix NAME_MAX
This makes it easier to lose libxfs.h later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:35:56 -05:00
Nathan Scott a90d78c5da QA updates - make builds on older versions of headers work, reenable rt on bruce.
Merge of master-melb:xfs-cmds:26356a by kenmcd.
2006-06-27 03:49:23 +00:00
Nathan Scott 26fdd3c59c Comment out extsize setting for all allocators until delalloc accounting issue resolved.
Merge of master-melb:xfs-cmds:26268a by kenmcd.
2006-06-17 06:11:37 +00:00
Nathan Scott de6d86177f QA test updates - fixes for pquota, extsize, fsstress, and ensure mount options passed through to test_dev.
Merge of master-melb:xfs-cmds:24763a by kenmcd.
2005-12-09 02:52:22 +00:00
Nathan Scott 6449a993f2 Switch to always using get/setxattr rather than a separate projid call on IRIX.
Merge of master-melb:xfs-cmds:24692a by kenmcd.
2005-12-05 21:41:47 +00:00
Nathan Scott d259454b19 Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24329a by kenmcd.
2005-11-09 02:50:19 +00:00
Tim Shimmin 5b23d7a080 Add comments, diganostics, pass back some errors from funcs.
Merge of master-melb:xfs-cmds:24197a by kenmcd.

  When tracking down an error msg from fsstress, I had no idea what
  was going on. So I have added a bunch of comments to the code
  and added some more diagnostics (in verbose mode). Have also passed
  back some failures which weren't directly before.
  Hopefully this will not change the ops which are called for
  a given rand-seed run.
2005-10-25 06:37:03 +00:00
Nathan Scott 781a49c308 Fix fsstress builds when setting the project identifier (fsx interface now).
Merge of master-melb:xfs-cmds:23061a by kenmcd.
2005-07-05 03:44:14 +00:00
Nathan Scott a175e44297 Abstract out some common quota shell code, add project operation to fsstress.
Merge of master-melb:xfs-cmds:22099a by kenmcd.
2005-04-08 03:50:59 +00:00
Tim Shimmin 4c56e56f91 xfs qa changes to get thinks working on irix
add verbosity to a file for debugging
reduce iteration count
2004-08-10 03:55:47 +00:00