All of lore.kernel.org
 help / color / mirror / Atom feed
* Confused about SnapMapper::get_prefix
@ 2015-02-03 12:12 Ding Dinghua
  2015-02-03 17:15 ` Gregory Farnum
  0 siblings, 1 reply; 8+ messages in thread
From: Ding Dinghua @ 2015-02-03 12:12 UTC (permalink / raw)
  To: ceph-devel

Hi all:
      I don't understand why SnapMapper::get_prefix   static_cast snap
to unsigned:

string SnapMapper::get_prefix(snapid_t snap)
{
  char buf[100];
  int len = snprintf(
    buf, sizeof(buf),
    "%.*X_", (int)(sizeof(snap)*2),
    static_cast<unsigned>(snap));
  return MAPPING_PREFIX + string(buf, len);
}

Will this limit snapshot count in pool to 2^32 -1 ?

Could anyone clarify ? Thanks

-- 
Ding Dinghua

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

end of thread, other threads:[~2015-02-09 17:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 12:12 Confused about SnapMapper::get_prefix Ding Dinghua
2015-02-03 17:15 ` Gregory Farnum
2015-02-03 17:21   ` Samuel Just
2015-02-03 17:25     ` Samuel Just
2015-02-04  4:02       ` Ding Dinghua
2015-02-08 14:17         ` Ding Dinghua
2015-02-08 15:07           ` Sage Weil
2015-02-09 17:23             ` Samuel Just

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.