From 96936bdc77e34226fd3e43ebee8863290f4eecd5 Mon Sep 17 00:00:00 2001 From: Stratos Psomadakis Date: Thu, 10 Nov 2011 15:45:37 +0200 Subject: [PATCH] --- yaml --- r: 275755 b: refs/heads/master c: 224736d9113ab4a7cf3f05c05377492bd99b4b02 h: refs/heads/master i: 275753: 70e8d685c3b5fdf4b14893053c1416ab3f71ccb8 275751: 4a3c299b9db8d6eefb7e70969a0af7481ab18473 v: v3 --- [refs] | 2 +- trunk/include/linux/ceph/osd_client.h | 8 +++++++- trunk/net/ceph/osd_client.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1fdf4c737c87..e65a5572d328 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 774ac21da76f5c3018428725074e27a3fd40b128 +refs/heads/master: 224736d9113ab4a7cf3f05c05377492bd99b4b02 diff --git a/trunk/include/linux/ceph/osd_client.h b/trunk/include/linux/ceph/osd_client.h index f88eacb111d4..7c05ac202d90 100644 --- a/trunk/include/linux/ceph/osd_client.h +++ b/trunk/include/linux/ceph/osd_client.h @@ -10,6 +10,12 @@ #include "osdmap.h" #include "messenger.h" +/* + * Maximum object name size + * (must be at least as big as RBD_MAX_MD_NAME_LEN -- currently 100) + */ +#define MAX_OBJ_NAME_SIZE 100 + struct ceph_msg; struct ceph_snap_context; struct ceph_osd_request; @@ -75,7 +81,7 @@ struct ceph_osd_request { struct inode *r_inode; /* for use by callbacks */ void *r_priv; /* ditto */ - char r_oid[40]; /* object name */ + char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */ int r_oid_len; unsigned long r_stamp; /* send OR check time */ diff --git a/trunk/net/ceph/osd_client.c b/trunk/net/ceph/osd_client.c index 733e46008b89..f4f3f58f5234 100644 --- a/trunk/net/ceph/osd_client.c +++ b/trunk/net/ceph/osd_client.c @@ -244,7 +244,7 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, ceph_pagelist_init(req->r_trail); } /* create request message; allow space for oid */ - msg_size += 40; + msg_size += MAX_OBJ_NAME_SIZE; if (snapc) msg_size += sizeof(u64) * snapc->num_snaps; if (use_mempool)