linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/lustre: kiocb->ki_left is removed
@ 2013-08-06 12:31 Peng Tao
  2013-08-06 15:03 ` Benjamin LaHaise
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Tao @ 2013-08-06 12:31 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: linux-kernel, Peng Tao, Kent Overstreet, Andreas Dilger,
	Greg Kroah-Hartman

From: Peng Tao <tao.peng@emc.com>

We also missed ki_nbytes...

Cc: Kent Overstreet <koverstreet@google.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Peng Tao <tao.peng@emc.com>
---
This fixes Lustre build in linux-next and needs to go through
the aio tree as Kent's AIO patch is not in upstream kernel. 

 drivers/staging/lustre/lustre/llite/file.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 253f026..bc534db 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -1009,7 +1009,7 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
 	local_iov->iov_len = count;
 	init_sync_kiocb(kiocb, file);
 	kiocb->ki_pos = *ppos;
-	kiocb->ki_left = count;
+	kiocb->ki_nbytes = count;
 
 	result = ll_file_aio_read(kiocb, local_iov, 1, kiocb->ki_pos);
 	*ppos = kiocb->ki_pos;
@@ -1068,7 +1068,7 @@ static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
 	local_iov->iov_len = count;
 	init_sync_kiocb(kiocb, file);
 	kiocb->ki_pos = *ppos;
-	kiocb->ki_left = count;
+	kiocb->ki_nbytes = count;
 
 	result = ll_file_aio_write(kiocb, local_iov, 1, kiocb->ki_pos);
 	*ppos = kiocb->ki_pos;
-- 
1.7.9.5


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

* Re: [PATCH] staging/lustre: kiocb->ki_left is removed
  2013-08-06 12:31 [PATCH] staging/lustre: kiocb->ki_left is removed Peng Tao
@ 2013-08-06 15:03 ` Benjamin LaHaise
  2013-08-07  6:06   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin LaHaise @ 2013-08-06 15:03 UTC (permalink / raw)
  To: Peng Tao
  Cc: linux-kernel, Peng Tao, Kent Overstreet, Andreas Dilger,
	Greg Kroah-Hartman, linux-aio

On Tue, Aug 06, 2013 at 08:31:01PM +0800, Peng Tao wrote:
> From: Peng Tao <tao.peng@emc.com>
> 
> We also missed ki_nbytes...

Applied to the aio-next.git tree.

		-ben

> Cc: Kent Overstreet <koverstreet@google.com>
> Cc: Andreas Dilger <andreas.dilger@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Peng Tao <tao.peng@emc.com>
> ---
> This fixes Lustre build in linux-next and needs to go through
> the aio tree as Kent's AIO patch is not in upstream kernel. 
> 
>  drivers/staging/lustre/lustre/llite/file.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> index 253f026..bc534db 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -1009,7 +1009,7 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
>  	local_iov->iov_len = count;
>  	init_sync_kiocb(kiocb, file);
>  	kiocb->ki_pos = *ppos;
> -	kiocb->ki_left = count;
> +	kiocb->ki_nbytes = count;
>  
>  	result = ll_file_aio_read(kiocb, local_iov, 1, kiocb->ki_pos);
>  	*ppos = kiocb->ki_pos;
> @@ -1068,7 +1068,7 @@ static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
>  	local_iov->iov_len = count;
>  	init_sync_kiocb(kiocb, file);
>  	kiocb->ki_pos = *ppos;
> -	kiocb->ki_left = count;
> +	kiocb->ki_nbytes = count;
>  
>  	result = ll_file_aio_write(kiocb, local_iov, 1, kiocb->ki_pos);
>  	*ppos = kiocb->ki_pos;
> -- 
> 1.7.9.5

-- 
"Thought is the essence of where you are now."

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

* Re: [PATCH] staging/lustre: kiocb->ki_left is removed
  2013-08-06 15:03 ` Benjamin LaHaise
@ 2013-08-07  6:06   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2013-08-07  6:06 UTC (permalink / raw)
  To: Benjamin LaHaise
  Cc: Peng Tao, linux-kernel, Peng Tao, Kent Overstreet, Andreas Dilger,
	Greg Kroah-Hartman, linux-aio

On Tue, Aug 06, 2013 at 11:03:08AM -0400, Benjamin LaHaise wrote:
> On Tue, Aug 06, 2013 at 08:31:01PM +0800, Peng Tao wrote:
> > From: Peng Tao <tao.peng@emc.com>
> > 
> > We also missed ki_nbytes...
> 
> Applied to the aio-next.git tree.

The correct fix would be to just switch the .read and .write entry
points in Lustre to use do_sync_read/write instead of reimplementing it
incorrectly.


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

end of thread, other threads:[~2013-08-07  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-06 12:31 [PATCH] staging/lustre: kiocb->ki_left is removed Peng Tao
2013-08-06 15:03 ` Benjamin LaHaise
2013-08-07  6:06   ` Christoph Hellwig

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