From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michael Tokarev <mjt@tls.msk.ru>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Ian Kent <raven@themaw.net>,
Thomas Meyer <thomas@m3y3r.de>,
autofs@vger.kernel.org
Subject: Re: autofs: make the autofsv5 packet file descriptor use a packetized pipe
Date: Sun, 29 Apr 2012 17:28:38 -0700 [thread overview]
Message-ID: <4F9DDCB6.1070908@zytor.com> (raw)
In-Reply-To: <CA+55aFy72rPMq3M2_PU0ue45Fb38_Effrfhu2uOpdVXt9H1XOg@mail.gmail.com>
On 04/29/2012 05:25 PM, Linus Torvalds wrote:
> On Sun, Apr 29, 2012 at 5:15 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>>
>> I just looked at am-utils; am-utils *does* use autofs v5, and *will*
>> loop back and read more data on a short read.
>
> Can you point to the sources?
>
> If it's "short read" as in "I didn't get as much as I expected", that's fine.
>
> If it is "short read" as in "I don't even try to read 300 bytes, I
> read it in 8-byte chunks", we're screwed.
>
git://git.fsl.cs.sunysb.edu/am-utils-6.2.git
conf/autofs/autofs_linux.c
static ssize_t
autofs_get_pkt(int fd, void *buf, size_t bytes)
{
ssize_t i;
do {
i = read(fd, buf, bytes);
if (i <= 0)
break;
buf = (char *)buf + i;
bytes -= i;
} while (bytes);
return bytes;
}
...
#if AUTOFS_MAX_PROTO_VERSION >= 5
if (fh->version < 5) {
len = sizeof(p.pkt);
} else {
len = sizeof(p.pkt5);
}
#else
len = sizeof(p.pkt);
#endif /* AUTOFS_MAX_PROTO_VERSION >= 5 */
if (autofs_get_pkt(fh->fd, &p, len))
continue;
next prev parent reply other threads:[~2012-04-30 0:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120429205429.63CCD7C0064@ra.kernel.org>
2012-04-30 0:15 ` autofs: make the autofsv5 packet file descriptor use a packetized pipe H. Peter Anvin
2012-04-30 0:25 ` Linus Torvalds
2012-04-30 0:28 ` H. Peter Anvin [this message]
2012-04-30 0:33 ` Linus Torvalds
2012-04-30 0:35 ` H. Peter Anvin
2012-04-30 0:43 ` Linus Torvalds
2012-04-30 0:45 ` H. Peter Anvin
2012-04-30 1:29 ` Ian Kent
2012-04-30 1:56 ` Linus Torvalds
2012-04-30 5:57 ` Ian Kent
2012-04-30 0:30 ` H. Peter Anvin
2012-04-30 0:37 ` Linus Torvalds
2012-04-30 20:03 ` H. Peter Anvin
2012-04-30 20:11 ` Linus Torvalds
2012-04-30 20:14 ` H. Peter Anvin
2012-04-30 6:27 ` Michael Tokarev
2012-04-30 6:43 ` Michael Tokarev
2012-04-30 6:48 ` H. Peter Anvin
2012-04-30 6:55 ` Ian Kent
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=4F9DDCB6.1070908@zytor.com \
--to=hpa@zytor.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=autofs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=raven@themaw.net \
--cc=thomas@m3y3r.de \
--cc=torvalds@linux-foundation.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