From: Malcolm Beattie <mbeattie@sable.ox.ac.uk>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Rik van Riel <riel@nl.linux.org>, Ingo Molnar <mingo@redhat.com>,
linux-mm@kvack.org
Subject: Re: PATCH [2.4.0test10]: Kiobuf#01, expand IO return codes from iobufs
Date: Thu, 2 Nov 2000 13:42:25 +0000 [thread overview]
Message-ID: <20001102134225.D22916@sable.ox.ac.uk> (raw)
In-Reply-To: <20001102123400.A1876@redhat.com>; from sct@redhat.com on Thu, Nov 02, 2000 at 12:34:00PM +0000
Stephen C. Tweedie writes:
> Kiobuf diff 01: allow for both the errno and the number of bytes
> transferred to be returned in a kiobuf after IO. We need both in
> order to know how many pages have been dirtied after a failed IO.
[...]
> - int errno; /* Status of completed IO */
> +
> + /* Equivalent to the return value and "errno" after a syscall: */
> + int errno; /* Error from completed IO (usual
> + kernel negative values) */
Although it's nicely commented that errno holds a negative value,
wouldn't it be better to use the usual kernel convention that "err"
holds negative error numbers and "errno" holds positive userland-like
ones? (There are a few places in the kernel which use things called
errno to hold negative numbers but very few). It would just be one
extra little way to help the brain distinguish between the conventions
when using kiobuf and maybe prevent someone beating their head against
a brick wall for a day or two because "if (foo.errno == EIO)" looked
too normal.
--Malcolm
--
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
prev parent reply other threads:[~2000-11-02 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-02 12:34 Stephen C. Tweedie
2000-11-02 13:42 ` Malcolm Beattie [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=20001102134225.D22916@sable.ox.ac.uk \
--to=mbeattie@sable.ox.ac.uk \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=riel@nl.linux.org \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.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