From: John Spray Date: Tue, 15 Jul 2014 11:45:34 +0000 (+0100) Subject: cephfs: pool safety & print deprecation warning X-Git-Tag: v0.84~102^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af740ecd498e73ae9c5101ae7ba377be6fd8f2eb;p=ceph.git cephfs: pool safety & print deprecation warning Print a message indicating to users that this tool is now deprecated in favour of vxattrs. Signed-off-by: John Spray --- diff --git a/src/cephfs.cc b/src/cephfs.cc index 90aee32c8967..fe2d6c6abde5 100644 --- a/src/cephfs.cc +++ b/src/cephfs.cc @@ -50,7 +50,7 @@ int main (int argc, char **argv) { int stripe_unit = 0; int stripe_count = 0; int object_size = 0; - int64_t pool = 0; + int64_t pool = -1; int file_offset = 0; bool dir = false; @@ -60,6 +60,9 @@ int main (int argc, char **argv) { return 0; } + cerr << "WARNING: This tool is deprecated. Use the layout.* xattrs " + "to query and modify layouts." << endl; + if (CMD_SHOW_LAYOUT == cmd) { struct ceph_ioctl_layout layout; memset(&layout, 0, sizeof(layout)); @@ -97,6 +100,10 @@ int main (int argc, char **argv) { struct ceph_ioctl_layout layout; memset(&layout, 0, sizeof(layout)); int ioctl_num = (dir ? CEPH_IOC_SET_LAYOUT_POLICY : CEPH_IOC_SET_LAYOUT); + if (pool == -1) { + cerr << "Pool not specified (use --pool )" << endl; + return 1; + } layout.data_pool = pool; layout.object_size = object_size; layout.stripe_count = stripe_count;