From: Christoph Hellwig <hch@infradead.org>
To: "Zhong, Xin" <xin.zhong@intel.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: pwrite hang when writing from mmaped buffer of the same page
Date: Mon, 13 Dec 2010 11:19:54 -0500 [thread overview]
Message-ID: <20101213161954.GA23509@infradead.org> (raw)
In-Reply-To: <1292225083-17713-1-git-send-email-xin.zhong@intel.com>
On Mon, Dec 13, 2010 at 03:24:43PM +0800, Zhong, Xin wrote:
> The problem is found in meego testing:
> http://bugs.meego.com/show_bug.cgi?id=6672
> Only btrfs has this problem so far. Other linux fs works well.
Thanks, the patch pretty good. A few think I'd like to improved,
though:
> +_cleanup()
> +{
> + cd /
> + rm -f $tmp.*
> +}
> +
> +# get standard environment, filters and checks
> +. ./common.rc
> +. ./common.filter
> +
> +# real QA test starts here
> +
> +# Modify as appropriate.
> +_supported_fs generic
> +_supported_os Linux
> +
> +TESTFILE=$TEST_DIR/test_file
> +TEST_PROG=$here/src/pwrite_mmap_blocked
> +
> +$TEST_PROG $TESTFILE
Please remove the test file after the test completed. This is best done
in the cleanup function, as it's called both for sucessfull and error
exits.
> +QA output created by 248
> +pwrite 1 bytes from 2 to 3
> diff --git a/group b/group
> index 0f94dd9..0b4f514 100644
> --- a/group
> +++ b/group
> @@ -361,3 +361,4 @@ deprecated
> 245 auto quick dir
> 246 auto quick rw
> 247 auto quick rw
> +248 other
The test should also be part of the quick and rw groups.
> diff --git a/src/pwrite_mmap_blocked.c b/src/pwrite_mmap_blocked.c
> new file mode 100644
> index 0000000..40d7f7b
> --- /dev/null
> +++ b/src/pwrite_mmap_blocked.c
> @@ -0,0 +1,63 @@
> +#include <stdio.h>
> +#include <unistd.h>
> +#include <fcntl.h>
> +#include <stdlib.h>
> +#include <string.h>
> +#include <errno.h>
> +#include <time.h>
> +#include <sys/mman.h>
> +#include <sys/signal.h>
> +#include <sys/stat.h>
Please add a license header to the program, preferably GPLv2 or GPLv2 or
later.
> +
> +char *progname;
> +loff_t size;
> +int fd;
> +char *filename="./test_file";
The program is actually using the file name passed as the first
argument, and you're only using this variable for the error message,
please just remove it.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-12-13 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 7:24 [PATCH] xfstests: pwrite hang when writing from mmaped buffer of the same page Zhong, Xin
2010-12-13 16:19 ` Christoph Hellwig [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=20101213161954.GA23509@infradead.org \
--to=hch@infradead.org \
--cc=xfs@oss.sgi.com \
--cc=xin.zhong@intel.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