linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Curt Wohlgemuth <curtw@google.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4 quota tests?
Date: Tue, 26 Jan 2010 19:35:00 +0100	[thread overview]
Message-ID: <20100126183500.GJ3187@quack.suse.cz> (raw)
In-Reply-To: <6601abe91001260931i39328e77kfe984834275c1282@mail.gmail.com>

  Hi Curt,

On Tue 26-01-10 09:31:24, Curt Wohlgemuth wrote:
> I heard from the ext4 conference call yesterday that you might have
> some quota tests that would be useful.  Can you give me a pointer to
> where I might find them?
  Hum, I have some scripts I use for testing of quota but it's nothing
too clever. What exactly would you like to test? What generally needs to be
tested from filesystem POV (since I guess that's what you're interested in)
is whether quota accounting matches the real usage. So what I do is:

run the load I want to check
quotaoff -vu $mntpoint
repquota -u $mntpoint | sed -ne '6,$p' | tr -s ' ' | sort >before_check
quotacheck -vu $mntpoint
repquota -u $mntpoint | sed -ne '6,$p' | tr -s ' ' | sort >after_check
diff before_check after_check >/dev/null || echo "Quota usage differs!"

For "load I want to check" I usually use fsstress, fsx-linux or similar
programs.

Oh, and when I want to be nasty, I also test load like:
as root do:
  while true; do
    BLOCKLIMIT=$minblimit+$((RANDOM%($maxblimit-$minblimit)))
    INODELIMIT=$minilimit+$((RANDOM%($maxilimit-$minilimit)))
    setquota -u testuser 0 $BLOCKLIMIT 0 $INODELIMIT $mntpoint
    sleep 1
  done

as testuser do:
  while true; do tar xzf some_larger_archive.tar.gz; rm -rf archive; done

Possibly you might also want to run 'sync' in parallel once in a while to
make the mix more interesting. The point is to test whether allocation
failure paths work right...

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      parent reply	other threads:[~2010-01-26 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 17:31 ext4 quota tests? Curt Wohlgemuth
2010-01-26 18:22 ` Eric Sandeen
2010-01-26 18:51   ` Jan Kara
2010-01-26 18:35 ` Jan Kara [this message]

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=20100126183500.GJ3187@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=curtw@google.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).