All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yehuda Sadeh <yehuda@redhat.com>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: RadosGW crashing on copy for one specific object
Date: Thu, 21 Aug 2014 13:39:43 -0700	[thread overview]
Message-ID: <CABBk=J8S_fkBMORDy9RbYLh6HWi+-EzyZefBNPmnBRWNuPOHAg@mail.gmail.com> (raw)
In-Reply-To: <CAF6-1L7hSYHoNeKUCu466UHUVbVUAQ6mWzK3V9B6TTuqMkpRLA@mail.gmail.com>

Try this:

diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index ed8f02d..0042df2 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -306,6 +306,11 @@ public:

   bool has_tail() {
     if (explicit_objs) {
+      if (objs.size() == 1) {
+        map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
+        rgw_obj& obj = iter->second.loc;
+        return head_obj.object != obj.object;
+      }
       return (objs.size() >= 2);
     }
     return (obj_size > head_size);

Thanks,
Yehuda

On Thu, Aug 21, 2014 at 2:38 AM, Sylvain Munaut
<s.munaut@whatever-company.com> wrote:
> Hi,
>
>
>> If by any chance you applied the previous patch, revert it, as it's
>> wrong. This might fix the issue:
>>
>> diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
>> index d50fb59..0f13590 100644
>> --- a/src/rgw/rgw_rados.h
>> +++ b/src/rgw/rgw_rados.h
>> @@ -298,6 +298,9 @@ public:
>>
>>    bool has_tail() {
>>      if (explicit_objs) {
>> +      if (objs.size() == 1) {
>> +        return head_obj != objs[0];
>> +      }
>>        return (objs.size() >= 2);
>>      }
>>      return (obj_size > head_size);
>>
>> Let me know if it works for you.
>
> It doesn't build at all.
>
> rgw/rgw_rados.h: In member function ‘bool RGWObjManifest::has_tail()’:
> rgw/rgw_rados.h:302:34: error: no match for ‘operator!=’ in
> ‘((RGWObjManifest*)this)->RGWObjManifest::head_obj !=
> ((RGWObjManifest*)this)->RGWObjManifest::objs.std::map<_Key, _Tp,
> _Compare, _Alloc>::operator[] [with _Key = long unsigned int, _Tp =
> RGWObjManifestPart, _Compare = std::less<long unsigned int>, _Alloc =
> std::allocator<std::pair<const long unsigned int, RGWObjManifestPart>
>>, std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type =
> RGWObjManifestPart, std::map<_Key, _Tp, _Compare, _Alloc>::key_type =
> long unsigned int]((* &0u))’
> ...
>
>
>
> Cheers,
>
>    Sylvain
> --
> 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
--
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:[~2014-08-21 20:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 12:44 RadosGW crashing on copy for one specific object Sylvain Munaut
2014-08-19 17:44 ` Yehuda Sadeh
2014-08-20 13:47   ` Sylvain Munaut
2014-08-20 17:25     ` Yehuda Sadeh
2014-08-20 17:33       ` Yehuda Sadeh
2014-08-20 17:44         ` Yehuda Sadeh
2014-08-21  9:38           ` Sylvain Munaut
2014-08-21 20:39             ` Yehuda Sadeh [this message]
2014-08-25  9:00               ` Sylvain Munaut

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='CABBk=J8S_fkBMORDy9RbYLh6HWi+-EzyZefBNPmnBRWNuPOHAg@mail.gmail.com' \
    --to=yehuda@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=s.munaut@whatever-company.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.