From: Tom Zanussi <zanussi@us.ibm.com>
To: Andi Kleen <ak@muc.de>
Cc: Tom Zanussi <zanussi@us.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
Roman Zippel <zippel@linux-m68k.org>,
Robert Wisniewski <bob@watson.ibm.com>,
Tim Bird <tim.bird@AM.SONY.COM>,
karim@opersys.com
Subject: Re: [PATCH] relayfs redux, part 3
Date: Fri, 4 Feb 2005 16:22:40 -0600 [thread overview]
Message-ID: <16899.62896.559319.678176@tut.ibm.com> (raw)
In-Reply-To: <20050204221230.GA97506@muc.de>
Andi Kleen writes:
>
> > +
> > + local_irq_save(flags);
> > + if (unlikely(buf->offset + length > chan->subbuf_size))
> > + length = relay_switch_subbuf(buf, length);
> > + memcpy(buf->data + buf->offset, data, length);
> > + buf->offset += length;
> > + local_irq_restore(flags);
> > +
> > + return length;
>
> Is there any useful user case for returning length here?
> (e.g. are users likely to handle errors? I doubt it somehow)
>
> If not I would eliminate it.
>
The main reason would be that length would be 0 only if the buffers
were full, so the caller can suspend writing if it sees that, until
e.g. a daemon catches up.
Thanks for your other comments - I'll make those changes in the next
version.
Tom
next prev parent reply other threads:[~2005-02-04 23:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-04 20:17 Tom Zanussi
2005-02-04 21:10 ` Christoph Hellwig
2005-02-04 22:00 ` Tom Zanussi
2005-02-04 21:39 ` Christoph Hellwig
2005-02-04 22:06 ` Tom Zanussi
2005-02-04 22:12 ` Andi Kleen
2005-02-04 22:22 ` Tom Zanussi [this message]
2005-02-05 6:57 ` Andi Kleen
2005-02-05 9:54 ` [PATCH] relayfs redux, part 3 II - another comment Andi Kleen
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=16899.62896.559319.678176@tut.ibm.com \
--to=zanussi@us.ibm.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=bob@watson.ibm.com \
--cc=greg@kroah.com \
--cc=karim@opersys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@AM.SONY.COM \
--cc=zippel@linux-m68k.org \
/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
Powered by JetHome