• Bob Peterson's avatar
    GFS2: Issue discards in 512b sectors · b2c87cae
    Bob Peterson authored
    This patch changes GFS2's discard issuing code so that it calls
    function sb_issue_discard rather than blkdev_issue_discard. The
    code was calling blkdev_issue_discard and specifying the correct
    sector offset and sector size, but blkdev_issue_discard expects
    these values to be in terms of 512 byte sectors, even if the native
    sector size for the device is different. Calling sb_issue_discard
    with the BLOCK size instead ensures the correct block-to-512b-sector
    translation. I verified that "minlen" is specified in blocks, so
    comparing it to a number of blocks is correct.
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    b2c87cae
rgrp.c 62.6 KB