From: Christoph Hellwig <hch@infradead.org>
To: Felix Blyakher <felixb@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfstests: fix async io error handling in fsx
Date: Mon, 30 Mar 2009 13:54:51 -0400 [thread overview]
Message-ID: <20090330175451.GA1041@infradead.org> (raw)
In-Reply-To: <1238391050-14211-1-git-send-email-felixb@sgi.com>
On Mon, Mar 30, 2009 at 12:30:50AM -0500, Felix Blyakher wrote:
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -976,19 +976,41 @@ __aio_rw(int rw, int fd, char *buf, unsigned len, unsigned offset)
> fprintf(stderr, "errcode=%d\n", ret);
> fprintf(stderr, "aio_rw: io_submit failed: %s\n",
> strerror(ret));
> - return(-1);
> + errno = -ret;
> + return -1;
I think we'd be better off having all these places that set errno in one
place and use goto labels. That way you can also add a small comment
about it.
> + /*
> + * The b0rked libaio defines event.res as signed.
> + * However the kernel strucuture has it unsigned,
> + * and it's used to pass negated error value.
> + * Till the library is fixed use the temp var.
> + */
This comment seems backwards to the patch description and the actual
code.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-03-30 17:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 5:30 [PATCH] xfstests: fix async io error handling in fsx Felix Blyakher
2009-03-30 17:54 ` Christoph Hellwig [this message]
2009-03-30 18:53 ` Felix Blyakher
2009-03-30 18:56 ` Christoph Hellwig
2009-03-30 18:59 ` Felix Blyakher
-- strict thread matches above, loose matches on Subject: below --
2009-03-30 19:41 Felix Blyakher
2009-04-01 7:21 ` Christoph Hellwig
2009-04-06 15:26 Felix Blyakher
2009-04-06 16:33 ` Christoph Hellwig
2009-04-13 13:58 ` Christoph Hellwig
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=20090330175451.GA1041@infradead.org \
--to=hch@infradead.org \
--cc=felixb@sgi.com \
--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