* [PATCH] rbd: Fix ceph_snap_context size calculation
@ 2012-06-04 8:11 Yan, Zheng
2012-06-04 20:08 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Yan, Zheng @ 2012-06-04 8:11 UTC (permalink / raw)
To: ceph-devel
From: "Yan, Zheng" <zheng.z.yan@intel.com>
ceph_snap_context->snaps is an u64 array
Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
---
drivers/block/rbd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 65665c9..8b9c173 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -499,7 +499,7 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
/ sizeof (*ondisk))
return -EINVAL;
header->snapc = kmalloc(sizeof(struct ceph_snap_context) +
- snap_count * sizeof (*ondisk),
+ snap_count * sizeof(u64),
gfp_flags);
if (!header->snapc)
return -ENOMEM;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rbd: Fix ceph_snap_context size calculation
2012-06-04 8:11 [PATCH] rbd: Fix ceph_snap_context size calculation Yan, Zheng
@ 2012-06-04 20:08 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2012-06-04 20:08 UTC (permalink / raw)
To: Yan, Zheng; +Cc: ceph-devel
On 06/04/2012 03:11 AM, Yan, Zheng wrote:
> From: "Yan, Zheng"<zheng.z.yan@intel.com>
>
> ceph_snap_context->snaps is an u64 array
You are correct. We'll get this in soon. Thanks.
Reviewed-by: Alex Elder <elder@inktank.com>
> Signed-off-by: Zheng Yan<zheng.z.yan@intel.com>
> ---
> drivers/block/rbd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 65665c9..8b9c173 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -499,7 +499,7 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
> / sizeof (*ondisk))
> return -EINVAL;
> header->snapc = kmalloc(sizeof(struct ceph_snap_context) +
> - snap_count * sizeof (*ondisk),
> + snap_count * sizeof(u64),
> gfp_flags);
> if (!header->snapc)
> return -ENOMEM;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-04 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 8:11 [PATCH] rbd: Fix ceph_snap_context size calculation Yan, Zheng
2012-06-04 20:08 ` Alex Elder
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.