All of lore.kernel.org
 help / color / mirror / Atom feed
* Evict op on a watched object
@ 2016-04-11 15:11 Zhiqiang Wang
  2016-04-11 15:18 ` Jason Dillaman
  0 siblings, 1 reply; 5+ messages in thread
From: Zhiqiang Wang @ 2016-04-11 15:11 UTC (permalink / raw)
  To: ceph-devel

Hi all,

Currently it is not allowed to issue an evict op
(CEPH_OSD_OP_CACHE_EVICT) on an object which has watchers (e.g. the
rbd header). EBUSY is returned in this case. This leads to the the
flush-evict-all failure during removing a cache tier, something like
below:

rbd_header.4fc06b8b4567
failed to evict /rbd_header.4fc06b8b4567: (16) Device or resource busy

My question is that do we actually need to do so? The object in the
base pool should have the watcher information as well after the flush.
Probably we could remove this 'watcher' check to make flush-evict-all
happy?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Evict op on a watched object
  2016-04-11 15:11 Evict op on a watched object Zhiqiang Wang
@ 2016-04-11 15:18 ` Jason Dillaman
  2016-04-12  6:56   ` Zhiqiang Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Dillaman @ 2016-04-11 15:18 UTC (permalink / raw)
  To: Zhiqiang Wang; +Cc: ceph-devel

> Currently it is not allowed to issue an evict op
> (CEPH_OSD_OP_CACHE_EVICT) on an object which has watchers (e.g. the
> rbd header). EBUSY is returned in this case. This leads to the the
> flush-evict-all failure during removing a cache tier, something like
> below:
> 
> rbd_header.4fc06b8b4567
> failed to evict /rbd_header.4fc06b8b4567: (16) Device or resource busy
> 
> My question is that do we actually need to do so? The object in the
> base pool should have the watcher information as well after the flush.
> Probably we could remove this 'watcher' check to make flush-evict-all
> happy?
> --
> 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
> 

I opened a ticket [1] a couple of months ago to address this issue.

[1] http://tracker.ceph.com/issues/14865

-- 

Jason Dillaman 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Evict op on a watched object
  2016-04-11 15:18 ` Jason Dillaman
@ 2016-04-12  6:56   ` Zhiqiang Wang
  2016-04-12 13:55     ` Jason Dillaman
  0 siblings, 1 reply; 5+ messages in thread
From: Zhiqiang Wang @ 2016-04-12  6:56 UTC (permalink / raw)
  To: Jason Dillaman; +Cc: ceph-devel

Thanks Jason.

Looks like in the osd side, the only difference between 'watch' and
'legacy watch' is whether 'will_ping' is set. Can we use this to check
for 'legacy watch'? Or as we don't use 'legacy watch' any more, we
just don't care about it?

(forgot to cc the mail list, sorry for the dup mails)

