• J
    rbd: read image size for discard check safely · 3c5df893
    Josh Durgin 提交于
    In rbd_img_request_fill() the image size is only checked to determine
    whether we can truncate an object instead of zeroing it for discard
    requests. Take rbd_dev->header_rwsem while reading the image size, and
    move this read into the discard check, so that non-discard ops don't
    need to take the semaphore in this function.
    Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
    3c5df893
rbd.c 145.6 KB