From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <jens.axboe@oracle.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: aio_read const struct iovec *
Date: Wed, 9 Sep 2009 14:18:38 +0300 [thread overview]
Message-ID: <20090909111838.GA14369@localdomain.by> (raw)
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Hello,
I have the following question:
struct file_operations {
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
At the same time:
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
'const struct iovec *' both for aio_write and aio_read.
And "char __user *" and "const char __user *" for read/write.
For example,
pipe_read(struct kiocb *iocb, const struct iovec *_iov,
unsigned long nr_segs, loff_t ppos)
{
struct iovec *iov = (struct iovec *)_iov;
Could we avoid 'struct iovec *iov = (struct iovec *)_iov;' by changing aio_read 'const struct iovec *'
to 'struct iovec *'?
Sergey
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
next reply other threads:[~2009-09-09 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 11:18 Sergey Senozhatsky [this message]
2009-09-09 11:53 ` aio_read const struct iovec * Matthew Wilcox
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=20090909111838.GA14369@localdomain.by \
--to=sergey.senozhatsky@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).