From: Russ Cox <russcox@gmail.com>
To: "ericvh@gmail.com" <ericvh@gmail.com>
Cc: linux-kernel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net, akpm@osdl.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH 2.6.13-rc3-mm2] v9fs: add fd based transport
Date: Thu, 28 Jul 2005 10:38:53 -0400 [thread overview]
Message-ID: <ee9e417a05072807381733876@mail.gmail.com> (raw)
In-Reply-To: <200507281358.j6SDwBRZ026263@ms-smtp-03-eri0.texas.rr.com>
> +static int v9fs_fd_recv(struct v9fs_transport *trans, void *v, int len)
> +{
> + struct v9fs_trans_fd *ts = trans ? trans->priv : NULL;
> +
> + return kernel_read(ts->in_file, ts->in_file->f_pos, v, len);
> +}
> +static int v9fs_fd_send(struct v9fs_transport *trans, void *v, int len)
> +{
> + struct v9fs_trans_fd *ts = trans ? trans->priv : NULL;
> + mm_segment_t oldfs = get_fs();
> + int ret = 0;
> +
> + set_fs(get_ds());
> + /* The cast to a user pointer is valid due to the set_fs() */
> + ret = vfs_write(ts->out_file, (void __user *)v, len, &ts->out_file->f_pos);
> + set_fs(oldfs);
> +
> + return ret;
> +}
Perhaps there should be a kernel_write provided by the kernel?
Russ
prev parent reply other threads:[~2005-07-28 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 13:57 [PATCH 2.6.13-rc3-mm2] v9fs: add fd based transport ericvh
2005-07-28 14:17 ` Christoph Hellwig
2005-07-28 14:19 ` [V9fs-developer] " Ronald G. Minnich
2005-07-28 18:14 ` Eric Van Hensbergen
2005-07-28 14:38 ` Russ Cox [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=ee9e417a05072807381733876@mail.gmail.com \
--to=russcox@gmail.com \
--cc=akpm@osdl.org \
--cc=ericvh@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.