max_bytes = to_bytes(str(args.max_bytes))
try:
cephfs.setxattr(args.path, 'ceph.quota.max_bytes',
- max_bytes, len(max_bytes),
- os.XATTR_CREATE)
+ max_bytes, os.XATTR_CREATE)
poutput('max_bytes set to %d' % args.max_bytes)
except libcephfs.Error:
cephfs.setxattr(args.path, 'ceph.quota.max_bytes',
- max_bytes, len(max_bytes),
- os.XATTR_REPLACE)
+ max_bytes, os.XATTR_REPLACE)
perror('max_bytes reset to %d' % args.max_bytes)
self.exit_code = 1
max_files = to_bytes(str(args.max_files))
try:
cephfs.setxattr(args.path, 'ceph.quota.max_files',
- max_files, len(max_files),
- os.XATTR_CREATE)
+ max_files, os.XATTR_CREATE)
poutput('max_files set to %d' % args.max_files)
except libcephfs.Error:
cephfs.setxattr(args.path, 'ceph.quota.max_files',
- max_files, len(max_files),
- os.XATTR_REPLACE)
+ max_files, os.XATTR_REPLACE)
perror('max_files reset to %d' % args.max_files)
self.exit_code = 1
elif args.op == 'get':