Pool 0 means no change or default in the legacy ceph_file_layout in the
layout ioctl and file create arguments. Prevent it from being used to avoid
putting users in an awkward situation later.
Signed-off-by: Sage Weil <sage@redhat.com>
ss << "pool '" << data_name << "' does not exist";
return -ENOENT;
}
+ if (data == 0) {
+ ss << "pool '" << data_name << "' has id 0, which CephFS does not allow. Use another pool or recreate it to get a non-zero pool id.";
+ return -EINVAL;
+ }
string fs_name;
cmd_getval(g_ceph_context, cmdmap, "fs_name", fs_name);