staging/lustre: kiocb->ki_left is removed
PATCH 1/1 staging/lustre: kiocb->ki_left is removed
From: Peng Tao <[email protected]>
We also missed ki_nbytes...
Cc Kent Overstreet <[email protected]>
Cc Andreas Dilger <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Peng Tao <[email protected]>
---
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(-)
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -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;
Signature · 1 line
1.7.9.5
Benjamin LaHaise
AppliedQuoted 3 lines · Peng Tao
From: Peng Tao <[email protected]>
We also missed
ki_nbytes...
Applied to the aio-next.git tree.
-ben
Quoted 35 lines
Cc Kent Overstreet <[email protected]>Cc Andreas Dilger <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Peng Tao <[email protected]>---
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(-)drivers/staging/lustre/lustre/llite/file.c +2
-2@@ -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;Signature · 1 line
1.7.9.5
Signature · 1 line
"Thought is the essence of where you are now."
Quoted 6 lines · Benjamin LaHaise
Quoted 3 lines · Peng Tao
From: Peng Tao <[email protected]>
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.