linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* aio_read const struct iovec *
@ 2009-09-09 11:18 Sergey Senozhatsky
  2009-09-09 11:53 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Senozhatsky @ 2009-09-09 11:18 UTC (permalink / raw)
  To: Al Viro; +Cc: Jens Axboe, linux-fsdevel, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-09 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 11:18 aio_read const struct iovec * Sergey Senozhatsky
2009-09-09 11:53 ` Matthew Wilcox

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).