Our max object name is not limited by file name size, but by the length of
the name we can stuff in an xattr. That will vary from file system to
file system, so just make this 4096. In practice, it should be limited
via the global tunable, if it is adjusted at all.
Signed-off-by: Sage Weil <sage@redhat.com>
}
-int FileStore::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 write_op_seq(int, uint64_t seq);
int mount();
int umount();
- int get_max_object_name_length();
+ int get_max_object_name_length() {
+ // not safe for all file systems, btw! use the tunable to limit this.
+ return 4096;
+ }
int get_max_attr_name_length() {
// xattr limit is 128; leave room for our prefixes (user.ceph._),
// some margin, and cap at 100