From: Eric Sandeen <sandeen@redhat.com>
To: Zach Brown <zab@redhat.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 14/14] btrfs-progs: Error handling in scrub_progress_cycle() thread
Date: Mon, 04 Mar 2013 16:34:47 -0600 [thread overview]
Message-ID: <51352187.80707@redhat.com> (raw)
In-Reply-To: <20130304220034.GC1658@lenny.home.zabbo.net>
On 3/4/13 4:00 PM, Zach Brown wrote:
>> - ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
>> + ret = -pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
>> if (ret)
>> - return ERR_PTR(-ret);
>> + goto out;
>
> Am I the only one who finds ret = -pthread_*() pretty odd? :) (ret = -0
> on success.. ok.. I guess..)
>
> I'd have done something like
>
> err = pthread_*()
> if (err) {
> ret = -err;
>
> so that it looks like the -1/errno pattern that our brains already have
> to deal with.
>
> - z
>
Yeah, I wasn't thrilled either. Fair enough. I'll do that & resend.
-Eric
next prev parent reply other threads:[~2013-03-04 22:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:39 [PATCH 00/14] btrfs-progs: more Coverity cleanups Eric Sandeen
2013-03-04 22:02 ` Zach Brown
2013-03-04 22:39 ` [PATCH 01/14] btrfs-progs: close fd on cmd_subvol_list return Eric Sandeen
2013-03-04 22:39 ` [PATCH 02/14] btrfs-progs: close fd on do_convert error returns Eric Sandeen
2013-03-04 22:39 ` [PATCH 03/14] btrfs-progs: free resources on do_rollback " Eric Sandeen
2013-03-04 22:39 ` [PATCH 04/14] btrfs-progs: don't leak fd in get_fs_info Eric Sandeen
2013-03-05 23:41 ` Eric Sandeen
2013-03-08 15:27 ` Eric Sandeen
2013-03-04 22:39 ` [PATCH 05/14] btrfs-progs: free allocated metadump structure on restore failure Eric Sandeen
2013-03-04 22:39 ` [PATCH 06/14] btrfs-progs: check for null string in parse_size Eric Sandeen
2013-03-04 22:39 ` [PATCH 07/14] btrfs-progs: tidy up cmd_snapshot() whitespace & returns Eric Sandeen
2013-03-04 22:39 ` [PATCH 08/14] btrfs-progs: Free resources when returning error from cmd_snapshot() Eric Sandeen
2013-03-04 22:39 ` [PATCH 09/14] btrfs-progs: tidy up cmd_subvol_create() whitespace & returns Eric Sandeen
2013-03-04 22:40 ` [PATCH 10/14] btrfs-progs: Free resources when returning error from cmd_subvol_create() Eric Sandeen
2013-03-04 22:40 ` [PATCH 11/14] btrfs-progs: check return of posix_fadvise Eric Sandeen
2013-03-04 22:40 ` [PATCH 12/14] btrfs-progs: Issue warnings if ioctls fail in sigint handlers Eric Sandeen
2013-03-04 21:57 ` Zach Brown
2013-03-04 22:34 ` Eric Sandeen
2013-03-04 22:35 ` [PATCH 12/14 V2] " Eric Sandeen
2013-03-04 22:40 ` [PATCH 13/14] btrfs-progs: better option/error handling for btrfs-vol Eric Sandeen
2013-03-04 22:40 ` [PATCH 14/14] btrfs-progs: Error handling in scrub_progress_cycle() thread Eric Sandeen
2013-03-04 22:00 ` Zach Brown
2013-03-04 22:34 ` Eric Sandeen [this message]
2013-03-04 22:45 ` [PATCH 14/14 V2] " Eric Sandeen
2013-03-04 23:12 ` Zach Brown
2013-03-04 22:49 ` [PATCH 15/14] btrfs-progs: fix scrub error return from pthread_mutex_lock Eric Sandeen
2013-03-10 15:19 ` [PATCH 00/14] btrfs-progs: more Coverity cleanups David Sterba
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=51352187.80707@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zab@redhat.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;
as well as URLs for NNTP newsgroup(s).