Re:Re: [PATCH v2 3/3] rbd: retrieve and check lock owner twice before blocklisting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



发件人:Ilya Dryomov <idryomov@xxxxxxxxx>
发送日期:2023-07-26 21:06:17
收件人:"杨东升" <dongsheng.yang@xxxxxxxxxxxx>
抄送人:ceph-devel@xxxxxxxxxxxxxxx
主题:Re: [PATCH v2 3/3] rbd: retrieve and check lock owner twice before blocklisting>On Wed, Jul 26, 2023 at 2:44 PM 杨东升 <dongsheng.yang@xxxxxxxxxxxx> wrote:
>>
>>
>> From: Ilya Dryomov <idryomov@xxxxxxxxx>
>>
>> Date: 2023-07-26 05:28:46
>> To:  ceph-devel@xxxxxxxxxxxxxxx
>> Cc:  Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx>
>> Subject: [PATCH v2 3/3] rbd: retrieve and check lock owner twice before blocklisting>An attempt to acquire exclusive lock can race with the current lock
>> >owner closing the image:
>> >
>> >1. lock is held by client123, rbd_lock() returns -EBUSY
>> >2. get_lock_owner_info() returns client123 instance details
>> >3. client123 closes the image, lock is released
>> >4. find_watcher() returns 0 as there is no matching watcher anymore
>> >5. client123 instance gets erroneously blocklisted
>> >
>> >Particularly impacted is mirror snapshot scheduler in snapshot-based
>> >mirroring since it happens to open and close images a lot (images are
>> >opened only for as long as it takes to take the next mirror snapshot,
>> >the same client instance is used for all images).
>> >
>> >To reduce the potential for erroneous blocklisting, retrieve the lock
>> >owner again after find_watcher() returns 0.  If it's still there, make
>> >sure it matches the previously detected lock owner.
>> >
>> >Cc: stable@xxxxxxxxxxxxxxx # ba6b7b6db4df: rbd: make get_lock_owner_info() return a single locker or NULL
>> >Cc: stable@xxxxxxxxxxxxxxx # c476a060136a: rbd: harden get_lock_owner_info() a bit
>> >Cc: stable@xxxxxxxxxxxxxxx
>> >Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>
>>
>>
>> Reviewed-by: Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx>
>
>Hi Dongsheng,
>
>Is this a review just for this patch or for the entire series?  The
>patch doesn't apply in isolation, so I'm assuming it's for the entire
>series but need confirmation since it's not on the cover letter.


Hi Ilya,
    It's for entire series. Actually I reply Reviewed-by to each of them.
So you can add my reviewed-by for 1/3 2/3 and 3/3 :)

Thanx



>
>Thanks,
>
>                Ilya






[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux