This is getting the NAME_MAX from the OS, but in reality the backend
KV store is the limiter. And for leveldb, there is no real limit.
Return 4096 for now.
Signed-off-by: Sage Weil <sage@redhat.com>
return 0;
}
-int KeyValueStore::get_max_object_name_length()
-{
- lock.Lock();
- int ret = pathconf(basedir.c_str(), _PC_NAME_MAX);
- if (ret < 0) {
- int err = errno;
- lock.Unlock();
- if (err == 0)
- return -EDOM;
- return -err;
- }
- lock.Unlock();
- return ret;
-}
-
int KeyValueStore::queue_transactions(Sequencer *posr, list<Transaction*> &tls,
TrackedOpRef osd_op,
ThreadPool::TPHandle *handle)
int write_version_stamp();
int mount();
int umount();
- int get_max_object_name_length();
+ int get_max_object_name_length() {
+ return 4096; // no real limit for leveldb
+ }
int get_max_attr_name_length() {
return 256; // arbitrary; there is no real limit internally
}