]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os: make name/attr max methods unsigned 2133/head
authorSage Weil <sage@redhat.com>
Tue, 22 Jul 2014 20:38:32 +0000 (13:38 -0700)
committerSage Weil <sage@redhat.com>
Tue, 22 Jul 2014 20:38:32 +0000 (13:38 -0700)
This fixes warnings when we use these in MIN/MAX macros against
other unsigned values.

Fixes: #8897
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/FileStore.h
src/os/KeyValueStore.h
src/os/MemStore.h
src/os/ObjectStore.h

index bbd587a7c6ed0a0a30545b5835689bb627d4c308..e5334d3ba423dc3f4088c7e5be83f46aec03938b 100644 (file)
@@ -410,11 +410,11 @@ public:
   int write_op_seq(int, uint64_t seq);
   int mount();
   int umount();
-  int get_max_object_name_length() {
+  unsigned get_max_object_name_length() {
     // not safe for all file systems, btw!  use the tunable to limit this.
     return 4096;
   }
-  int get_max_attr_name_length() {
+  unsigned get_max_attr_name_length() {
     // xattr limit is 128; leave room for our prefixes (user.ceph._),
     // some margin, and cap at 100
     return 100;
index c0991cc2e5e2ab8ff655b91995965fec173c8d5e..fd07055d9a75dca9587bbe8be4c4c1f59a8d3dbe 100644 (file)
@@ -491,10 +491,10 @@ class KeyValueStore : public ObjectStore,
   int write_version_stamp();
   int mount();
   int umount();
-  int get_max_object_name_length() {
+  unsigned get_max_object_name_length() {
     return 4096;  // no real limit for leveldb
   }
-  int get_max_attr_name_length() {
+  unsigned get_max_attr_name_length() {
     return 256;  // arbitrary; there is no real limit internally
   }
   int mkfs();
index 531553ddec61bf4d8f2a0c1d5fc3d029a9967bd5..0fa9d58fc1e6527d7f8ac42411666d5f05b93e18 100644 (file)
@@ -249,10 +249,10 @@ public:
   int mount();
   int umount();
 
-  int get_max_object_name_length() {
+  unsigned get_max_object_name_length() {
     return 4096;
   }
-  int get_max_attr_name_length() {
+  unsigned get_max_attr_name_length() {
     return 256;  // arbitrary; there is no real limit internally
   }
 
index 75ea2498b8a3b3a071f9ca5a6067f11c066e4862..3a0c1412746a3eca78aed122330cd9ace4ad3865 100644 (file)
@@ -1192,8 +1192,8 @@ public:
   virtual bool test_mount_in_use() = 0;
   virtual int mount() = 0;
   virtual int umount() = 0;
-  virtual int get_max_object_name_length() = 0;
-  virtual int get_max_attr_name_length() = 0;
+  virtual unsigned get_max_object_name_length() = 0;
+  virtual unsigned get_max_attr_name_length() = 0;
   virtual int mkfs() = 0;  // wipe
   virtual int mkjournal() = 0; // journal only
   virtual void set_allow_sharded_objects() = 0;