osd: add config for osd_max_object_name_len = 2048 (was hard-coded at 4096)

Previously we had a hard coded limit of 4096.  Objects > 3k crash the OSD
when running on ext4, although they probably work on xfs.  But rgw only
generates objects a bit over 1024 bytes (maybe 1200 tops?), so let set a
more reasonable limit here.  2048 is a nice round number and should be
safe.

Add a test.

Fixes: #8174
Signed-off-by: Sage Weil <sage@redhat.com>
os: add ObjectStore::get_max_attr_name_length()

Most importantly, capture that attrs on FileStore can't be more than about
100 chars.  The Linux xattrs can only be 128 chars, but we also have some
prefixing we do.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: add config for osd_max_attr_name_len = 100

Set a limit on the length of an attr name.  The fs can only take 128
bytes, but we were not imposing any limit.

Add a test.

Reported-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
os/FileStore: fix max object name limit

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>
Merge pull request #2111 from ceph/wip-8174

osd: add config for osd_max_object_name_len = 2048 (was hard-coded at 4096)

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>

and the first patch was
Reviewed-by: Samuel Just <sam.just@inktank.com>