From: Dave Chinner <david@fromorbit.com>
To: Tao Ma <tm@tao.ma>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: make 275 xfs specific.
Date: Mon, 7 May 2012 11:23:04 +1000 [thread overview]
Message-ID: <20120507012304.GV5091@dastard> (raw)
In-Reply-To: <4FA692B7.9040006@tao.ma>
On Sun, May 06, 2012 at 11:03:19PM +0800, Tao Ma wrote:
> On 05/06/2012 07:37 AM, Dave Chinner wrote:
> > On Sat, May 05, 2012 at 11:07:09PM +0800, Tao Ma wrote:
> >> From: Tao Ma <boyu.mt@taobao.com>
> >>
> >> In my test with ext4, 275 can't pass because ext4
> >> can create a 8k file in the end not like what xfs
> >> does. So make this test case xfs only for now.
> >
> > It's not an XFS specific test - it's a test that is supposed to test
> > POSIX write behaviour. i.e. if the filesystem is full, and then you
> > free 4k of space, then an 8k write should only be able to write 4k,
> > yes?
> Yes, but it doesn't work as expected for ext4.
It won't work as expected for many XFS configurations, too. e.g.
filesystem block size > 4k on 16/64k page machines, or if the
filesystem is configured with an inheritable extent size hint on the
root directory (XFS has been able to do per-file "bigalloc"
for years ;)
> > So doesn't a failure on ext4 indicate that there's something wrong
> > with ext4 (either it's ENOSPC detection or the short write
> > handling), not the test?
> Actually in my test, ext4 can create the file with 8K file size, not a
> short write. I haven't looked into it yet. But AFAICS, if we have an
> ext4 volume with 8k cluster size, a 4k file can occupy a 8k cluster and
> the final write of 8k will succeed instead of the short write.
IOws, you are testing with bigalloc?
Many tests make the assumption that allocation/extent size is the
same as the filesystem block size, and many more make the assumption
that the filesystem block size is always 4k. These tests generally
fail on differently configured filesystems, and so need massaging to
make work on these sorts of configs.
In this case, just make the write larger than the largest possible
allocation size (say 2MB), and fail the test if the write is
complete rather than short...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-05-07 1:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 15:07 [PATCH] xfstests: make 275 xfs specific Tao Ma
2012-05-05 23:37 ` Dave Chinner
2012-05-06 15:03 ` Tao Ma
2012-05-07 1:23 ` Dave Chinner [this message]
2012-09-07 19:55 ` Eric Sandeen
2012-09-11 2:24 ` Eric Sandeen
2012-09-14 11:05 ` Tao Ma
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=20120507012304.GV5091@dastard \
--to=david@fromorbit.com \
--cc=tm@tao.ma \
--cc=xfs@oss.sgi.com \
/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