]> git.karo-electronics.de Git - karo-tx-linux.git/commit
GFS2: Issue discards in 512b sectors
authorBob Peterson <rpeterso@redhat.com>
Fri, 22 Mar 2013 14:07:24 +0000 (10:07 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 22 Mar 2013 14:24:14 +0000 (14:24 +0000)
commit19875660d8c2b40dce0fc7c2695b857f3c655add
tree25ba01679c0c33398efdb7753c543a900d4fffc5
parent26217f50b084f4bc48f2712d41c9e65819bfd97c
GFS2: Issue discards in 512b sectors

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: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/rgrp.c