All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel F Mascarenhas Sousa Filipe <miguel.filipe@gmail.com>
To: ceph-devel@vger.kernel.org
Subject: doubt: inode_t->get_layout_size_increment() is signed.
Date: Tue, 6 Jul 2010 01:16:45 +0100	[thread overview]
Message-ID: <AANLkTingtd5NZClFkNsiuzX3phcFTzCeLw4-MiBt_wA9@mail.gmail.com> (raw)

Hi there,

I'm interested in this project and started now checking out the code
and make it compile...

I got hunting this signed comparison warning:

mds/Locker.cc: In member function ‘bool
Locker::_do_cap_update(CInode*, Capability*, int, snapid_t,
MClientCaps*, MClientCaps*)’:
mds/Locker.cc:1923: warning: comparison between signed and unsigned
integer expressions

that is related with inode_t->get_layout_size_increment() being signed.
This seems like a bug since it returns a size, but since I don't know
the implications of changing this to uint64_t.. I'm asking..

Is this the right fix?
--------


diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h
index b7bfd1d..3054610 100644
--- a/src/mds/mdstypes.h
+++ b/src/mds/mdstypes.h
@@ -379,7 +379,7 @@ struct inode_t {

   bool is_truncating() const { return (truncate_pending > 0); }

-  int64_t get_layout_size_increment() {
+  uint64_t get_layout_size_increment() {
     return layout.fl_object_size * layout.fl_stripe_count;
   }

------

Kind regards,

-- 
Miguel Mascarenhas Filipe
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2010-07-06  0:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06  0:16 Miguel F Mascarenhas Sousa Filipe [this message]
2010-07-07  2:41 ` doubt: inode_t->get_layout_size_increment() is signed Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTingtd5NZClFkNsiuzX3phcFTzCeLw4-MiBt_wA9@mail.gmail.com \
    --to=miguel.filipe@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.