* [PATCH] ceph: fix buffer pointer advance in ceph_sync_write
@ 2013-03-19 1:46 Henry C Chang
2013-03-19 16:10 ` Greg Farnum
0 siblings, 1 reply; 2+ messages in thread
From: Henry C Chang @ 2013-03-19 1:46 UTC (permalink / raw)
To: ceph-devel
We should advance the user data pointer by _len_ instead of _written_.
_len_ is the data length written in each iteration while _written_ is the
accumulated data length we have writtent out.
Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
---
fs/ceph/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index e51558f..4bcbcb6 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -608,7 +608,7 @@ out:
pos += len;
written += len;
left -= len;
- data += written;
+ data += len;
if (left)
goto more;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: fix buffer pointer advance in ceph_sync_write
2013-03-19 1:46 [PATCH] ceph: fix buffer pointer advance in ceph_sync_write Henry C Chang
@ 2013-03-19 16:10 ` Greg Farnum
0 siblings, 0 replies; 2+ messages in thread
From: Greg Farnum @ 2013-03-19 16:10 UTC (permalink / raw)
To: Henry C Chang; +Cc: ceph-devel
Sage beat me to it and merged this in last night. Thanks much!
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com
On Monday, March 18, 2013 at 6:46 PM, Henry C Chang wrote:
> We should advance the user data pointer by _len_ instead of _written_.
> _len_ is the data length written in each iteration while _written_ is the
> accumulated data length we have writtent out.
>
> Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
> ---
> fs/ceph/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index e51558f..4bcbcb6 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -608,7 +608,7 @@ out:
> pos += len;
> written += len;
> left -= len;
> - data += written;
> + data += len;
> if (left)
> goto more;
>
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-19 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19 1:46 [PATCH] ceph: fix buffer pointer advance in ceph_sync_write Henry C Chang
2013-03-19 16:10 ` Greg Farnum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.