xfs
[Top] [All Lists]

Re: [PATCH] use struct kvec in struct uio

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] use struct kvec in struct uio
From: Christoph Hellwig <hch@xxxxxx>
Date: Wed, 7 Feb 2007 13:54:46 +0100
In-reply-to: <20061129154607.GB6400@xxxxxx>
References: <20061129154607.GB6400@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Wed, Nov 29, 2006 at 04:46:07PM +0100, Christoph Hellwig wrote:
> All but one useage of struct uio are for kernel pointers, so let's use
> struct kvec instead of struct iovec.  Because readlink by handle still
> uses it with a user pointer we still have two sparse warnings, but the
> noise level is reduced quite a bit by this.

ping?

> 
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Index: linux-2.6/fs/xfs/support/move.h
> ===================================================================
> --- linux-2.6.orig/fs/xfs/support/move.h      2006-11-29 16:27:25.000000000 
> +0100
> +++ linux-2.6/fs/xfs/support/move.h   2006-11-29 16:30:18.000000000 +0100
> @@ -55,7 +55,7 @@
>  };
>  
>  struct uio {
> -     struct iovec    *uio_iov;   /* pointer to array of iovecs */
> +     struct kvec     *uio_iov;   /* pointer to array of iovecs */
>       int             uio_iovcnt; /* number of iovecs in array */
>       xfs_off_t       uio_offset; /* offset in file this uio corresponds to */
>       int             uio_resid;  /* residual i/o count */
> @@ -63,7 +63,7 @@
>  };
>  
>  typedef struct uio uio_t;
> -typedef struct iovec iovec_t;
> +typedef struct kvec iovec_t;
>  
>  extern int   xfs_uio_read (caddr_t, size_t, uio_t *);
>  
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_ioctl.c       2006-11-29 
> 16:33:37.000000000 +0100
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_ioctl.c    2006-11-29 16:34:43.000000000 
> +0100
> @@ -388,7 +388,7 @@
>       aiov.iov_len    = olen;
>       aiov.iov_base   = hreq.ohandle;
>  
> -     auio.uio_iov    = &aiov;
> +     auio.uio_iov    = (struct kvec *)&aiov;
>       auio.uio_iovcnt = 1;
>       auio.uio_offset = 0;
>       auio.uio_segflg = UIO_USERSPACE;
---end quoted text---


<Prev in Thread] Current Thread [Next in Thread>