All of lore.kernel.org
 help / color / mirror / Atom feed
* CEPH_MAX_OID_NAME_LEN in rbd kernel driver
@ 2015-12-11 14:48 Jean-Tiare Le Bigot
  2015-12-11 16:46 ` Ilya Dryomov
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Tiare Le Bigot @ 2015-12-11 14:48 UTC (permalink / raw)
  To: ceph-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-11 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 14:48 CEPH_MAX_OID_NAME_LEN in rbd kernel driver Jean-Tiare Le Bigot
2015-12-11 16:46 ` Ilya Dryomov

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.