A quota is set on a subvolume by setting a quota virtual
xattr on a fs subdirectory. The value of the quota xattr
should be a bytes object. The quota value wasn't correctly
converted to a bytes object. Fix this.
Fixes: http://tracker.ceph.com/issues/40152
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit
695c9e4dc83e77d13e9fad057d77994594fdd226)
self._mkdir_p(path, mode)
if size is not None:
- self.fs.setxattr(path, 'ceph.quota.max_bytes', size.encode('utf-8'), 0)
+ self.fs.setxattr(path, 'ceph.quota.max_bytes', str(size).encode('utf-8'), 0)
# enforce security isolation, use separate namespace for this subvolume
if namespace_isolated: