From: Jean-Tiare Le Bigot <jean-tiare.le-bigot@corp.ovh.com>
To: ceph-devel@vger.kernel.org
Subject: CEPH_MAX_OID_NAME_LEN in rbd kernel driver
Date: Fri, 11 Dec 2015 15:48:46 +0100 [thread overview]
Message-ID: <566AE24E.1050107@corp.ovh.com> (raw)
Hi,
I hit a use case where rbd was failing to map an image because of the
name length.
dmesg output:
WARNING: CPU: 0 PID: 20851 at include/linux/ceph/osdmap.h:97
rbd_osd_req_create.isra.29+0xdd/0x140()
ceph_oid_set_name
'rbd_id.docker:devel:ib8k2cxvci9sh7b4ly8wwvpyjf6kjoyuero1k25zal3ypc916i04x78tbmn60gjm6pyp38lmjq:latest'
len 101 vs 100, truncating
It turns out the maximum ceph object name length is controlled by the
constant CEPH_MAX_OID_NAME_LEN. I naively tried to increase it to 500
which appears to workaround (fix ?) the issue.
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 49ff69f..cf34bb0 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -50,7 +50,7 @@ struct ceph_object_locator {
*
* (probably outdated: must be >= RBD_MAX_MD_NAME_LEN -- currently 100)
*/
-#define CEPH_MAX_OID_NAME_LEN 100
+#define CEPH_MAX_OID_NAME_LEN 500
struct ceph_object_id {
char name[CEPH_MAX_OID_NAME_LEN];
What is the impact of such a change ? Should I submit a proper patch ?
And, last but not least, shouldn't it return an error instead of trucate
it and fail because, obviously the object does not exist ? Worse, It
could exist with a different data. Which would be an interesting vector
for injecting data in a third party image...
--
Jean-Tiare, OVH.com
next reply other threads:[~2015-12-11 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 14:48 Jean-Tiare Le Bigot [this message]
2015-12-11 16:46 ` CEPH_MAX_OID_NAME_LEN in rbd kernel driver Ilya Dryomov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=566AE24E.1050107@corp.ovh.com \
--to=jean-tiare.le-bigot@corp.ovh.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.