]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix quota signed/unsigned warning
authorSage Weil <sage@redhat.com>
Mon, 29 Dec 2014 23:47:28 +0000 (15:47 -0800)
committerSage Weil <sage@redhat.com>
Mon, 29 Dec 2014 23:47:28 +0000 (15:47 -0800)
client/Client.cc: In member function 'bool Client::is_quota_bytes_exceeded(Inode*, uint64_t)':
client/Client.cc:10393:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (quota->max_bytes && (rstat->rbytes + new_bytes) > quota->max_bytes)

Signed-off-by: Sage Weil <sage@redhat.com>
src/client/Client.cc
src/client/Client.h

index b7a87115ecfbeec92568bbb66e4e02b5085d6bc6..64e28dffd06cf6c447202199016fecb433474471 100644 (file)
@@ -10381,7 +10381,7 @@ bool Client::is_quota_files_exceeded(Inode *in)
   return false;
 }
 
-bool Client::is_quota_bytes_exceeded(Inode *in, uint64_t new_bytes)
+bool Client::is_quota_bytes_exceeded(Inode *in, int64_t new_bytes)
 {
   if (!cct->_conf->client_quota)
     return false;
index 0cb4c20bc1122902109db3d97a3f97136a2e68af..f93c89a707cd46c66b4948edcb2ae507688e5613 100644 (file)
@@ -473,7 +473,7 @@ protected:
   void invalidate_quota_tree(Inode *in);
   Inode* get_quota_root(Inode *in);
   bool is_quota_files_exceeded(Inode *in);
-  bool is_quota_bytes_exceeded(Inode *in, uint64_t new_bytes);
+  bool is_quota_bytes_exceeded(Inode *in, int64_t new_bytes);
   bool is_quota_bytes_approaching(Inode *in);
 
  public: