All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Miguel F Mascarenhas Sousa Filipe <miguel.filipe@gmail.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: doubt: inode_t->get_layout_size_increment() is signed.
Date: Tue, 6 Jul 2010 19:41:30 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1007061940170.8676@cobra.newdream.net> (raw)
In-Reply-To: <AANLkTingtd5NZClFkNsiuzX3phcFTzCeLw4-MiBt_wA9@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1616 bytes --]

On Tue, 6 Jul 2010, Miguel F Mascarenhas Sousa Filipe wrote:
> 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?

It is, and has already been fixed in the unstable branch (for v0.21).  
You're probably looking at the master branch or a earlier release 
tarball..

Thanks!
sage

> --------
> 
> 
> 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-07  2:39 UTC|newest]

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

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=Pine.LNX.4.64.1007061940170.8676@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=miguel.filipe@gmail.com \
    /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.