From: Sergey Senozhatsky Subject: aio_read const struct iovec * Date: Wed, 9 Sep 2009 14:18:38 +0300 Message-ID: <20090909111838.GA14369@localdomain.by> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Cc: Jens Axboe , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Al Viro Return-path: Received: from mail-yw0-f173.google.com ([209.85.211.173]:59823 "EHLO mail-yw0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752274AbZIILOb (ORCPT ); Wed, 9 Sep 2009 07:14:31 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.=20 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 =3D (struct iovec *)_iov;=20 Could we avoid 'struct iovec *iov =3D (struct iovec *)_iov;' by changing ai= o_read 'const struct iovec *' to 'struct iovec *'? Sergey --DocE+STaALJfprDB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iJwEAQECAAYFAkqnjw4ACgkQfKHnntdSXjTKiQQAxuMG4p7ijKQ3dQAc46YX4LYZ qV5rvJrSXo5kwzhcPcJnwCWvGnFZzmv4jxgShIHZs1ROq7bI5zLX90b1+RADGsMn qxgxI9SVLPAtUtvJKHy9XDGEHoDHKkAUmSN9ztwiJQmh0XveVcHzLp4QXRQM7Mt7 DnNcSP3sEHGe2tT4AoU= =tmwY -----END PGP SIGNATURE----- --DocE+STaALJfprDB--