2016-04-11 23:18 GMT+08:00 Jason Dillaman <dillaman@redhat.com>:
>> Currently it is not allowed to issue an evict op
>> (CEPH_OSD_OP_CACHE_EVICT) on an object which has watchers (e.g. the
>> rbd header). EBUSY is returned in this case. This leads to the the
>> flush-evict-all failure during removing a cache tier, something like
>> below:
>>
>> rbd_header.4fc06b8b4567
>> failed to evict /rbd_header.4fc06b8b4567: (16) Device or resource busy
>>
>> My question is that do we actually need to do so? The object in the
>> base pool should have the watcher information as well after the flush.
>> Probably we could remove this 'watcher' check to make flush-evict-all
>> happy?
>> --
>> 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
>>
>
> I opened a ticket [1] a couple of months ago to address this issue.
>
> [1] http://tracker.ceph.com/issues/14865
>
> --
>
> Jason Dillaman

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Evict op on a watched object
  2016-04-12  6:56   ` Zhiqiang Wang
@ 2016-04-12 13:55     ` Jason Dillaman
  2016-04-12 14:14       ` Zhiqiang Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Dillaman @ 2016-04-12 13:55 UTC (permalink / raw)
  To: Zhiqiang Wang; +Cc: ceph-devel

I am not too familiar with the detailed inner-workings of the OSD, but that looks right.  In theory, if all the registered watches can support pings, you can queue up watch disconnect messages in the transaction context and proceed with the eviction.  The v2 watch clients will receive the notification that they have been disconnected and they will attempt to re-register the watch.

Jason

----- Original Message -----
> Thanks Jason.
> 
> Looks like in the osd side, the only difference between 'watch' and
> 'legacy watch' is whether 'will_ping' is set. Can we use this to check
> for 'legacy watch'? Or as we don't use 'legacy watch' any more, we
> just don't care about it?
> 
> (forgot to cc the mail list, sorry for the dup mails)
> 
> 2016-04-11 23:18 GMT+08:00 Jason Dillaman <dillaman@redhat.com>:
> >> Currently it is not allowed to issue an evict op
> >> (CEPH_OSD_OP_CACHE_EVICT) on an object which has watchers (e.g. the
> >> rbd header). EBUSY is returned in this case. This leads to the the
> >> flush-evict-all failure during removing a cache tier, something like
> >> below:
> >>
> >> rbd_header.4fc06b8b4567
> >> failed to evict /rbd_header.4fc06b8b4567: (16) Device or resource busy
> >>
> >> My question is that do we actually need to do so? The object in the
> >> base pool should have the watcher information as well after the flush.
> >> Probably we could remove this 'watcher' check to make flush-evict-all
> >> happy?
> >> --
> >> 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
> >>
> >
> > I opened a ticket [1] a couple of months ago to address this issue.
> >
> > [1] http://tracker.ceph.com/issues/14865
> >
> > --
> >
> > Jason Dillaman
> --
> 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
> 


-- 

Jason Dillaman 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Evict op on a watched object
  2016-04-12 13:55     ` Jason Dillaman
@ 2016-04-12 14:14       ` Zhiqiang Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Zhiqiang Wang @ 2016-04-12 14:14 UTC (permalink / raw)
  To: Jason Dillaman; +Cc: ceph-devel

Good. If you don't mind, I'll come up with a fix for this.

2016-04-12 21:55 GMT+08:00 Jason Dillaman <dillaman@redhat.com>:
> I am not too familiar with the detailed inner-workings of the OSD, but that looks right.  In theory, if all the registered watches can support pings, you can queue up watch disconnect messages in the transaction context and proceed with the eviction.  The v2 watch clients will receive the notification that they have been disconnected and they will attempt to re-register the watch.
>
> Jason
>
> ----- Original Message -----
>> Thanks Jason.
>>
>> Looks like in the osd side, the only difference between 'watch' and
>> 'legacy watch' is whether 'will_ping' is set. Can we use this to check
>> for 'legacy watch'? Or as we don't use 'legacy watch' any more, we
>> just don't care about it?
>>
>> (forgot to cc the mail list, sorry for the dup mails)
>>
>> 2016-04-11 23:18 GMT+08:00 Jason Dillaman <dillaman@redhat.com>:
>> >> Currently it is not allowed to issue an evict op
>> >> (CEPH_OSD_OP_CACHE_EVICT) on an object which has watchers (e.g. the
>> >> rbd header). EBUSY is returned in this case. This leads to the the
>> >> flush-evict-all failure during removing a cache tier, something like
>> >> below:
>> >>
>> >> rbd_header.4fc06b8b4567
>> >> failed to evict /rbd_header.4fc06b8b4567: (16) Device or resource busy
>> >>
>> >> My question is that do we actually need to do so? The object in the
>> >> base pool should have the watcher information as well after the flush.
>> >> Probably we could remove this 'watcher' check to make flush-evict-all
>> >> happy?
>> >> --
>> >> 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
>> >>
>> >
>> > I opened a ticket [1] a couple of months ago to address this issue.
>> >
>> > [1] http://tracker.ceph.com/issues/14865
>> >
>> > --
>> >
>> > Jason Dillaman
>> --
>> 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
>>
>
>
> --
>
> Jason Dillaman

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-12 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 15:11 Evict op on a watched object Zhiqiang Wang
2016-04-11 15:18 ` Jason Dillaman
2016-04-12  6:56   ` Zhiqiang Wang
2016-04-12 13:55     ` Jason Dillaman
2016-04-12 14:14       ` Zhiqiang Wang

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.